diff --git a/.github/workflows/auto-commit-client-updates.yml b/.github/workflows/auto-commit-client-updates.yml index 81586a64..f12331a3 100644 --- a/.github/workflows/auto-commit-client-updates.yml +++ b/.github/workflows/auto-commit-client-updates.yml @@ -4,19 +4,19 @@ name: Auto commit client updates on: - workflow_dispatch: push: - branches: [ "**" ] + branches-ignore: + - 'sync/**' jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '11' distribution: 'temurin' diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index c6651657..e9ddb513 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -18,9 +18,9 @@ jobs: packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '11' distribution: 'temurin' diff --git a/Makefile b/Makefile index fe6d82bf..4d48cd28 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ CRI:=docker # nerdctl OPENAPI_CODEGEN_TAG=v6.4.0 OPENAPI_CODEGEN_IMAGE=openapitools/openapi-generator-cli:${OPENAPI_CODEGEN_TAG} DOCKER_OPENAPI=${CRI} run --rm -u ${CURRENT_UID}:${CURRENT_GID} -v $(CURDIR):/local ${OPENAPI_CODEGEN_IMAGE} -OPENAPI_URL="https://app.swaggerhub.com/apiproxy/registry/equinix-api/fabric/4.20" +OPENAPI_URL="https://app.swaggerhub.com/apiproxy/registry/equinix-api/fabric/4.21" generate: clean fetch pre-spec-patch pull docker_generate build_client diff --git a/equinix-openapi-fabric/.openapi-generator/FILES b/equinix-openapi-fabric/.openapi-generator/FILES index 2cd5c254..b9e1105f 100644 --- a/equinix-openapi-fabric/.openapi-generator/FILES +++ b/equinix-openapi-fabric/.openapi-generator/FILES @@ -18,6 +18,7 @@ docs/AllPortsResponse.md docs/ApiConfig.md docs/ApiServices.md docs/Asset.md +docs/AuthContext.md docs/AuthenticationKey.md docs/BGPActionData.md docs/BGPActionRequest.md @@ -33,6 +34,14 @@ docs/BulkPort.md docs/BulkPortRequest.md docs/Change.md docs/Changelog.md +docs/CloudEvent.md +docs/CloudEventAssetType.md +docs/CloudEventData.md +docs/CloudEventFilter.md +docs/CloudEventFilters.md +docs/CloudEventSearchRequest.md +docs/CloudEventSimpleExpression.md +docs/CloudEventsApi.md docs/CloudRouter.md docs/CloudRouterAccessPointState.md docs/CloudRouterActionRequest.md @@ -50,6 +59,22 @@ docs/CloudRouterActionsSearchSortCriteria.md docs/CloudRouterActionsSearchSortDirection.md docs/CloudRouterChange.md docs/CloudRouterChangeOperation.md +docs/CloudRouterCommand.md +docs/CloudRouterCommandPostRequest.md +docs/CloudRouterCommandRequest.md +docs/CloudRouterCommandRequestConnection.md +docs/CloudRouterCommandResponse.md +docs/CloudRouterCommandSearchExpression.md +docs/CloudRouterCommandSearchFilter.md +docs/CloudRouterCommandSearchFilters.md +docs/CloudRouterCommandSearchOrFilter.md +docs/CloudRouterCommandSearchRequest.md +docs/CloudRouterCommandSearchResponse.md +docs/CloudRouterCommandSearchSortBy.md +docs/CloudRouterCommandSearchSortCriteria.md +docs/CloudRouterCommandSearchSortDirection.md +docs/CloudRouterCommandState.md +docs/CloudRouterCommandType.md docs/CloudRouterFilter.md docs/CloudRouterFilters.md docs/CloudRouterOrFilter.md @@ -115,11 +140,13 @@ docs/FabricCloudRouterPrice.md docs/FilterBody.md docs/GeoCoordinates.md docs/GeoScopeType.md +docs/GetAllCloudRouterCommands.md docs/GetAllConnectionRouteAggregationsResponse.md docs/GetAllConnectionRouteFiltersResponse.md docs/GetAllStreamAssetResponse.md docs/GetAllStreamResponse.md docs/GetAllStreamSubscriptionResponse.md +docs/GetCloudEventsByAssetResponse.md docs/GetResponse.md docs/GetRouteAggregationGetConnectionsResponse.md docs/GetRouteAggregationRulesResponse.md @@ -181,6 +208,8 @@ docs/NetworksApi.md docs/OpEnum.md docs/Operation.md docs/Order.md +docs/OutputStructuredPing.md +docs/OutputStructuredPingResponseItem.md docs/PackageChangeLog.md docs/PackageResponse.md docs/Pagination.md @@ -191,6 +220,7 @@ docs/PhysicalPortSettings.md docs/PhysicalPortType.md docs/Port.md docs/PortAdditionalInfo.md +docs/PortChange.md docs/PortChangeOperation.md docs/PortDemarcationPoint.md docs/PortDevice.md @@ -222,6 +252,7 @@ docs/PortsApi.md docs/PrecisionTimeApi.md docs/PrecisionTimeChangeOperation.md docs/PrecisionTimeOrder.md +docs/PrecisionTimePackagePostResponse.md docs/PrecisionTimePackageRequest.md docs/PrecisionTimePackageResponse.md docs/PrecisionTimePrice.md @@ -245,6 +276,7 @@ docs/ProviderStatus.md docs/PtpAdvanceConfiguration.md docs/RemoveOperation.md docs/ReplaceOperation.md +docs/ResourceData.md docs/ResourceSelector.md docs/RouteAggregationChangeData.md docs/RouteAggregationChangeDataResponse.md @@ -491,6 +523,7 @@ src/main/java/com/equinix/openapi/fabric/auth/ApiKeyAuth.java src/main/java/com/equinix/openapi/fabric/auth/Authentication.java src/main/java/com/equinix/openapi/fabric/auth/HttpBasicAuth.java src/main/java/com/equinix/openapi/fabric/auth/HttpBearerAuth.java +src/main/java/com/equinix/openapi/fabric/v4/api/CloudEventsApi.java src/main/java/com/equinix/openapi/fabric/v4/api/CloudRoutersApi.java src/main/java/com/equinix/openapi/fabric/v4/api/ConnectionsApi.java src/main/java/com/equinix/openapi/fabric/v4/api/HealthApi.java @@ -524,6 +557,7 @@ src/main/java/com/equinix/openapi/fabric/v4/model/AllPortsResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/ApiConfig.java src/main/java/com/equinix/openapi/fabric/v4/model/ApiServices.java src/main/java/com/equinix/openapi/fabric/v4/model/Asset.java +src/main/java/com/equinix/openapi/fabric/v4/model/AuthContext.java src/main/java/com/equinix/openapi/fabric/v4/model/AuthenticationKey.java src/main/java/com/equinix/openapi/fabric/v4/model/BGPActionData.java src/main/java/com/equinix/openapi/fabric/v4/model/BGPActionRequest.java @@ -539,6 +573,13 @@ src/main/java/com/equinix/openapi/fabric/v4/model/BulkPort.java src/main/java/com/equinix/openapi/fabric/v4/model/BulkPortRequest.java src/main/java/com/equinix/openapi/fabric/v4/model/Change.java src/main/java/com/equinix/openapi/fabric/v4/model/Changelog.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudEvent.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventAssetType.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventData.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventFilter.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventFilters.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventSearchRequest.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventSimpleExpression.java src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouter.java src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterAccessPointState.java src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterActionRequest.java @@ -556,6 +597,22 @@ src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterActionsSearchSortCr src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterActionsSearchSortDirection.java src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterChange.java src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterChangeOperation.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommand.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandPostRequest.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandRequest.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandRequestConnection.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandResponse.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchExpression.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchFilter.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchFilters.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchOrFilter.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchRequest.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchResponse.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortBy.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortCriteria.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortDirection.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandState.java +src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandType.java src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterFilter.java src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterFilters.java src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterOrFilter.java @@ -619,11 +676,13 @@ src/main/java/com/equinix/openapi/fabric/v4/model/FabricCloudRouterPrice.java src/main/java/com/equinix/openapi/fabric/v4/model/FilterBody.java src/main/java/com/equinix/openapi/fabric/v4/model/GeoCoordinates.java src/main/java/com/equinix/openapi/fabric/v4/model/GeoScopeType.java +src/main/java/com/equinix/openapi/fabric/v4/model/GetAllCloudRouterCommands.java src/main/java/com/equinix/openapi/fabric/v4/model/GetAllConnectionRouteAggregationsResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/GetAllConnectionRouteFiltersResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/GetAllStreamAssetResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/GetAllStreamResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/GetAllStreamSubscriptionResponse.java +src/main/java/com/equinix/openapi/fabric/v4/model/GetCloudEventsByAssetResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/GetResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/GetRouteAggregationGetConnectionsResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/GetRouteAggregationRulesResponse.java @@ -681,6 +740,8 @@ src/main/java/com/equinix/openapi/fabric/v4/model/NetworkType.java src/main/java/com/equinix/openapi/fabric/v4/model/OpEnum.java src/main/java/com/equinix/openapi/fabric/v4/model/Operation.java src/main/java/com/equinix/openapi/fabric/v4/model/Order.java +src/main/java/com/equinix/openapi/fabric/v4/model/OutputStructuredPing.java +src/main/java/com/equinix/openapi/fabric/v4/model/OutputStructuredPingResponseItem.java src/main/java/com/equinix/openapi/fabric/v4/model/PackageChangeLog.java src/main/java/com/equinix/openapi/fabric/v4/model/PackageResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/Pagination.java @@ -691,6 +752,7 @@ src/main/java/com/equinix/openapi/fabric/v4/model/PhysicalPortSettings.java src/main/java/com/equinix/openapi/fabric/v4/model/PhysicalPortType.java src/main/java/com/equinix/openapi/fabric/v4/model/Port.java src/main/java/com/equinix/openapi/fabric/v4/model/PortAdditionalInfo.java +src/main/java/com/equinix/openapi/fabric/v4/model/PortChange.java src/main/java/com/equinix/openapi/fabric/v4/model/PortChangeOperation.java src/main/java/com/equinix/openapi/fabric/v4/model/PortDemarcationPoint.java src/main/java/com/equinix/openapi/fabric/v4/model/PortDevice.java @@ -720,6 +782,7 @@ src/main/java/com/equinix/openapi/fabric/v4/model/PortType.java src/main/java/com/equinix/openapi/fabric/v4/model/PortV4SearchRequest.java src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimeChangeOperation.java src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimeOrder.java +src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePackagePostResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePackageRequest.java src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePackageResponse.java src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePrice.java @@ -742,6 +805,7 @@ src/main/java/com/equinix/openapi/fabric/v4/model/ProviderStatus.java src/main/java/com/equinix/openapi/fabric/v4/model/PtpAdvanceConfiguration.java src/main/java/com/equinix/openapi/fabric/v4/model/RemoveOperation.java src/main/java/com/equinix/openapi/fabric/v4/model/ReplaceOperation.java +src/main/java/com/equinix/openapi/fabric/v4/model/ResourceData.java src/main/java/com/equinix/openapi/fabric/v4/model/ResourceSelector.java src/main/java/com/equinix/openapi/fabric/v4/model/RouteAggregationChangeData.java src/main/java/com/equinix/openapi/fabric/v4/model/RouteAggregationChangeDataResponse.java @@ -951,6 +1015,7 @@ src/main/java/com/equinix/openapi/fabric/v4/model/VirtualPortRedundancy.java src/main/java/com/equinix/openapi/fabric/v4/model/VirtualPortServiceType.java src/main/java/com/equinix/openapi/fabric/v4/model/VirtualPortType.java src/main/java/com/equinix/openapi/fabric/v4/model/VpicInterface.java +src/test/java/com/equinix/openapi/fabric/v4/api/CloudEventsApiTest.java src/test/java/com/equinix/openapi/fabric/v4/api/CloudRoutersApiTest.java src/test/java/com/equinix/openapi/fabric/v4/api/ConnectionsApiTest.java src/test/java/com/equinix/openapi/fabric/v4/api/HealthApiTest.java @@ -983,6 +1048,7 @@ src/test/java/com/equinix/openapi/fabric/v4/model/AllPortsResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/ApiConfigTest.java src/test/java/com/equinix/openapi/fabric/v4/model/ApiServicesTest.java src/test/java/com/equinix/openapi/fabric/v4/model/AssetTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/AuthContextTest.java src/test/java/com/equinix/openapi/fabric/v4/model/AuthenticationKeyTest.java src/test/java/com/equinix/openapi/fabric/v4/model/BGPActionDataTest.java src/test/java/com/equinix/openapi/fabric/v4/model/BGPActionRequestTest.java @@ -998,6 +1064,13 @@ src/test/java/com/equinix/openapi/fabric/v4/model/BulkPortRequestTest.java src/test/java/com/equinix/openapi/fabric/v4/model/BulkPortTest.java src/test/java/com/equinix/openapi/fabric/v4/model/ChangeTest.java src/test/java/com/equinix/openapi/fabric/v4/model/ChangelogTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudEventAssetTypeTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudEventDataTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudEventFilterTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudEventFiltersTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudEventSearchRequestTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudEventSimpleExpressionTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudEventTest.java src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterAccessPointStateTest.java src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterActionRequestTest.java src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterActionResponseTest.java @@ -1014,6 +1087,22 @@ src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterActionsSearchSortCr src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterActionsSearchSortDirectionTest.java src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterChangeOperationTest.java src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterChangeTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandPostRequestTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandRequestConnectionTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandRequestTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandResponseTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchExpressionTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchFilterTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchFiltersTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchOrFilterTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchRequestTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchResponseTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortByTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortCriteriaTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortDirectionTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandStateTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandTypeTest.java src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterFilterTest.java src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterFiltersTest.java src/test/java/com/equinix/openapi/fabric/v4/model/CloudRouterOrFilterTest.java @@ -1078,11 +1167,13 @@ src/test/java/com/equinix/openapi/fabric/v4/model/FabricCloudRouterPriceTest.jav src/test/java/com/equinix/openapi/fabric/v4/model/FilterBodyTest.java src/test/java/com/equinix/openapi/fabric/v4/model/GeoCoordinatesTest.java src/test/java/com/equinix/openapi/fabric/v4/model/GeoScopeTypeTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/GetAllCloudRouterCommandsTest.java src/test/java/com/equinix/openapi/fabric/v4/model/GetAllConnectionRouteAggregationsResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/GetAllConnectionRouteFiltersResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/GetAllStreamAssetResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/GetAllStreamResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/GetAllStreamSubscriptionResponseTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/GetCloudEventsByAssetResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/GetResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/GetRouteAggregationGetConnectionsResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/GetRouteAggregationRulesResponseTest.java @@ -1140,6 +1231,8 @@ src/test/java/com/equinix/openapi/fabric/v4/model/NetworkTypeTest.java src/test/java/com/equinix/openapi/fabric/v4/model/OpEnumTest.java src/test/java/com/equinix/openapi/fabric/v4/model/OperationTest.java src/test/java/com/equinix/openapi/fabric/v4/model/OrderTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/OutputStructuredPingResponseItemTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/OutputStructuredPingTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PackageChangeLogTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PackageResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PaginationRequestTest.java @@ -1150,6 +1243,7 @@ src/test/java/com/equinix/openapi/fabric/v4/model/PhysicalPortTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PhysicalPortTypeTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PortAdditionalInfoTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PortChangeOperationTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/PortChangeTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PortDemarcationPointTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PortDeviceRedundancyTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PortDeviceTest.java @@ -1179,6 +1273,7 @@ src/test/java/com/equinix/openapi/fabric/v4/model/PortTypeTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PortV4SearchRequestTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PrecisionTimeChangeOperationTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PrecisionTimeOrderTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePackagePostResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePackageRequestTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePackageResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePriceTest.java @@ -1201,6 +1296,7 @@ src/test/java/com/equinix/openapi/fabric/v4/model/ProviderStatusTest.java src/test/java/com/equinix/openapi/fabric/v4/model/PtpAdvanceConfigurationTest.java src/test/java/com/equinix/openapi/fabric/v4/model/RemoveOperationTest.java src/test/java/com/equinix/openapi/fabric/v4/model/ReplaceOperationTest.java +src/test/java/com/equinix/openapi/fabric/v4/model/ResourceDataTest.java src/test/java/com/equinix/openapi/fabric/v4/model/ResourceSelectorTest.java src/test/java/com/equinix/openapi/fabric/v4/model/RouteAggregationChangeDataResponseTest.java src/test/java/com/equinix/openapi/fabric/v4/model/RouteAggregationChangeDataTest.java diff --git a/equinix-openapi-fabric/README.md b/equinix-openapi-fabric/README.md index b177d22c..25e62f0a 100644 --- a/equinix-openapi-fabric/README.md +++ b/equinix-openapi-fabric/README.md @@ -1,7 +1,7 @@ # equinix-openapi-fabric Equinix Fabric API v4 -- API version: 4.20 +- API version: 4.21 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
@@ -85,7 +85,7 @@ import com.equinix.openapi.fabric.ApiException; import com.equinix.openapi.fabric.Configuration; import com.equinix.openapi.fabric.auth.*; import com.equinix.openapi.fabric.models.*; -import com.equinix.openapi.fabric.v4.api.CloudRoutersApi; +import com.equinix.openapi.fabric.v4.api.CloudEventsApi; public class Example { public static void main(String[] args) { @@ -96,14 +96,13 @@ public class Example { HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); BearerAuth.setBearerToken("BEARER TOKEN"); - CloudRoutersApi apiInstance = new CloudRoutersApi(defaultClient); - CloudRouterPostRequest cloudRouterPostRequest = new CloudRouterPostRequest(); // CloudRouterPostRequest | - Boolean dryRun = false; // Boolean | option to verify that API calls will succeed + CloudEventsApi apiInstance = new CloudEventsApi(defaultClient); + UUID cloudEventId = UUID.randomUUID(); // UUID | Cloud Event UUID try { - CloudRouter result = apiInstance.createCloudRouter(cloudRouterPostRequest, dryRun); + CloudEvent result = apiInstance.getCloudEvent(cloudEventId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CloudRoutersApi#createCloudRouter"); + System.err.println("Exception when calling CloudEventsApi#getCloudEvent"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -120,14 +119,22 @@ All URIs are relative to *https://api.equinix.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*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 *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 *CloudRoutersApi* | [**deleteCloudRouterByUuid**](docs/CloudRoutersApi.md#deleteCloudRouterByUuid) | **DELETE** /fabric/v4/routers/{routerId} | Delete Routers +*CloudRoutersApi* | [**deleteCloudRouterCommandByUuid**](docs/CloudRoutersApi.md#deleteCloudRouterCommandByUuid) | **DELETE** /fabric/v4/routers/{routerId}/commands/{commandId} | Delete Command +*CloudRoutersApi* | [**getAllCloudRouterCommands**](docs/CloudRoutersApi.md#getAllCloudRouterCommands) | **GET** /fabric/v4/routers/{routerId}/commands | Get Commands *CloudRoutersApi* | [**getCloudRouterActions**](docs/CloudRoutersApi.md#getCloudRouterActions) | **GET** /fabric/v4/routers/{routerId}/actions | Get Route Table Actions *CloudRoutersApi* | [**getCloudRouterActionsByUuid**](docs/CloudRoutersApi.md#getCloudRouterActionsByUuid) | **GET** /fabric/v4/routers/{routerId}/actions/{actionId} | Get Route Table Action by ID *CloudRoutersApi* | [**getCloudRouterByUuid**](docs/CloudRoutersApi.md#getCloudRouterByUuid) | **GET** /fabric/v4/routers/{routerId} | Get Routers +*CloudRoutersApi* | [**getCloudRouterCommand**](docs/CloudRoutersApi.md#getCloudRouterCommand) | **GET** /fabric/v4/routers/{routerId}/commands/{commandId} | Get Command *CloudRoutersApi* | [**getCloudRouterPackageByCode**](docs/CloudRoutersApi.md#getCloudRouterPackageByCode) | **GET** /fabric/v4/routerPackages/{routerPackageCode} | Get Package Details *CloudRoutersApi* | [**getCloudRouterPackages**](docs/CloudRoutersApi.md#getCloudRouterPackages) | **GET** /fabric/v4/routerPackages | List Packages +*CloudRoutersApi* | [**searchCloudRouterCommands**](docs/CloudRoutersApi.md#searchCloudRouterCommands) | **POST** /fabric/v4/routers/{routerId}/commands/search | Search Commands *CloudRoutersApi* | [**searchCloudRouterRoutes**](docs/CloudRoutersApi.md#searchCloudRouterRoutes) | **POST** /fabric/v4/routers/{routerId}/routes/search | Search Route Table *CloudRoutersApi* | [**searchCloudRouters**](docs/CloudRoutersApi.md#searchCloudRouters) | **POST** /fabric/v4/routers/search | Search Routers *CloudRoutersApi* | [**searchConnectionAdvertisedRoutes**](docs/CloudRoutersApi.md#searchConnectionAdvertisedRoutes) | **POST** /fabric/v4/connections/{connectionId}/advertisedRoutes/search | Search Advertised Routes @@ -279,6 +286,7 @@ Class | Method | HTTP request | Description - [ApiConfig](docs/ApiConfig.md) - [ApiServices](docs/ApiServices.md) - [Asset](docs/Asset.md) + - [AuthContext](docs/AuthContext.md) - [AuthenticationKey](docs/AuthenticationKey.md) - [BGPActionData](docs/BGPActionData.md) - [BGPActionRequest](docs/BGPActionRequest.md) @@ -294,6 +302,13 @@ Class | Method | HTTP request | Description - [BulkPortRequest](docs/BulkPortRequest.md) - [Change](docs/Change.md) - [Changelog](docs/Changelog.md) + - [CloudEvent](docs/CloudEvent.md) + - [CloudEventAssetType](docs/CloudEventAssetType.md) + - [CloudEventData](docs/CloudEventData.md) + - [CloudEventFilter](docs/CloudEventFilter.md) + - [CloudEventFilters](docs/CloudEventFilters.md) + - [CloudEventSearchRequest](docs/CloudEventSearchRequest.md) + - [CloudEventSimpleExpression](docs/CloudEventSimpleExpression.md) - [CloudRouter](docs/CloudRouter.md) - [CloudRouterAccessPointState](docs/CloudRouterAccessPointState.md) - [CloudRouterActionRequest](docs/CloudRouterActionRequest.md) @@ -311,6 +326,22 @@ Class | Method | HTTP request | Description - [CloudRouterActionsSearchSortDirection](docs/CloudRouterActionsSearchSortDirection.md) - [CloudRouterChange](docs/CloudRouterChange.md) - [CloudRouterChangeOperation](docs/CloudRouterChangeOperation.md) + - [CloudRouterCommand](docs/CloudRouterCommand.md) + - [CloudRouterCommandPostRequest](docs/CloudRouterCommandPostRequest.md) + - [CloudRouterCommandRequest](docs/CloudRouterCommandRequest.md) + - [CloudRouterCommandRequestConnection](docs/CloudRouterCommandRequestConnection.md) + - [CloudRouterCommandResponse](docs/CloudRouterCommandResponse.md) + - [CloudRouterCommandSearchExpression](docs/CloudRouterCommandSearchExpression.md) + - [CloudRouterCommandSearchFilter](docs/CloudRouterCommandSearchFilter.md) + - [CloudRouterCommandSearchFilters](docs/CloudRouterCommandSearchFilters.md) + - [CloudRouterCommandSearchOrFilter](docs/CloudRouterCommandSearchOrFilter.md) + - [CloudRouterCommandSearchRequest](docs/CloudRouterCommandSearchRequest.md) + - [CloudRouterCommandSearchResponse](docs/CloudRouterCommandSearchResponse.md) + - [CloudRouterCommandSearchSortBy](docs/CloudRouterCommandSearchSortBy.md) + - [CloudRouterCommandSearchSortCriteria](docs/CloudRouterCommandSearchSortCriteria.md) + - [CloudRouterCommandSearchSortDirection](docs/CloudRouterCommandSearchSortDirection.md) + - [CloudRouterCommandState](docs/CloudRouterCommandState.md) + - [CloudRouterCommandType](docs/CloudRouterCommandType.md) - [CloudRouterFilter](docs/CloudRouterFilter.md) - [CloudRouterFilters](docs/CloudRouterFilters.md) - [CloudRouterOrFilter](docs/CloudRouterOrFilter.md) @@ -374,11 +405,13 @@ Class | Method | HTTP request | Description - [FilterBody](docs/FilterBody.md) - [GeoCoordinates](docs/GeoCoordinates.md) - [GeoScopeType](docs/GeoScopeType.md) + - [GetAllCloudRouterCommands](docs/GetAllCloudRouterCommands.md) - [GetAllConnectionRouteAggregationsResponse](docs/GetAllConnectionRouteAggregationsResponse.md) - [GetAllConnectionRouteFiltersResponse](docs/GetAllConnectionRouteFiltersResponse.md) - [GetAllStreamAssetResponse](docs/GetAllStreamAssetResponse.md) - [GetAllStreamResponse](docs/GetAllStreamResponse.md) - [GetAllStreamSubscriptionResponse](docs/GetAllStreamSubscriptionResponse.md) + - [GetCloudEventsByAssetResponse](docs/GetCloudEventsByAssetResponse.md) - [GetResponse](docs/GetResponse.md) - [GetRouteAggregationGetConnectionsResponse](docs/GetRouteAggregationGetConnectionsResponse.md) - [GetRouteAggregationRulesResponse](docs/GetRouteAggregationRulesResponse.md) @@ -436,6 +469,8 @@ Class | Method | HTTP request | Description - [OpEnum](docs/OpEnum.md) - [Operation](docs/Operation.md) - [Order](docs/Order.md) + - [OutputStructuredPing](docs/OutputStructuredPing.md) + - [OutputStructuredPingResponseItem](docs/OutputStructuredPingResponseItem.md) - [PackageChangeLog](docs/PackageChangeLog.md) - [PackageResponse](docs/PackageResponse.md) - [Pagination](docs/Pagination.md) @@ -446,6 +481,7 @@ Class | Method | HTTP request | Description - [PhysicalPortType](docs/PhysicalPortType.md) - [Port](docs/Port.md) - [PortAdditionalInfo](docs/PortAdditionalInfo.md) + - [PortChange](docs/PortChange.md) - [PortChangeOperation](docs/PortChangeOperation.md) - [PortDemarcationPoint](docs/PortDemarcationPoint.md) - [PortDevice](docs/PortDevice.md) @@ -475,6 +511,7 @@ Class | Method | HTTP request | Description - [PortV4SearchRequest](docs/PortV4SearchRequest.md) - [PrecisionTimeChangeOperation](docs/PrecisionTimeChangeOperation.md) - [PrecisionTimeOrder](docs/PrecisionTimeOrder.md) + - [PrecisionTimePackagePostResponse](docs/PrecisionTimePackagePostResponse.md) - [PrecisionTimePackageRequest](docs/PrecisionTimePackageRequest.md) - [PrecisionTimePackageResponse](docs/PrecisionTimePackageResponse.md) - [PrecisionTimePrice](docs/PrecisionTimePrice.md) @@ -497,6 +534,7 @@ Class | Method | HTTP request | Description - [PtpAdvanceConfiguration](docs/PtpAdvanceConfiguration.md) - [RemoveOperation](docs/RemoveOperation.md) - [ReplaceOperation](docs/ReplaceOperation.md) + - [ResourceData](docs/ResourceData.md) - [ResourceSelector](docs/ResourceSelector.md) - [RouteAggregationChangeData](docs/RouteAggregationChangeData.md) - [RouteAggregationChangeDataResponse](docs/RouteAggregationChangeDataResponse.md) diff --git a/equinix-openapi-fabric/api/openapi.yaml b/equinix-openapi-fabric/api/openapi.yaml index c59dcab3..401e26ed 100644 --- a/equinix-openapi-fabric/api/openapi.yaml +++ b/equinix-openapi-fabric/api/openapi.yaml @@ -22,7 +22,7 @@ info: url: https://developer.equinix.com/agreement termsOfService: https://www.equinix.com/about/legal/terms title: Equinix Fabric API v4 - version: "4.20" + version: "4.21" externalDocs: description: Find more information on Equinix Developer Portal url: https://developer.equinix.com @@ -32,6 +32,8 @@ servers: security: - BearerAuth: [] tags: +- description: Cloud Events + name: Cloud Events - description: Cloud Routers name: Cloud Routers - description: Connections @@ -60,13 +62,262 @@ tags: name: Service Tokens - description: Statistics name: Statistics -- description: Stream Subscriptions Beta +- description: Stream Subscriptions name: Stream Alert Rules -- description: Stream Subscriptions Beta +- description: Stream Subscriptions name: Stream Subscriptions -- description: Streams Beta +- description: Streams name: Streams paths: + /fabric/v4/{asset}/{assetId}/cloudevents: + get: + description: This API provides capability to retrieve cloud events of an asset + id + operationId: getCloudEventByAssetId + parameters: + - description: asset + explode: false + in: path + name: asset + required: true + schema: + $ref: '#/components/schemas/CloudEventAssetType' + style: simple + - description: asset UUID + explode: false + in: path + name: assetId + required: true + schema: + $ref: '#/components/schemas/AssetId' + style: simple + - description: Start date and time + explode: true + in: query + name: fromDateTime + required: false + schema: + $ref: '#/components/schemas/StartDateTime' + style: form + - description: End date and time + explode: true + in: query + name: toDateTime + required: false + schema: + $ref: '#/components/schemas/EndDateTime' + style: form + - description: offset + explode: true + in: query + name: offset + required: false + schema: + $ref: '#/components/schemas/Offset' + style: form + - description: limit + explode: true + in: query + name: limit + required: false + schema: + $ref: '#/components/schemas/Limit' + style: form + responses: + "200": + content: + application/json: + examples: + Example: + $ref: '#/components/examples/get-cloud-events-by-asset-id' + value: null + schema: + $ref: '#/components/schemas/GetCloudEventsByAssetResponse' + description: Successful operation + "401": + content: + application/json: + examples: + example: + $ref: '#/components/examples/401' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Unauthorized + "403": + content: + application/json: + examples: + example: + $ref: '#/components/examples/403' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Forbidden + "404": + content: + application/json: + examples: + example: + $ref: '#/components/examples/404' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Not Found + "500": + content: + application/json: + examples: + example: + $ref: '#/components/examples/500' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + summary: Get Cloud Events by Asset Id + tags: + - Cloud Events + x-accepts: application/json + /fabric/v4/cloudevents/{cloudEventId}: + get: + description: This API provides capability to retrieve a cloud event by uuid + operationId: getCloudEvent + parameters: + - description: Cloud Event UUID + explode: false + in: path + name: cloudEventId + required: true + schema: + $ref: '#/components/schemas/CloudEventId' + style: simple + responses: + "200": + content: + application/json: + examples: + CloudEventResponseExample: + $ref: '#/components/examples/get-cloud-event' + value: null + schema: + $ref: '#/components/schemas/CloudEvent' + description: Cloud Event object + "401": + content: + application/json: + examples: + example: + $ref: '#/components/examples/401' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Unauthorized + "403": + content: + application/json: + examples: + example: + $ref: '#/components/examples/403' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Forbidden + "404": + content: + application/json: + examples: + example: + $ref: '#/components/examples/404' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Not Found + "500": + content: + application/json: + examples: + example: + $ref: '#/components/examples/500' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + summary: Get Cloud Event + tags: + - Cloud Events + x-accepts: application/json + /fabric/v4/cloudevents/search: + post: + description: This API provides capability to search cloud events from a filtered + query + operationId: searchCloudEvents + parameters: [] + requestBody: + content: + application/json: + examples: + CloudEventSearchRequestExample: + $ref: '#/components/examples/search-cloud-events' + value: null + schema: + $ref: '#/components/schemas/CloudEventSearchRequest' + required: true + responses: + "200": + content: + application/json: + examples: + Example: + $ref: '#/components/examples/get-cloud-events-by-asset-id' + value: null + schema: + $ref: '#/components/schemas/GetCloudEventsByAssetResponse' + description: Successful operation + "401": + content: + application/json: + examples: + example: + $ref: '#/components/examples/401' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Unauthorized + "403": + content: + application/json: + examples: + example: + $ref: '#/components/examples/403' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Forbidden + "404": + content: + application/json: + examples: + example: + $ref: '#/components/examples/404' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Not Found + "500": + content: + application/json: + examples: + example: + $ref: '#/components/examples/500' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + summary: Search Cloud Events + tags: + - Cloud Events + x-content-type: application/json + x-accepts: application/json /fabric/v4/connections: post: description: This API provides capability to create user's virtual connection @@ -365,7 +616,7 @@ paths: application/json: examples: Colo2Sp: - $ref: '#/components/examples/ConnectionExample' + $ref: '#/components/examples/ConnectionCreateResponse' value: null Colo2Sp-Google: $ref: '#/components/examples/COLO2GoogleSPwithDot1q-Response' @@ -713,6 +964,15 @@ paths: schema: $ref: '#/components/schemas/ConnectionId' style: simple + - description: option to verify that API calls will succeed + explode: true + in: query + name: dryRun + required: false + schema: + default: false + type: boolean + style: form requestBody: content: application/json-patch+json: @@ -735,10 +995,23 @@ paths: ConnectionMigrationAsideRequestForVirtualDevice: $ref: '#/components/examples/ConnectionMigrationAsideVirtualDeviceRequest' value: null + ConnectionUpdateBandwidthRequestDryRun: + $ref: '#/components/examples/ConnectionUpdateBandwidthRequest' + value: null schema: $ref: '#/components/schemas/ConnectionUpdateRequest' required: true responses: + "200": + content: + application/json: + examples: + connectionPatchExampleDryRun: + $ref: '#/components/examples/ConnectionPatchResponseDryRun' + value: null + schema: + $ref: '#/components/schemas/Connection' + description: Successful operation "202": content: application/json: @@ -754,6 +1027,19 @@ paths: operationId: getConnectionByUuid parameters: connectionId: $response.body#/uuid + "400": + content: + application/json: + examples: + example: + $ref: '#/components/examples/400' + value: null + dryRun: + $ref: '#/components/examples/400_dry_run' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Bad request "401": content: application/json: @@ -2719,7 +3005,7 @@ paths: name: startDateTime required: true schema: - $ref: '#/components/schemas/startDateTime' + $ref: '#/components/schemas/StartDateTime' style: form - description: endDateTime example: 2020-11-10T07:00:00Z @@ -2728,7 +3014,7 @@ paths: name: endDateTime required: true schema: - $ref: '#/components/schemas/endDateTime' + $ref: '#/components/schemas/EndDateTime' style: form responses: "200": @@ -2797,7 +3083,7 @@ paths: name: startDateTime required: true schema: - $ref: '#/components/schemas/startDateTime' + $ref: '#/components/schemas/StartDateTime' style: form - description: endDateTime example: 2020-11-10T07:00:00Z @@ -2806,7 +3092,7 @@ paths: name: endDateTime required: true schema: - $ref: '#/components/schemas/endDateTime' + $ref: '#/components/schemas/EndDateTime' style: form - description: viewPoint example: aSide @@ -3602,6 +3888,9 @@ paths: tokenNetworkExample: $ref: '#/components/examples/getServiceToken-Network' value: null + tokenDryRunExample: + $ref: '#/components/examples/getServiceToken-DryRun' + value: null schema: $ref: '#/components/schemas/ServiceToken' description: Successful operation @@ -3612,6 +3901,9 @@ paths: example: $ref: '#/components/examples/400_UUID' value: null + dryRunExample: + $ref: '#/components/examples/400_dry_run' + value: null schema: $ref: '#/components/schemas/ErrorList' description: Bad request @@ -3667,6 +3959,9 @@ paths: tokenNetworkExample: $ref: '#/components/examples/getServiceToken-Network' value: null + tokenDryRunExample: + $ref: '#/components/examples/getServiceToken-DryRun' + value: null schema: $ref: '#/components/schemas/ServiceToken' description: Successful operation @@ -3677,6 +3972,9 @@ paths: example: $ref: '#/components/examples/400_UUID' value: null + dryRunExample: + $ref: '#/components/examples/400_dry_run' + value: null schema: $ref: '#/components/schemas/ErrorList' description: Bad request @@ -3716,6 +4014,15 @@ paths: schema: $ref: '#/components/schemas/ServiceTokenUUID' style: simple + - description: option to verify that API calls will succeed + explode: true + in: query + name: dryRun + required: false + schema: + default: false + type: boolean + style: form requestBody: content: application/json-patch+json: @@ -3738,6 +4045,12 @@ paths: UpdateZsideTokenBandwidth: $ref: '#/components/examples/UpdateZsideTokenBandwidth' value: null + UpdateAsideTokenBandwidthDryRun: + $ref: '#/components/examples/UpdateAsideTokenBandwidth' + value: null + UpdateZsideTokenBandwidthDryRun: + $ref: '#/components/examples/UpdateZsideTokenBandwidth' + value: null schema: $ref: '#/components/schemas/ServiceTokenUpdateRequest' required: true @@ -3755,6 +4068,9 @@ paths: tokenNetworkExample: $ref: '#/components/examples/getServiceToken-Network' value: null + tokenDryRunExample: + $ref: '#/components/examples/getServiceToken-DryRun' + value: null schema: $ref: '#/components/schemas/ServiceToken' description: Successful operation @@ -3765,6 +4081,9 @@ paths: example: $ref: '#/components/examples/400_UUID' value: null + dryRunExample: + $ref: '#/components/examples/400_dry_run' + value: null schema: $ref: '#/components/schemas/ErrorList' description: Bad request @@ -9631,12 +9950,10 @@ paths: tags: - Cloud Routers x-accepts: application/json - /fabric/v4/routers/{routerId}/routes/search: - post: - description: "The API provides capability to get list of user's Fabric Cloud\ - \ Router route table entries using search criteria, including optional filtering,\ - \ pagination and sorting" - operationId: searchCloudRouterRoutes + /fabric/v4/routers/{routerId}/commands: + get: + description: This API provides capability to fetch all commands + operationId: getAllCloudRouterCommands parameters: - description: Router UUID explode: false @@ -9646,41 +9963,23 @@ paths: schema: $ref: '#/components/schemas/RouterId_1' style: simple - requestBody: - content: - application/json: - examples: - SearchFilterByNextHop: - $ref: '#/components/examples/SearchFilterByNextHop' - value: null - SearchFilterByPrefix: - $ref: '#/components/examples/SearchFilterByPrefix' - value: null - SearchFilterByType: - $ref: '#/components/examples/SearchFilterByType' - value: null - SearchFilterByStatus: - $ref: '#/components/examples/SearchFilterByStatus' - value: null - SearchFilterOrAnd: - $ref: '#/components/examples/SearchFilterOrAnd' - value: null - schema: - $ref: '#/components/schemas/RouteTableEntrySearchRequest' - required: true responses: "200": content: application/json: + examples: + getAllCommandsExample: + $ref: '#/components/examples/GetAllPingCommandResponse' + value: null schema: - $ref: '#/components/schemas/RouteTableEntrySearchResponse' + $ref: '#/components/schemas/GetAllCloudRouterCommands' description: Successful operation "400": content: application/json: examples: example: - $ref: '#/components/examples/400_invalid_sorting' + $ref: '#/components/examples/400_invalid_operation_commands' value: null schema: $ref: '#/components/schemas/ErrorList' @@ -9700,7 +9999,7 @@ paths: application/json: examples: example: - $ref: '#/components/examples/403' + $ref: '#/components/examples/403_commands' value: null schema: $ref: '#/components/schemas/ErrorList' @@ -9710,7 +10009,7 @@ paths: application/json: examples: example: - $ref: '#/components/examples/404' + $ref: '#/components/examples/404_commands' value: null schema: $ref: '#/components/schemas/ErrorList' @@ -9720,7 +10019,7 @@ paths: application/json: examples: example: - $ref: '#/components/examples/415' + $ref: '#/components/examples/415_commands' value: null schema: $ref: '#/components/schemas/ErrorList' @@ -9730,111 +10029,153 @@ paths: application/json: examples: example: - $ref: '#/components/examples/500' + $ref: '#/components/examples/500_commands' value: null schema: $ref: '#/components/schemas/ErrorList' description: Internal server error - summary: Search Route Table + summary: Get Commands tags: - Cloud Routers - x-content-type: application/json x-accepts: application/json - /fabric/v4/routers/{routerId}/validate: post: - description: This API provides capability to validate all subnets associated - with any connection in the given FCR - operationId: validateRoutingProtocol + description: This API provides capability to initiate Command + operationId: createCloudRouterCommand parameters: - - description: Cloud Router UUID + - description: Router UUID explode: false in: path name: routerId required: true schema: - $ref: '#/components/schemas/RouterId' + $ref: '#/components/schemas/RouterId_1' style: simple requestBody: content: application/json: examples: - ValidateDirectIpv4: - $ref: '#/components/examples/Request-direct-ipv4' - value: null - ValidateDirectIpv6: - $ref: '#/components/examples/Request-direct-ipv6' + InitiatePingCommand: + $ref: '#/components/examples/PostRequestPingCommand' value: null schema: - $ref: '#/components/schemas/ValidateRequest' + $ref: '#/components/schemas/CloudRouterCommandPostRequest' required: true responses: - "200": + "202": content: application/json: examples: - ValidateSubnet: - $ref: '#/components/examples/Response-200' + initiateCommandsExample: + $ref: '#/components/examples/PostResponsePingCommand' value: null schema: - $ref: '#/components/schemas/ValidateSubnetResponse' + $ref: '#/components/schemas/CloudRouterCommand' description: Successful operation "400": content: application/json: examples: - Bad Request: - $ref: '#/components/examples/error-400' - value: null - Subnet Overlapping: - $ref: '#/components/examples/error-400-overlappingSubnet' + example: + $ref: '#/components/examples/400_invalid_operation_commands' value: null schema: $ref: '#/components/schemas/ErrorList' description: Bad request - summary: Validate Subnet + "401": + content: + application/json: + examples: + example: + $ref: '#/components/examples/401' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Unauthorized + "403": + content: + application/json: + examples: + example: + $ref: '#/components/examples/403_commands' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Forbidden + "404": + content: + application/json: + examples: + example: + $ref: '#/components/examples/404_commands' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Not Found + "415": + content: + application/json: + examples: + example: + $ref: '#/components/examples/415_commands' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + "500": + content: + application/json: + examples: + example: + $ref: '#/components/examples/500_commands' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + summary: Initiate Command tags: - - Routing Protocols + - Cloud Routers x-content-type: application/json x-accepts: application/json - /fabric/v4/routers/search: + /fabric/v4/routers/{routerId}/commands/search: post: - description: "The API provides capability to get list of user's Cloud Routers\ - \ using search criteria, including optional filtering, pagination and sorting" - operationId: searchCloudRouters - parameters: [] + description: This API provides capability to search commands + operationId: searchCloudRouterCommands + parameters: + - description: Router UUID + explode: false + in: path + name: routerId + required: true + schema: + $ref: '#/components/schemas/RouterId_1' + style: simple requestBody: content: application/json: examples: - SearchFilterByStatus: - $ref: '#/components/examples/SearchFilterByStatus' - value: null - SearchFilterByNameAndMetroName: - $ref: '#/components/examples/SearchFilterByNameAndMetroName' - value: null - SearchFilterOrAnd: - $ref: '#/components/examples/SearchFilterOrAnd' + SearchByState: + $ref: '#/components/examples/SearchByStateRequest' value: null schema: - $ref: '#/components/schemas/CloudRouterSearchRequest' + $ref: '#/components/schemas/CloudRouterCommandSearchRequest' required: true responses: "200": content: application/json: examples: - Example: - $ref: '#/components/examples/search-example' + searchCommandsExample: + $ref: '#/components/examples/SearchResponse' value: null schema: - $ref: '#/components/schemas/SearchResponse' + $ref: '#/components/schemas/CloudRouterCommandSearchResponse' description: Successful operation "400": content: application/json: examples: example: - $ref: '#/components/examples/400_invalid_sorting' + $ref: '#/components/examples/400_invalid_sorting_commands' value: null schema: $ref: '#/components/schemas/ErrorList' @@ -9854,70 +10195,81 @@ paths: application/json: examples: example: - $ref: '#/components/examples/403' + $ref: '#/components/examples/403_commands' value: null schema: $ref: '#/components/schemas/ErrorList' description: Forbidden + "404": + content: + application/json: + examples: + example: + $ref: '#/components/examples/404_commands' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Not Found "415": content: application/json: examples: example: - $ref: '#/components/examples/415' + $ref: '#/components/examples/415_commands' value: null schema: $ref: '#/components/schemas/ErrorList' - description: Unsupported Media Type + description: Internal server error "500": content: application/json: examples: example: - $ref: '#/components/examples/500' + $ref: '#/components/examples/500_commands' value: null schema: $ref: '#/components/schemas/ErrorList' description: Internal server error - summary: Search Routers + summary: Search Commands tags: - Cloud Routers x-content-type: application/json x-accepts: application/json - /fabric/v4/routerPackages: - get: - description: This API provides capability to retrieve user's Cloud Routers Packages - operationId: getCloudRouterPackages + /fabric/v4/routers/{routerId}/commands/{commandId}: + delete: + description: This API provides capability to delete command based on command + Id + operationId: deleteCloudRouterCommandByUuid parameters: - - description: offset - example: 1 - explode: true - in: query - name: offset - required: false + - description: Router UUID + explode: false + in: path + name: routerId + required: true schema: - type: integer - style: form - - description: number of records to fetch - example: 10 - explode: true - in: query - name: limit - required: false + $ref: '#/components/schemas/RouterId_1' + style: simple + - description: Command UUID + explode: false + in: path + name: commandId + required: true schema: - type: integer - style: form + $ref: '#/components/schemas/CommandId' + style: simple responses: - "200": + "204": + description: Deleted command successfully + "400": content: application/json: examples: - Example: - $ref: '#/components/examples/ListFCRPackagesResponse' + example: + $ref: '#/components/examples/400_invalid_state_commands' value: null schema: - $ref: '#/components/schemas/PackageResponse' - description: Fabric Cloud Router Packages + $ref: '#/components/schemas/ErrorList' + description: Bad request "401": content: application/json: @@ -9933,71 +10285,497 @@ paths: application/json: examples: example: - $ref: '#/components/examples/403' + $ref: '#/components/examples/403_commands' value: null schema: $ref: '#/components/schemas/ErrorList' description: Forbidden - "415": + "404": content: application/json: examples: example: - $ref: '#/components/examples/415' + $ref: '#/components/examples/404_commands' value: null schema: $ref: '#/components/schemas/ErrorList' - description: Unsupported Media Type + description: Not Found "500": content: application/json: examples: example: - $ref: '#/components/examples/500' + $ref: '#/components/examples/500_commands' value: null schema: $ref: '#/components/schemas/ErrorList' description: Internal server error - summary: List Packages + summary: Delete Command tags: - Cloud Routers x-accepts: application/json - /fabric/v4/routerPackages/{routerPackageCode}: get: - description: This API provides capability to retrieve user's Cloud Routers Package - Details - operationId: getCloudRouterPackageByCode + description: This API provides capability to fetch command using command Id + operationId: getCloudRouterCommand parameters: - - description: Equinix-assigned Cloud Router package identifier + - description: Router UUID explode: false in: path - name: routerPackageCode + name: routerId required: true schema: - $ref: '#/components/schemas/RouterPackageCode' + $ref: '#/components/schemas/RouterId_1' + style: simple + - description: Command UUID + explode: false + in: path + name: commandId + required: true + schema: + $ref: '#/components/schemas/CommandId' style: simple responses: "200": content: application/json: + examples: + getCommandExample: + $ref: '#/components/examples/GetResponsePingCommand' + value: null schema: - $ref: '#/components/schemas/CloudRouterPackage' - description: Fabric Cloud Router Package details + $ref: '#/components/schemas/CloudRouterCommand' + description: Successful operation "400": content: application/json: examples: - invalidPackage: - $ref: '#/components/examples/400_invalid_package' + example: + $ref: '#/components/examples/400_invalid_operation_commands' value: null - invalidName: - $ref: '#/components/examples/400_invalid_name' + schema: + $ref: '#/components/schemas/ErrorList' + description: Bad request + "401": + content: + application/json: + examples: + example: + $ref: '#/components/examples/401' value: null - invalidAccount: - $ref: '#/components/examples/400_invalid_account' + schema: + $ref: '#/components/schemas/ErrorList' + description: Unauthorized + "403": + content: + application/json: + examples: + example: + $ref: '#/components/examples/403_commands' value: null - maxLabFcrReached: - $ref: '#/components/examples/400_max_lab_fcr_demo' + schema: + $ref: '#/components/schemas/ErrorList' + description: Forbidden + "404": + content: + application/json: + examples: + example: + $ref: '#/components/examples/404_commands' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Not Found + "415": + content: + application/json: + examples: + example: + $ref: '#/components/examples/415_commands' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + "500": + content: + application/json: + examples: + example: + $ref: '#/components/examples/500_commands' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + summary: Get Command + tags: + - Cloud Routers + x-accepts: application/json + /fabric/v4/routers/{routerId}/routes/search: + post: + description: "The API provides capability to get list of user's Fabric Cloud\ + \ Router route table entries using search criteria, including optional filtering,\ + \ pagination and sorting" + operationId: searchCloudRouterRoutes + parameters: + - description: Router UUID + explode: false + in: path + name: routerId + required: true + schema: + $ref: '#/components/schemas/RouterId_1' + style: simple + requestBody: + content: + application/json: + examples: + SearchFilterByNextHop: + $ref: '#/components/examples/SearchFilterByNextHop' + value: null + SearchFilterByPrefix: + $ref: '#/components/examples/SearchFilterByPrefix' + value: null + SearchFilterByType: + $ref: '#/components/examples/SearchFilterByType' + value: null + SearchFilterByStatus: + $ref: '#/components/examples/SearchFilterByStatus' + value: null + SearchFilterOrAnd: + $ref: '#/components/examples/SearchFilterOrAnd' + value: null + schema: + $ref: '#/components/schemas/RouteTableEntrySearchRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RouteTableEntrySearchResponse' + description: Successful operation + "400": + content: + application/json: + examples: + example: + $ref: '#/components/examples/400_invalid_sorting' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Bad request + "401": + content: + application/json: + examples: + example: + $ref: '#/components/examples/401' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Unauthorized + "403": + content: + application/json: + examples: + example: + $ref: '#/components/examples/403' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Forbidden + "404": + content: + application/json: + examples: + example: + $ref: '#/components/examples/404' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Not Found + "415": + content: + application/json: + examples: + example: + $ref: '#/components/examples/415' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + "500": + content: + application/json: + examples: + example: + $ref: '#/components/examples/500' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + summary: Search Route Table + tags: + - Cloud Routers + x-content-type: application/json + x-accepts: application/json + /fabric/v4/routers/{routerId}/validate: + post: + description: This API provides capability to validate all subnets associated + with any connection in the given FCR + operationId: validateRoutingProtocol + parameters: + - description: Cloud Router UUID + explode: false + in: path + name: routerId + required: true + schema: + $ref: '#/components/schemas/RouterId' + style: simple + requestBody: + content: + application/json: + examples: + ValidateDirectIpv4: + $ref: '#/components/examples/Request-direct-ipv4' + value: null + ValidateDirectIpv6: + $ref: '#/components/examples/Request-direct-ipv6' + value: null + schema: + $ref: '#/components/schemas/ValidateRequest' + required: true + responses: + "200": + content: + application/json: + examples: + ValidateSubnet: + $ref: '#/components/examples/Response-200' + value: null + schema: + $ref: '#/components/schemas/ValidateSubnetResponse' + description: Successful operation + "400": + content: + application/json: + examples: + Bad Request: + $ref: '#/components/examples/error-400' + value: null + Subnet Overlapping: + $ref: '#/components/examples/error-400-overlappingSubnet' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Bad request + summary: Validate Subnet + tags: + - Routing Protocols + x-content-type: application/json + x-accepts: application/json + /fabric/v4/routers/search: + post: + description: "The API provides capability to get list of user's Cloud Routers\ + \ using search criteria, including optional filtering, pagination and sorting" + operationId: searchCloudRouters + parameters: [] + requestBody: + content: + application/json: + examples: + SearchFilterByStatus: + $ref: '#/components/examples/SearchFilterByStatus' + value: null + SearchFilterByNameAndMetroName: + $ref: '#/components/examples/SearchFilterByNameAndMetroName' + value: null + SearchFilterOrAnd: + $ref: '#/components/examples/SearchFilterOrAnd' + value: null + schema: + $ref: '#/components/schemas/CloudRouterSearchRequest' + required: true + responses: + "200": + content: + application/json: + examples: + Example: + $ref: '#/components/examples/search-example' + value: null + schema: + $ref: '#/components/schemas/SearchResponse' + description: Successful operation + "400": + content: + application/json: + examples: + example: + $ref: '#/components/examples/400_invalid_sorting' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Bad request + "401": + content: + application/json: + examples: + example: + $ref: '#/components/examples/401' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Unauthorized + "403": + content: + application/json: + examples: + example: + $ref: '#/components/examples/403' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Forbidden + "415": + content: + application/json: + examples: + example: + $ref: '#/components/examples/415' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Unsupported Media Type + "500": + content: + application/json: + examples: + example: + $ref: '#/components/examples/500' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + summary: Search Routers + tags: + - Cloud Routers + x-content-type: application/json + x-accepts: application/json + /fabric/v4/routerPackages: + get: + description: This API provides capability to retrieve user's Cloud Routers Packages + operationId: getCloudRouterPackages + parameters: + - description: offset + example: 1 + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: number of records to fetch + example: 10 + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + examples: + Example: + $ref: '#/components/examples/ListFCRPackagesResponse' + value: null + schema: + $ref: '#/components/schemas/PackageResponse' + description: Fabric Cloud Router Packages + "401": + content: + application/json: + examples: + example: + $ref: '#/components/examples/401' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Unauthorized + "403": + content: + application/json: + examples: + example: + $ref: '#/components/examples/403' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Forbidden + "415": + content: + application/json: + examples: + example: + $ref: '#/components/examples/415' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Unsupported Media Type + "500": + content: + application/json: + examples: + example: + $ref: '#/components/examples/500' + value: null + schema: + $ref: '#/components/schemas/ErrorList' + description: Internal server error + summary: List Packages + tags: + - Cloud Routers + x-accepts: application/json + /fabric/v4/routerPackages/{routerPackageCode}: + get: + description: This API provides capability to retrieve user's Cloud Routers Package + Details + operationId: getCloudRouterPackageByCode + parameters: + - description: Equinix-assigned Cloud Router package identifier + explode: false + in: path + name: routerPackageCode + required: true + schema: + $ref: '#/components/schemas/RouterPackageCode' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CloudRouterPackage' + description: Fabric Cloud Router Package details + "400": + content: + application/json: + examples: + invalidPackage: + $ref: '#/components/examples/400_invalid_package' + value: null + invalidName: + $ref: '#/components/examples/400_invalid_name' + value: null + invalidAccount: + $ref: '#/components/examples/400_invalid_account' + value: null + maxLabFcrReached: + $ref: '#/components/examples/400_max_lab_fcr_demo' value: null schema: $ref: '#/components/schemas/ErrorList' @@ -10183,14 +10961,41 @@ paths: content: application/json: examples: - CreateGlobalNetwork: - $ref: '#/components/examples/CreateGlobalNetwork' + Create-Global-EVPLAN-Network: + $ref: '#/components/examples/Create-Global-EVPLAN-Network' + value: null + Create-Regional-EVPLAN-Network: + $ref: '#/components/examples/Create-Regional-EVPLAN-Network' + value: null + Create-Local-EVPLAN-Network: + $ref: '#/components/examples/Create-Local-EVPLAN-Network' value: null - CreateRegionalNetwork: - $ref: '#/components/examples/CreateRegionalNetwork' + Create-Global-EPLAN-Network: + $ref: '#/components/examples/Create-Global-EPLAN-Network' value: null - CreateLocalNetwork: - $ref: '#/components/examples/CreateLocalNetwork' + Create-Regional-EPLAN-Network: + $ref: '#/components/examples/Create-Regional-EPLAN-Network' + value: null + Create-Local-EPLAN-Network: + $ref: '#/components/examples/Create-Local-EPLAN-Network' + value: null + Create-Global-EVPTREE-Network: + $ref: '#/components/examples/Create-Global-EVPTREE-Network' + value: null + Create-Regional-EVPTREE-Network: + $ref: '#/components/examples/Create-Regional-EVPTREE-Network' + value: null + Create-Local-EVPTREE-Network: + $ref: '#/components/examples/Create-Local-EVPTREE-Network' + value: null + Create-Global-EPTREE-Network: + $ref: '#/components/examples/Create-Global-EPTREE-Network' + value: null + Create-Regional-EPTREE-Network: + $ref: '#/components/examples/Create-Regional-EPTREE-Network' + value: null + Create-Local-EPTREE-Network: + $ref: '#/components/examples/Create-Local-EPTREE-Network' value: null NetworkDryRunCreate: $ref: '#/components/examples/CreateNetworkDryRunResponse' @@ -10199,10 +11004,46 @@ paths: $ref: '#/components/schemas/NetworkPostRequest' required: true responses: - "200": + "201": content: application/json: examples: + EVPLAN-Global-Network: + $ref: '#/components/examples/Create-Global-EVPLAN-Network-Response' + value: null + EVPLAN-Regional-Network: + $ref: '#/components/examples/Create-Regional-EVPLAN-Network-Response' + value: null + EVPLAN-Local-Network: + $ref: '#/components/examples/Create-Local-EVPLAN-Network-Response' + value: null + EPLAN-Global-Network: + $ref: '#/components/examples/Create-Global-EPLAN-Network-Response' + value: null + EPLAN-Regional-Network: + $ref: '#/components/examples/Create-Regional-EPLAN-Network-Response' + value: null + EPLAN-Local-Network: + $ref: '#/components/examples/Create-Local-EPLAN-Network-Response' + value: null + EVPTREE-Global-Network: + $ref: '#/components/examples/Create-Global-EVPTREE-Network-Response' + value: null + EVPTREE-Regional-Network: + $ref: '#/components/examples/Create-Regional-EVPTREE-Network-Response' + value: null + EVPTREE-Local-Network: + $ref: '#/components/examples/Create-Local-EVPTREE-Network-Response' + value: null + EPTREE-Global-Network: + $ref: '#/components/examples/Create-Global-EPTREE-Network-Response' + value: null + EPTREE-Regional-Network: + $ref: '#/components/examples/Create-Regional-EPTREE-Network-Response' + value: null + EPTREE-Local-Network: + $ref: '#/components/examples/Create-Local-EPTREE-Network-Response' + value: null networkDryRun: $ref: '#/components/examples/CreateNetworkDryRunResponse' value: null @@ -12488,7 +13329,7 @@ paths: name: assetId required: true schema: - $ref: '#/components/schemas/AssetId' + $ref: '#/components/schemas/AssetId_1' style: simple - description: asset explode: false @@ -12578,7 +13419,7 @@ paths: name: assetId required: true schema: - $ref: '#/components/schemas/AssetId' + $ref: '#/components/schemas/AssetId_1' style: simple - description: asset explode: false @@ -12667,7 +13508,7 @@ paths: name: assetId required: true schema: - $ref: '#/components/schemas/AssetId' + $ref: '#/components/schemas/AssetId_1' style: simple - description: asset explode: false @@ -13807,14 +14648,16 @@ components: correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 "403": value: - - errorCode: EQ-3142402 - errorMessage: Do not have create connection permission on this port - correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + - errorCode: EQ-3040047 + errorMessage: Operation not allowed + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + details: Operation not allowed for current user "404": value: - - errorCode: EQ-3000036 - errorMessage: Requested path doesn't exists - correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + - errorCode: EQ-3040020 + errorMessage: uuid not found + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + details: uuid not found "405": value: - errorCode: EQ-3142569 @@ -13832,11 +14675,135 @@ components: reason: The payload format is in an unsupported format "500": value: - - errorCode: EQ-3034003 - errorMessage: "Method not supported,Please check the URL passed" + - errorCode: EQ-3040030 + errorMessage: Internal Server Error correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 - additionalInfo: - - reason: method:PATCH + details: Internal Server Error + get-cloud-events-by-asset-id: + value: + pagination: + offset: 20 + limit: 10 + total: 3 + next: null + previous: null + data: + - specversion: "1.0" + source: https://api.equinix.com/fabric/v4/events + id: 66c62c1a-f186-4fbd-9792-71a60705518f + time: 2025-03-20T13:13:12Z + type: equinix.fabric.connection.bgpipv4_session_status.connect + subject: /fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9/routingProtocol/e92cdf09-59eb-4131-ade4-49a87dc816dc + dataschema: https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json + datacontenttype: application/json + severitynumber: 5 + severitytext: INFO + equinixproject: dadd3ab6-c0af-430c-8216-43d44f08c1c5 + authtype: system + authid: equinix + data: + message: Neighbor 100.100.100.102 address session state changed to Connect + auth: + type: system + id: equinix + - specversion: "1.0" + source: https://api.equinix.com/fabric/v4/cloudevents + id: 66c62c1a-f186-4fbd-9792-71a60705518f + type: equinix.fabric.connection.state.provisioning + subject: /fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9 + time: 2025-03-20T13:13:12Z + dataschema: https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json + datacontenttype: application/json + severitynumber: 9 + severitytext: INFO + equinixproject: dadd3ab6-c0af-430c-8216-43d44f08c1c5 + authtype: user + authid: 123456 + data: + message: Connection named TEST-CONNECTION state changed to provisioning + resource: + href: http://api.corp.equinix.com/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9 + uuid: dab9fc84-cc95-4cb4-abe3-ca39361285a9 + type: IP_VC + name: TEST-CONNECTION + state: PROVISIONING + auth: + type: user + id: 123456 + name: test user + email: testuser@test.com + - specversion: "1.0" + source: https://api.equinix.com/fabric/v4/cloudevents + id: 66c62c1a-f186-4fbd-9792-71a60705518f + type: equinix.fabric.connection.state.provisioned + subject: /fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9 + time: 2025-03-20T13:13:12Z + dataschema: https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json + datacontenttype: application/json + severitynumber: 9 + severitytext: INFO + equinixproject: dadd3ab6-c0af-430c-8216-43d44f08c1c5 + authtype: system + authid: equinix + data: + message: Connection named TEST-CONNECTION state changed to provisioned + resource: + href: http://api.corp.equinix.com/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9 + uuid: dab9fc84-cc95-4cb4-abe3-ca39361285a9 + type: IP_VC + name: TEST-CONNECTION + state: PROVISIONED + auth: + type: system + id: equinix + get-cloud-event: + value: + specversion: "1.0" + source: https://api.equinix.com/fabric/v4/cloudevents + id: 66c62c1a-f186-4fbd-9792-71a60705518f + type: equinix.fabric.connection.state.provisioning + subject: /fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9 + time: 2025-03-20T13:13:12Z + dataschema: https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json + datacontenttype: application/json + severitynumber: 9 + severitytext: INFO + equinixproject: dadd3ab6-c0af-430c-8216-43d44f08c1c5 + authtype: user + authid: 123456 + data: + message: Connection named TEST-CONNECTION state changed to provisioning + resource: + href: http://api.corp.equinix.com/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9 + uuid: dab9fc84-cc95-4cb4-abe3-ca39361285a9 + type: IP_VC + name: TEST-CONNECTION + state: PROVISIONING + auth: + type: user + id: 123456 + name: test user + email: testuser@test.com + search-cloud-events: + value: + filter: + and: + - property: /type + operator: IN + values: + - equinix.fabric.port.status.* + - property: /subject + operator: IN + values: + - /fabric/v4/ports/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d* + - /fabric/v4/ports/c8bba3be-5132-4669-bb47-7f1a8811359b* + - property: /time + operator: '>' + values: + - 2018-04-05T17:31:00.000Z + pagination: + offset: 0 + limit: 20 COLO2COLOwithDot1q-Dot1q: value: type: EVPL_VC @@ -16293,7 +17260,7 @@ components: - type: ALL emails: - test@test.com - ConnectionExample: + ConnectionCreateResponse: value: href: https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62 type: EVPL_VC @@ -16325,8 +17292,8 @@ components: metroHref: https://api.equinix.com/fabric/v4/metros/MX metroCode: MX operation: - providerStatus: AVAILABLE - equinixStatus: PROVISIONED + providerStatus: PROVISIONING + equinixStatus: PROVISIONING changeLog: createdDateTime: 2020-05-21T10:30:00Z COLO2GoogleSPwithDot1q-Response: @@ -16818,8 +17785,8 @@ components: type: DOT1Q vlanTag: 1001 operation: - equinixStatus: PROVISIONING - providerStatus: PROVISIONING + equinixStatus: PENDING_INTERFACE_CONFIGURATION + providerStatus: NOT_AVAILABLE notifications: - type: ALL emails: @@ -19567,6 +20534,57 @@ components: interface: type: CLOUD id: 4 + ConnectionPatchResponseDryRun: + value: + href: https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62 + type: EVPL_VC + uuid: 3a58dd05-f46d-4b1d-a154-2e85c396ea62 + name: My-Layer2-Connection-2 + bandwidth: 1000 + direction: OUTGOING + isRemote: true + redundancy: + group: 66c10a60-789e-4b25-b85c-7eb225a4c344 + priority: PRIMARY + aSide: + accessPoint: + type: COLO + port: + href: https://api.equinix.com/fabric/v4/ports/a00cef6f-8e35-4794-9ff9-665e084e4e6d + uuid: a00cef6f-8e35-4794-9ff9-665e084e4e6d + linkProtocol: + type: DOT1Q + vlanTag: 1001 + zSide: + accessPoint: + type: SP + profile: + href: https://api.equinix.com/fabric/v4/serviceProfiles/22d4e853-ef33-4ff0-b5b2-a2b1d5dfa50c + uuid: 22d4e853-ef33-4ff0-b5b2-a2b1d5dfa50c + type: L2_PROFILE + location: + metroHref: https://api.equinix.com/fabric/v4/metros/MX + metroCode: MX + linkProtocol: + type: DOT1Q + vlanTag: 1001 + operation: + providerStatus: PROVISIONED + equinixStatus: PROVISIONED + change: + type: CONNECTION_UPDATE + status: APPROVED + createdDateTime: 2021-12-12T06:00:01.183Z + data: + op: replace + path: /aSide/accessPoint/port/uuid + value: c791f8cb-58f9-8f90-8ce0-306a5c00a4ee + changeLog: + createdDateTime: 2020-04-21T10:30:00Z + account: + accountNumber: 270001 + orgId: 91997 + globalOrgId: 3453453cccc ConnectionPatchResponse: value: href: https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62 @@ -19854,11 +20872,11 @@ components: RoutingProtocolCreateBGPResponse: value: href: https://api.equinix.com/fabric/v4/connections/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170/routingProtocols/557400f8-d360-11e9-bb65-2a2ae2dbcce4 - uuid: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 state: PROVISIONING change: - uuid: 3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 href: https://api.equinix.com/fabric/v4/connections/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170/routingProtocols/557400f8-d360-11e9-bb65-2a2ae2dbcce4/changes/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 + uuid: 3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 type: ROUTING_PROTOCOL_CREATION changelog: createdBy: abc@xyz.com @@ -22947,6 +23965,40 @@ components: createdDateTime: 2021-03-18T06:43:49.980Z updatedBy: "843577" updatedDateTime: 2021-03-18T06:44:14.206Z + getServiceToken-DryRun: + value: + href: https://api.equinix.com/fabric/v4/serviceTokens/ea40918e-9b39-4045-8be8-0beaa7eb5ce1 + type: VC_TOKEN + uuid: ea40918e-9b39-4045-8be8-0beaa7eb5ce1 + name: My-Token + state: INACTIVE + expiryDateTime: 2020-05-31T10:30:00Z + connection: + type: EVPL_VC + bandwidthLimit: 100 + allowRemoteConnection: false + allowCustomBandwidth: false + aSide: + accessPointSelectors: + - type: COLO + port: + href: http://api.equinix.com/fabric/v4/ports/b840a1db-5758-758f-97e0-328a5c00a874 + type: XF_PORT + uuid: b840a1db-5758-758f-97e0-328a5c00a874 + linkProtocol: + type: QINQ + vlanCTag: 1399 + vlanSTag: 1388 + account: + orgId: 111437 + notifications: + - type: NOTIFICATION + emails: + - user1@example.com + - user2@example.com + changeLog: + createdBy: 843577 + createdDateTime: 2020-05-21T10:30:00Z "400_UUID": value: - errorCode: EQ-3034016 @@ -26547,6 +27599,294 @@ components: correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec additionalInfo: - reason: Only accept DESC and ASC for sorting direction. + GetAllPingCommandResponse: + value: + pagination: + offset: 20 + limit: 20 + total: 100 + next: /search?offset=40&limit=20 + previous: /search?offset=0&limit=20 + data: + href: https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00 + type: PING_COMMAND + uuid: 37c10edc-ba2e-4240-a850-8a48f9c47d00 + name: ping-test-1 + description: Testing FCR-SV-1 + state: SUCCEEDED + project: + projectId: b11d4cb5-978a-418a-8b13-bf19abb97938 + request: + destination: 8.8.8.8 + sourceConnection: + uuid: 1da3778c-6aa3-4e47-b2fe-83a0773dde18 + timeout: 5 + dataBytes: 100 + count: 5 + interval: 1000 + response: + output: "PING 8.8.8.8 (8.8.8.8): 100 data bytes\n108 bytes from 8.8.8.8:\ + \ icmp_seq=0 ttl=117 time=9.839 ms\n108 bytes from 8.8.8.8: icmp_seq=1\ + \ ttl=117 time=16.051 ms\n108 bytes from 8.8.8.8: icmp_seq=2 ttl=117\ + \ time=9.271 ms\n108 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=26.771\ + \ ms \n--- 8.8.8.8 ping statistics ---\n4 packets transmitted, 4 packets\ + \ received, 0.0% packet loss\nround-trip min/avg/max/stddev = 9.271/15.483/26.771/7.039\ + \ ms" + outputStructuredPing: + destinationIp: 8.8.8.8 + destinationName: 8.8.8.8 + dataBytes: 100 + packetsTransmitted: 4 + packetsReceived: 4 + packetsLossPercent: 0 + rttMin: 9.271 + rttAvg: 15.483 + rttMax: 26.771 + rttStdDev: 7.039 + responses: + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 0 + ttl: 117 + time: 9.839 + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 1 + ttl: 117 + time: 16.051 + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 2 + ttl: 117 + time: 9.271 + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 3 + ttl: 117 + time: 26.771 + changeLog: + createdBy: testuser + createdDateTime: 2020-05-21T10:30:00Z + "400_invalid_operation_commands": + value: + - errorCode: EQ-3043002 + errorMessage: Invalid argument passed + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + details: Invalid argument passed + "403_commands": + value: + - errorCode: EQ-3043006 + errorMessage: The system is unable to process your request. + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + details: The system is unable to process your request. + "404_commands": + value: + - errorCode: EQ-3043022 + errorMessage: Cloud router command not found + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + details: Cloud router command not found + "415_commands": + value: + - errorCode: EQ-3043029 + errorMessage: Unsupported media type + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + details: Content type application/json not supported. + "500_commands": + value: + - errorCode: EQ-3043005 + errorMessage: Internal server error + correlationId: cebc3d33-9037-4a2b-a7af-0ad65602cdec + details: Internal server error + PostRequestPingCommand: + value: + type: PING_COMMAND + name: ping-test-1 + description: Testing FCR-SV-1 + project: + projectId: b11d4cb5-978a-418a-8b13-bf19abb97938 + request: + destination: 8.8.8.8 + sourceConnection: + uuid: 1da3778c-6aa3-4e47-b2fe-83a0773dde18 + timeout: 2 + dataBytes: 100 + PostResponsePingCommand: + value: + href: https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00 + type: PING_COMMAND + uuid: 37c10edc-ba2e-4240-a850-8a48f9c47d00 + name: ping-test-1 + description: Testing FCR-SV-1 + state: PENDING + project: + projectId: b11d4cb5-978a-418a-8b13-bf19abb97938 + request: + destination: 8.8.8.8 + sourceConnection: + uuid: 1da3778c-6aa3-4e47-b2fe-83a0773dde18 + timeout: 2 + dataBytes: 100 + count: 5 + interval: 1000 + changeLog: + createdBy: testuser + createdDateTime: 2020-05-21T10:30:00Z + SearchByStateRequest: + value: + filter: + and: + - property: /state + operator: = + values: + - SUCCEEDED + pagination: + offset: 0 + limit: 20 + sort: + - direction: DESC + property: /changeLog/createdDateTime + SearchResponse: + value: + pagination: + offset: 20 + limit: 20 + total: 100 + next: /search?offset=40&limit=20 + previous: /search?offset=0&limit=20 + data: + href: https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00 + type: PING_COMMAND + uuid: 37c10edc-ba2e-4240-a850-8a48f9c47d00 + name: ping-test-1 + description: Testing FCR-SV-1 + state: SUCCEEDED + project: + projectId: b11d4cb5-978a-418a-8b13-bf19abb97938 + request: + destination: 8.8.8.8 + sourceConnection: + uuid: 1da3778c-6aa3-4e47-b2fe-83a0773dde18 + timeout: 2 + dataBytes: 100 + count: 5 + interval: 1000 + response: + output: "PING 8.8.8.8 (8.8.8.8): 100 data bytes\n108 bytes from 8.8.8.8:\ + \ icmp_seq=0 ttl=117 time=9.839 ms\n108 bytes from 8.8.8.8: icmp_seq=1\ + \ ttl=117 time=16.051 ms\n108 bytes from 8.8.8.8: icmp_seq=2 ttl=117\ + \ time=9.271 ms\n108 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=26.771\ + \ ms \n--- 8.8.8.8 ping statistics ---\n4 packets transmitted, 4 packets\ + \ received, 0.0% packet loss\nround-trip min/avg/max/stddev = 9.271/15.483/26.771/7.039\ + \ ms" + outputStructuredPing: + destinationIp: 8.8.8.8 + destinationName: 8.8.8.8 + dataBytes: 100 + packetsTransmitted: 4 + packetsReceived: 4 + packetsLossPercent: 0 + rttMin: 9.271 + rttAvg: 15.483 + rttMax: 26.771 + rttStdDev: 7.039 + responses: + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 0 + ttl: 117 + time: 9.839 + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 1 + ttl: 117 + time: 16.051 + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 2 + ttl: 117 + time: 9.271 + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 3 + ttl: 117 + time: 26.771 + changeLog: + createdBy: testuser + createdDateTime: 2020-05-21T10:30:00Z + "400_invalid_sorting_commands": + value: + - errorCode: EQ-3043015 + errorMessage: Invalid value for sorting direction. + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + additionalInfo: + - reason: Only accept DESC and ASC for sorting direction. + GetResponsePingCommand: + value: + href: https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00 + type: PING_COMMAND + uuid: 37c10edc-ba2e-4240-a850-8a48f9c47d00 + name: ping-test-1 + description: Testing FCR-SV-1 + state: SUCCEEDED + project: + projectId: b11d4cb5-978a-418a-8b13-bf19abb97938 + request: + destination: 8.8.8.8 + sourceConnection: + uuid: 1da3778c-6aa3-4e47-b2fe-83a0773dde18 + timeout: 2 + dataBytes: 100 + count: 5 + interval: 1000 + response: + output: "PING 8.8.8.8 (8.8.8.8): 100 data bytes\n108 bytes from 8.8.8.8:\ + \ icmp_seq=0 ttl=117 time=9.839 ms\n108 bytes from 8.8.8.8: icmp_seq=1\ + \ ttl=117 time=16.051 ms\n108 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=9.271\ + \ ms\n108 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=26.771 ms \n---\ + \ 8.8.8.8 ping statistics ---\n4 packets transmitted, 4 packets received,\ + \ 0.0% packet loss\nround-trip min/avg/max/stddev = 9.271/15.483/26.771/7.039\ + \ ms" + outputStructuredPing: + destinationIp: 8.8.8.8 + destinationName: 8.8.8.8 + dataBytes: 100 + packetsTransmitted: 4 + packetsReceived: 4 + packetsLossPercent: 0 + rttMin: 9.271 + rttAvg: 15.483 + rttMax: 26.771 + rttStdDev: 7.039 + responses: + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 0 + ttl: 117 + time: 9.839 + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 1 + ttl: 117 + time: 16.051 + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 2 + ttl: 117 + time: 9.271 + - bytes: 100 + ip: 8.8.8.8 + icmpSeq: 3 + ttl: 117 + time: 26.771 + changeLog: + createdBy: testuser + createdDateTime: 2020-05-21T10:30:00Z + "400_invalid_state_commands": + value: + - errorCode: EQ-3043023 + errorMessage: Cannot delete Command in pending state + correlationId: c82ff3bc-de07-47e5-b3ec-53a009d01515 + details: Cannot delete Fabric Cloud Router in transient state. SearchFilterByNextHop: value: filter: @@ -27371,18 +28711,18 @@ components: href: https://api.equinix.com/fabric/v4/routers/e2e99d48-66b8-4b80-84eb-daea190e9186 type: XF_ROUTER uuid: e2e99d48-66b8-4b80-84eb-daea190e9186 - CreateGlobalNetwork: + Create-Global-EVPLAN-Network: value: type: EVPLAN name: My-Network-1 scope: GLOBAL project: - projectId: "1234567" + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 notifications: - type: ALL emails: - test@equinix.com - CreateRegionalNetwork: + Create-Regional-EVPLAN-Network: value: type: EVPLAN name: My-Network-1 @@ -27390,18 +28730,123 @@ components: location: region: EMEA project: - projectId: "1234567" + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 notifications: - type: ALL emails: - test@equinix.com - CreateLocalNetwork: + Create-Local-EVPLAN-Network: value: type: EVPLAN name: My-Network-1 scope: LOCAL project: - projectId: "1234567" + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - test@equinix.com + Create-Global-EPLAN-Network: + value: + type: EPLAN + name: My-EPLAN-Network-1 + scope: GLOBAL + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - test@equinix.com + Create-Regional-EPLAN-Network: + value: + type: EPLAN + name: My-EPLAN-Network-1 + scope: REGIONAL + location: + region: EMEA + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - test@equinix.com + Create-Local-EPLAN-Network: + value: + type: EPLAN + name: My-EPLAN-Network-1 + scope: LOCAL + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - test@equinix.com + Create-Global-EVPTREE-Network: + value: + type: EVPTREE + name: My-EVPTREE-Network-1 + scope: GLOBAL + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - test@equinix.com + Create-Regional-EVPTREE-Network: + value: + type: EVPTREE + name: My-EVPTREE-Network-1 + scope: REGIONAL + location: + region: AMER + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - test@equinix.com + Create-Local-EVPTREE-Network: + value: + type: EVPTREE + name: My-EVPTREE-Network-1 + scope: LOCAL + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - test@equinix.com + Create-Global-EPTREE-Network: + value: + type: EPTREE + name: My-EPTREE-Network-1 + scope: GLOBAL + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - test@equinix.com + Create-Regional-EPTREE-Network: + value: + type: EPTREE + name: My-EPTREE-Network-1 + scope: REGIONAL + location: + region: AMER + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - test@equinix.com + Create-Local-EPTREE-Network: + value: + type: EPTREE + name: My-EPTREE-Network-1 + scope: LOCAL + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 notifications: - type: ALL emails: @@ -27417,6 +28862,446 @@ components: - type: ALL emails: - test@equinix.com + Create-Global-EVPLAN-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/0633e83f-116f-481d-b86f-c472271d1a8c + uuid: 0633e83f-116f-481d-b86f-c472271d1a8c + type: EVPLAN + name: My-evplan-network-1 + scope: GLOBAL + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/0633e83f-116f-481d-b86f-c472271d1a8c/changes/ce7c0bbc-7bd2-431f-903f-de796ea9e858 + uuid: ce7c0bbc-7bd2-431f-903f-de796ea9e858 + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@gmail.com + createdDateTime: 2025-03-03T19:37:29.326Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/0633e83f-116f-481d-b86f-c472271d1a8c/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@gmail.com + Create-Regional-EVPLAN-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef + uuid: 884254b7-237d-44f7-af0f-84ba324350ef + type: EVPLAN + name: My-evplan-network-1 + scope: REGIONAL + location: + region: AMER + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/changes/741c0927-d9ed-405b-a4f2-cb61d0dda2c5 + uuid: 741c0927-d9ed-405b-a4f2-cb61d0dda2c5 + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@gmail.com + createdDateTime: 2025-03-03T19:21:43.145Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@gmail.com + Create-Local-EVPLAN-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/726af704-0b1b-46dc-9efc-00fc938084b3 + uuid: 726af704-0b1b-46dc-9efc-00fc938084b3 + type: EVPLAN + name: My-evplan-network-1 + scope: LOCAL + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/726af704-0b1b-46dc-9efc-00fc938084b3/changes/92e2f236-e77d-4818-bbad-cff6b716a610 + uuid: 92e2f236-e77d-4818-bbad-cff6b716a610 + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@gmail.com + createdDateTime: 2025-03-03T19:43:20.145Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/726af704-0b1b-46dc-9efc-00fc938084b3/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@gmail.com + Create-Global-EPLAN-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/0d51722e-b080-4943-92ab-9720eaab2cfa + uuid: 0d51722e-b080-4943-92ab-9720eaab2cfa + type: EPLAN + name: My-eplan-network-1 + scope: GLOBAL + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/0d51722e-b080-4943-92ab-9720eaab2cfa/changes/e4f9c57f-a1d6-4520-9a31-fddbe69ed592 + uuid: e4f9c57f-a1d6-4520-9a31-fddbe69ed592 + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@gmail.com + createdDateTime: 2025-03-03T20:52:23.469Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/0d51722e-b080-4943-92ab-9720eaab2cfa/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@gmail.com + Create-Regional-EPLAN-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef + uuid: 884254b7-237d-44f7-af0f-84ba324350ef + type: EVPLAN + name: My-evplan-network-1 + scope: REGIONAL + location: + region: AMER + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/changes/741c0927-d9ed-405b-a4f2-cb61d0dda2c5 + uuid: 741c0927-d9ed-405b-a4f2-cb61d0dda2c5 + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@gmail.com + createdDateTime: 2025-03-03T19:21:43.145Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@gmail.com + Create-Local-EPLAN-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/82402fc0-cb55-4a21-b0b3-1af89f63742b + uuid: 82402fc0-cb55-4a21-b0b3-1af89f63742b + type: EPLAN + name: My-eplan-network-1 + scope: LOCAL + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/82402fc0-cb55-4a21-b0b3-1af89f63742b/changes/1449105b-7576-4094-aa34-216f3f9ed122 + uuid: 1449105b-7576-4094-aa34-216f3f9ed122 + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@gmail.com + createdDateTime: 2025-03-03T20:55:57.858Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/82402fc0-cb55-4a21-b0b3-1af89f63742b/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@gmail.com + Create-Global-EVPTREE-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/07659346-9489-42cf-891a-683624e801d5 + uuid: 07659346-9489-42cf-891a-683624e801d5 + type: EVPTREE + name: My-evptree-network-1 + scope: GLOBAL + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/07659346-9489-42cf-891a-683624e801d5/changes/1caf3efb-7427-4be1-8100-73fcff471654 + uuid: 1caf3efb-7427-4be1-8100-73fcff471654 + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@equinix.comm + createdDateTime: 2025-03-05T21:17:46.656Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/07659346-9489-42cf-891a-683624e801d5/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@equinix.com + Create-Regional-EVPTREE-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/0ec08139-bae5-44c4-bea2-970b14d7c7c0 + uuid: 0ec08139-bae5-44c4-bea2-970b14d7c7c0 + type: EVPTREE + name: My-evptree-network-1 + scope: REGIONAL + location: + region: AMER + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/0ec08139-bae5-44c4-bea2-970b14d7c7c0/changes/0e159ddd-47d2-4fa3-97fe-502f8a70ea0e + uuid: 0e159ddd-47d2-4fa3-97fe-502f8a70ea0e + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@equinix.com + createdDateTime: 2025-03-05T20:57:07.206Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/0ec08139-bae5-44c4-bea2-970b14d7c7c0/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@equinix.com + Create-Local-EVPTREE-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/4622cce8-114b-4432-94f4-060fda044ae3 + uuid: 4622cce8-114b-4432-94f4-060fda044ae3 + type: EVPTREE + name: My-evptree-network-1 + scope: LOCAL + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/4622cce8-114b-4432-94f4-060fda044ae3/changes/6eacff89-a363-402f-ae15-84294177a866 + uuid: 6eacff89-a363-402f-ae15-84294177a866 + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@equinix.com + createdDateTime: 2025-03-05T21:22:30.984Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/4622cce8-114b-4432-94f4-060fda044ae3/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@equinix.com + Create-Global-EPTREE-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/16ee541c-9e93-428b-9557-3f99907aa21c + uuid: 16ee541c-9e93-428b-9557-3f99907aa21c + type: EPTREE + name: My-eptree-network-1 + scope: GLOBAL + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/16ee541c-9e93-428b-9557-3f99907aa21c/changes/2f541dcd-c25b-43a1-97fa-8b2be6817899 + uuid: 2f541dcd-c25b-43a1-97fa-8b2be6817899 + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@equinix.com + createdDateTime: 2025-03-05T21:37:08.370Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/16ee541c-9e93-428b-9557-3f99907aa21c/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@equinix.com + Create-Regional-EPTREE-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/291fc758-91d3-482b-a9b3-3430685c390e + uuid: 291fc758-91d3-482b-a9b3-3430685c390e + type: EPTREE + name: My-eptree-network-1 + scope: REGIONAL + location: + region: EMEA + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/291fc758-91d3-482b-a9b3-3430685c390e/changes/8345324b-97cc-4c5c-9f15-40bc82b254ad + uuid: 8345324b-97cc-4c5c-9f15-40bc82b254ad + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@equinix.com + createdDateTime: 2025-03-06T00:23:29.030Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/291fc758-91d3-482b-a9b3-3430685c390e/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@equinix.com + Create-Local-EPTREE-Network-Response: + value: + href: http://api.corp.equinix.com/fabric/v4/networks/c929924e-5d87-46b2-a82f-91a145c1803d + uuid: c929924e-5d87-46b2-a82f-91a145c1803d + type: EPTREE + name: My-eptree-network-1 + scope: LOCAL + state: INACTIVE + connectionsCount: 0 + account: + orgId: 14510 + organizationName: fabric + globalCustId: 0026u00000595sBAAM + change: + href: http://api.corp.equinix.com/fabric/v4/networks/c929924e-5d87-46b2-a82f-91a145c1803d/changes/1b32bacb-5898-4efd-9404-b64ec825c652 + uuid: 1b32bacb-5898-4efd-9404-b64ec825c652 + type: NETWORK_CREATION + operation: + equinixStatus: PROVISIONING + changeLog: + createdBy: fabric + createdByFullName: fabric fabric + createdByEmail: fabric@equinix.com + createdDateTime: 2025-03-06T00:30:42.972Z + links: + href: http://api.corp.equinix.com/fabric/v4/networks/c929924e-5d87-46b2-a82f-91a145c1803d/connections + rel: getConnectionsByNetworkUuid + method: GET + contentType: application/json + authenticate: true + project: + projectId: d64fa54a-cfcb-4fb0-82ee-86cf47007fa2 + notifications: + - type: ALL + emails: + - fabric@equinix.com NetworkPostResponseExample: value: href: https://api.equinix.com/fabric/v4/networks/92dc376a-a932-43aa-a6a2-c806dedbd784 @@ -29179,16 +31064,6 @@ components: name: splunk description: subscription 1 state: PROVISIONED - filters: - and: - - property: /subject - operator: LIKE - values: - - '%/fabric/v4/connections/36276e58-b5a1-4864-ab5e-be10dff9eac1%' - - property: /type - operator: IN - values: - - equinix.fabric.connection.state.provisioned metricSelector: include: - equinix.fabric.connection.* @@ -29225,12 +31100,6 @@ components: name: splunk1 description: subscription-1 enabled: true - filters: - and: - - property: /type - operator: LIKE - values: - - equinix.fabric.connection% metricSelector: include: - equinix.fabric.connection.* @@ -29253,12 +31122,6 @@ components: name: slack1 description: subscription-1 enabled: true - filters: - and: - - property: /type - operator: LIKE - values: - - equinix.fabric.connection% metricSelector: include: - equinix.fabric.connection.* @@ -29274,12 +31137,6 @@ components: name: pagerduty description: subscription-1 enabled: true - filters: - and: - - property: /type - operator: LIKE - values: - - equinix.fabric.connection% metricSelector: include: - equinix.fabric.connection.* @@ -29293,7 +31150,6 @@ components: type: INTEGRATION_KEY integrationKey: my-integration-key settings: - transformAlerts: true changeUri: https://events.pagerduty.com/v2/change/enqueeue alertUri: https://events.pagerduty.com/v2/enqueeue StreamSubscriptionPostRequestExampleDatadog: @@ -29302,12 +31158,6 @@ components: name: datadog description: subscription-1 enabled: true - filters: - and: - - property: /type - operator: LIKE - values: - - equinix.fabric.connection% metricSelector: include: - equinix.fabric.connection.* @@ -29328,12 +31178,6 @@ components: name: teams1 description: subscription-1 enabled: true - filters: - and: - - property: /type - operator: LIKE - values: - - equinix.fabric.connection% metricSelector: include: - equinix.fabric.connection.* @@ -29349,12 +31193,6 @@ components: name: servicenow-1 description: subscription-1 enabled: true - filters: - and: - - property: /type - operator: LIKE - values: - - equinix.fabric.connection% eventSelector: include: - equinix.fabric.connection.* @@ -29376,12 +31214,6 @@ components: description: stream dec 1 state: PROVISIONED enabled: true - filters: - and: - - property: /type - operator: LIKE - values: - - equinix.fabric.connection% metricSelector: include: - equinix.fabric.connection.* @@ -29408,12 +31240,6 @@ components: name: splunk1 description: subscription 1 enabled: true - filters: - and: - - property: /type - operator: LIKE - values: - - equinix.fabric.connection% metricSelector: include: - equinix.fabric.connection.* @@ -29442,12 +31268,6 @@ components: description: stream dec 1 state: DEPROVISIONING enabled: true - filters: - and: - - property: /type - operator: LIKE - values: - - equinix.fabric.connection% metricSelector: include: - equinix.fabric.connection.* @@ -29573,6 +31393,256 @@ components: type: string style: simple schemas: + CloudEventAssetType: + enum: + - ports + - connections + - routers + type: string + AssetId: + description: Asset UUID + example: 757400f8-d360-11e9-bb65-2a2ae2dbcce6 + format: uuid + type: string + StartDateTime: + description: Start date and time + example: 2024-07-11T18:06:21Z + format: date-time + type: string + EndDateTime: + description: End date and time + example: 2024-07-11T18:06:21Z + format: date-time + type: string + Offset: + default: 0 + description: Pagination offset + example: 0 + type: integer + Limit: + default: 20 + description: Pagination limit + example: 20 + type: integer + GetCloudEventsByAssetResponse: + example: + pagination: + next: next + total: 0 + offset: 0 + previous: previous + limit: 0 + data: + - datacontenttype: datacontenttype + data: + resource: + name: name + href: href + state: state + type: type + uuid: uuid + auth: + name: name + authid: equinix + email: email + authtype: system + message: message + subject: subject + source: source + type: type + severitytext: severitytext + equinixproject: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + spec: spec + severitynumber: severitynumber + authid: authid + dataschema: dataschema + authtype: authtype + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - datacontenttype: datacontenttype + data: + resource: + name: name + href: href + state: state + type: type + uuid: uuid + auth: + name: name + authid: equinix + email: email + authtype: system + message: message + subject: subject + source: source + type: type + severitytext: severitytext + equinixproject: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + spec: spec + severitynumber: severitynumber + authid: authid + dataschema: dataschema + authtype: authtype + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + pagination: + $ref: '#/components/schemas/Pagination' + data: + description: Data returned from the API call. + items: + $ref: '#/components/schemas/CloudEvent' + type: array + type: object + ErrorList: + description: List of Error Message + items: + $ref: '#/components/schemas/Error' + type: array + CloudEventId: + description: Cloud Event UUID + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + format: uuid + type: string + CloudEvent: + description: Cloud Event object + example: + datacontenttype: datacontenttype + data: + resource: + name: name + href: href + state: state + type: type + uuid: uuid + auth: + name: name + authid: equinix + email: email + authtype: system + message: message + subject: subject + source: source + type: type + severitytext: severitytext + equinixproject: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + spec: spec + severitynumber: severitynumber + authid: authid + dataschema: dataschema + authtype: authtype + id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + properties: + spec: + description: Cloud Event Open Telemetry specification + readOnly: true + type: string + source: + description: Cloud Event source + type: string + id: + description: Cloud Event identifier + format: uuid + type: string + type: + description: Equinix supported event type + type: string + subject: + description: Cloud Event subject + type: string + dataschema: + description: Cloud Event dataschema reference + type: string + datacontenttype: + description: Cloud Event data content type + type: string + severitynumber: + description: Cloud Event severity number + type: string + severitytext: + description: Cloud Event severity text + type: string + equinixproject: + description: Equinix project identifier + format: uuid + type: string + authtype: + description: Cloud Event auth type + type: string + authid: + description: Cloud Event user identifier + type: string + data: + $ref: '#/components/schemas/CloudEventData' + type: object + CloudEventSearchRequest: + description: Search requests containing criteria + example: + filter: + and: + - null + - null + pagination: + offset: 0 + limit: 1 + sort: + - and: + - null + - null + - and: + - null + - null + properties: + filter: + $ref: '#/components/schemas/CloudEventFilters' + pagination: + $ref: '#/components/schemas/PaginationRequest' + sort: + items: + $ref: '#/components/schemas/CloudEventFilters' + type: array + type: object + CloudEventFilters: + example: + and: + - null + - null + properties: + and: + items: + $ref: '#/components/schemas/CloudEventFilter' + type: array + type: object + CloudEventFilter: + anyOf: + - $ref: '#/components/schemas/CloudEventSimpleExpression' + type: object + CloudEventSimpleExpression: + properties: + property: + description: | + Possible field names to use on filters: + * `/subject` - Cloud Event subject description + * `/type` - Cloud Event type + * `/time` - Time of Cloud Events + example: /subject + type: string + operator: + 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: = + type: string + values: + items: + example: equinix.fabric.port.status.* + type: string + type: array + type: object ConnectionPostRequest: description: Create connection post request example: @@ -33115,11 +35185,6 @@ components: - type - zSide type: object - ErrorList: - description: List of Error Message - items: - $ref: '#/components/schemas/Error' - type: array ConnectionId: description: Connection UUID example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 @@ -39318,16 +41383,6 @@ components: description: Port UUID format: uuid type: string - startDateTime: - description: startDateTime - example: 2020-11-06T07:00:00Z - format: date-time - type: string - endDateTime: - description: endDateTime - example: 2020-11-06T07:00:00Z - format: date-time - type: string Statistics: description: This API provides service-level traffic metrics so that you can view access and gather key information required to manage service subscription @@ -41783,6 +43838,17 @@ components: type: EXEMPTION startDate: startDate uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + change: + data: + op: replace + path: /name + value: "{}" + createdDateTime: 2020-11-06T07:00:00Z + information: information + type: PORT_CREATION + uuid: uuid + status: COMPLETED + updatedDateTime: 2020-11-06T07:00:00Z physicalPortsType: 1000BASE_LX physicalPortsCount: 5 name: name @@ -42098,6 +44164,17 @@ components: type: EXEMPTION startDate: startDate uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + change: + data: + op: replace + path: /name + value: "{}" + createdDateTime: 2020-11-06T07:00:00Z + information: information + type: PORT_CREATION + uuid: uuid + status: COMPLETED + updatedDateTime: 2020-11-06T07:00:00Z physicalPortsType: 1000BASE_LX physicalPortsCount: 5 name: name @@ -42425,6 +44502,17 @@ components: type: EXEMPTION startDate: startDate uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + change: + data: + op: replace + path: /name + value: "{}" + createdDateTime: 2020-11-06T07:00:00Z + information: information + type: PORT_CREATION + uuid: uuid + status: COMPLETED + updatedDateTime: 2020-11-06T07:00:00Z physicalPortsType: 1000BASE_LX physicalPortsCount: 5 name: name @@ -42526,6 +44614,8 @@ components: $ref: '#/components/schemas/Port_operation' account: $ref: '#/components/schemas/SimplifiedAccount' + change: + $ref: '#/components/schemas/PortChange' changeLog: $ref: '#/components/schemas/Changelog' serviceType: @@ -43062,321 +45152,343 @@ components: type: EXEMPTION startDate: startDate uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - physicalPortsType: 1000BASE_LX - physicalPortsCount: 5 - name: name - location: - metroName: Amsterdam - metroHref: https://api.equinix.com/fabric/v4/metros/AM - metroCode: AM - region: "AMER, APAC, EMEA" - ibx: AM1 - operation: null - device: - name: name - redundancy: - priority: PRIMARY - group: group - asn: 9 - account: - resellerOrgId: 5 - organizationName: organizationName - resellerAccountNumber: 5 - accountName: accountName - ucmId: ucmId - resellerUcmId: resellerUcmId - globalOrganizationName: globalOrganizationName - globalOrgId: globalOrgId - resellerAccountName: resellerAccountName - accountNumber: 6 - globalCustId: globalCustId - orgId: 1 - notifications: - - registeredUsers: - - registeredUsers - - registeredUsers - type: NOTIFICATION - - registeredUsers: - - registeredUsers - - registeredUsers - type: NOTIFICATION - - serviceType: EPL - encapsulation: - tagProtocolId: tagProtocolId - type: "NULL" - lagEnabled: true - loas: - - href: https://openapi-generator.tech - type: CTR_LOA - uuid: uuid - - href: https://openapi-generator.tech - type: CTR_LOA - uuid: uuid - description: description - project: - projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 - changeLog: - createdByEmail: john.smith@example.com - deletedByFullName: John Smith - updatedBy: johnsmith - createdBy: johnsmith - updatedByEmail: john.smith@example.com - createdByFullName: John Smith + change: + data: + op: replace + path: /name + value: "{}" + createdDateTime: 2020-11-06T07:00:00Z + information: information + type: PORT_CREATION + uuid: uuid + status: COMPLETED + updatedDateTime: 2020-11-06T07:00:00Z + physicalPortsType: 1000BASE_LX + physicalPortsCount: 5 + name: name + location: + metroName: Amsterdam + metroHref: https://api.equinix.com/fabric/v4/metros/AM + metroCode: AM + region: "AMER, APAC, EMEA" + ibx: AM1 + operation: null + device: + name: name + redundancy: + priority: PRIMARY + group: group + asn: 9 + account: + resellerOrgId: 5 + organizationName: organizationName + resellerAccountNumber: 5 + accountName: accountName + ucmId: ucmId + resellerUcmId: resellerUcmId + globalOrganizationName: globalOrganizationName + globalOrgId: globalOrgId + resellerAccountName: resellerAccountName + accountNumber: 6 + globalCustId: globalCustId + orgId: 1 + notifications: + - registeredUsers: + - registeredUsers + - registeredUsers + type: NOTIFICATION + - registeredUsers: + - registeredUsers + - registeredUsers + type: NOTIFICATION + - serviceType: EPL + encapsulation: + tagProtocolId: tagProtocolId + type: "NULL" + lagEnabled: true + loas: + - href: https://openapi-generator.tech + type: CTR_LOA + uuid: uuid + - href: https://openapi-generator.tech + type: CTR_LOA + uuid: uuid + description: description + project: + projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 + changeLog: + createdByEmail: john.smith@example.com + deletedByFullName: John Smith + updatedBy: johnsmith + createdBy: johnsmith + updatedByEmail: john.smith@example.com + createdByFullName: John Smith + createdDateTime: 2020-11-06T07:00:00Z + deletedDateTime: 2020-11-06T07:00:00Z + updatedByFullName: John Smith + deletedBy: johnsmith + deletedByEmail: john.smith@example.com + updatedDateTime: 2020-11-06T07:00:00Z + type: null + interface: + type: type + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + physicalPortsSpeed: 0 + connectionsCount: 0 + connectivitySourceType: COLO + physicalPortQuantity: 3 + lag: null + usedBandwidth: 0 + additionalInfo: + - value: value + key: key + - value: value + key: key + endCustomer: + isDisclosed: false + name: name + mdmId: mdmId + href: https://openapi-generator.tech + id: 0 + state: null + redundancy: + priority: null + enabled: true + group: group + demarcationPointIbx: demarcationPointIbx + order: + customerReferenceId: customerReferenceId + orderNumber: orderNumber + orderId: orderId + signature: + delegate: + firstName: firstName + lastName: lastName + email: email + signatory: DELEGATE + purchaseOrder: + number: number + amount: amount + selectionType: EXEMPTION + endDate: endDate + attachmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: EXEMPTION + startDate: startDate + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + settings: + layer3Enabled: true + buyout: true + viewPortPermission: true + placeVcOrderPermission: true + sharedPortType: true + packageType: STANDARD + sharedPortProduct: NETWORK_EDGE + availableBandwidth: 0 + bmmrType: SELF + demarcationPoint: + patchPanel: patchPanel + patchPanelName: patchPanelName + connectorType: connectorType + cabinetUniqueSpaceId: cabinetUniqueSpaceId + patchPanelPortB: patchPanelPortB + patchPanelPortA: patchPanelPortA + cageUniqueSpaceId: cageUniqueSpaceId + ibx: ibx + package: + code: STANDARD + type: EPL + bandwidth: 0 + tetherIbx: tetherIbx + physicalPorts: + - settings: + errorMessage: errorMessage + packageType: packageType + demarcationPoint: + patchPanel: patchPanel + patchPanelName: patchPanelName + connectorType: connectorType + cabinetUniqueSpaceId: cabinetUniqueSpaceId + patchPanelPortB: patchPanelPortB + patchPanelPortA: patchPanelPortA + cageUniqueSpaceId: cageUniqueSpaceId + ibx: ibx + tether: + patchPanel: patchPanel + systemName: systemName + patchPanelPortB: patchPanelPortB + patchPanelPortA: patchPanelPortA + cabinetNumber: cabinetNumber + ibx: ibx + crossConnectId: crossConnectId + loas: + - href: https://openapi-generator.tech + type: CTR_LOA + uuid: uuid + - href: https://openapi-generator.tech + type: CTR_LOA + uuid: uuid + type: null + interface: + type: type + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + interfaceType: interfaceType + additionalInfo: + - value: value + key: key + - value: value + key: key + href: https://openapi-generator.tech + id: 3 + state: null + operation: + operationalStatus: UP + evplVCCount: 5 + connectionCount: 4 + opStatusChangedAt: 2020-11-06T07:00:00Z + accessVCCount: 9 + fgVCCount: 9 + account: + resellerOrgId: 5 + organizationName: organizationName + resellerAccountNumber: 5 + accountName: accountName + ucmId: ucmId + resellerUcmId: resellerUcmId + globalOrganizationName: globalOrganizationName + globalOrgId: globalOrgId + resellerAccountName: resellerAccountName + accountNumber: 6 + globalCustId: globalCustId + orgId: 1 + interfaceSpeed: 0 + notifications: + - registeredUsers: + - registeredUsers + - registeredUsers + type: NOTIFICATION + - registeredUsers: + - registeredUsers + - registeredUsers + type: NOTIFICATION + order: + customerReferenceId: customerReferenceId + orderNumber: orderNumber + orderId: orderId + signature: + delegate: + firstName: firstName + lastName: lastName + email: email + signatory: DELEGATE + purchaseOrder: + number: number + amount: amount + selectionType: EXEMPTION + endDate: endDate + attachmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: EXEMPTION + startDate: startDate + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + - settings: + errorMessage: errorMessage + packageType: packageType + demarcationPoint: + patchPanel: patchPanel + patchPanelName: patchPanelName + connectorType: connectorType + cabinetUniqueSpaceId: cabinetUniqueSpaceId + patchPanelPortB: patchPanelPortB + patchPanelPortA: patchPanelPortA + cageUniqueSpaceId: cageUniqueSpaceId + ibx: ibx + tether: + patchPanel: patchPanel + systemName: systemName + patchPanelPortB: patchPanelPortB + patchPanelPortA: patchPanelPortA + cabinetNumber: cabinetNumber + ibx: ibx + crossConnectId: crossConnectId + loas: + - href: https://openapi-generator.tech + type: CTR_LOA + uuid: uuid + - href: https://openapi-generator.tech + type: CTR_LOA + uuid: uuid + type: null + interface: + type: type + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + interfaceType: interfaceType + additionalInfo: + - value: value + key: key + - value: value + key: key + href: https://openapi-generator.tech + id: 3 + state: null + operation: + operationalStatus: UP + evplVCCount: 5 + connectionCount: 4 + opStatusChangedAt: 2020-11-06T07:00:00Z + accessVCCount: 9 + fgVCCount: 9 + account: + resellerOrgId: 5 + organizationName: organizationName + resellerAccountNumber: 5 + accountName: accountName + ucmId: ucmId + resellerUcmId: resellerUcmId + globalOrganizationName: globalOrganizationName + globalOrgId: globalOrgId + resellerAccountName: resellerAccountName + accountNumber: 6 + globalCustId: globalCustId + orgId: 1 + interfaceSpeed: 0 + notifications: + - registeredUsers: + - registeredUsers + - registeredUsers + type: NOTIFICATION + - registeredUsers: + - registeredUsers + - registeredUsers + type: NOTIFICATION + order: + customerReferenceId: customerReferenceId + orderNumber: orderNumber + orderId: orderId + signature: + delegate: + firstName: firstName + lastName: lastName + email: email + signatory: DELEGATE + purchaseOrder: + number: number + amount: amount + selectionType: EXEMPTION + endDate: endDate + attachmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + type: EXEMPTION + startDate: startDate + uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + change: + data: + op: replace + path: /name + value: "{}" createdDateTime: 2020-11-06T07:00:00Z - deletedDateTime: 2020-11-06T07:00:00Z - updatedByFullName: John Smith - deletedBy: johnsmith - deletedByEmail: john.smith@example.com + information: information + type: PORT_CREATION + uuid: uuid + status: COMPLETED updatedDateTime: 2020-11-06T07:00:00Z - type: null - interface: - type: type - uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - physicalPortsSpeed: 0 - connectionsCount: 0 - connectivitySourceType: COLO - physicalPortQuantity: 3 - lag: null - usedBandwidth: 0 - additionalInfo: - - value: value - key: key - - value: value - key: key - endCustomer: - isDisclosed: false - name: name - mdmId: mdmId - href: https://openapi-generator.tech - id: 0 - state: null - redundancy: - priority: null - enabled: true - group: group - demarcationPointIbx: demarcationPointIbx - order: - customerReferenceId: customerReferenceId - orderNumber: orderNumber - orderId: orderId - signature: - delegate: - firstName: firstName - lastName: lastName - email: email - signatory: DELEGATE - purchaseOrder: - number: number - amount: amount - selectionType: EXEMPTION - endDate: endDate - attachmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: EXEMPTION - startDate: startDate - uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - settings: - layer3Enabled: true - buyout: true - viewPortPermission: true - placeVcOrderPermission: true - sharedPortType: true - packageType: STANDARD - sharedPortProduct: NETWORK_EDGE - availableBandwidth: 0 - bmmrType: SELF - demarcationPoint: - patchPanel: patchPanel - patchPanelName: patchPanelName - connectorType: connectorType - cabinetUniqueSpaceId: cabinetUniqueSpaceId - patchPanelPortB: patchPanelPortB - patchPanelPortA: patchPanelPortA - cageUniqueSpaceId: cageUniqueSpaceId - ibx: ibx - package: - code: STANDARD - type: EPL - bandwidth: 0 - tetherIbx: tetherIbx - physicalPorts: - - settings: - errorMessage: errorMessage - packageType: packageType - demarcationPoint: - patchPanel: patchPanel - patchPanelName: patchPanelName - connectorType: connectorType - cabinetUniqueSpaceId: cabinetUniqueSpaceId - patchPanelPortB: patchPanelPortB - patchPanelPortA: patchPanelPortA - cageUniqueSpaceId: cageUniqueSpaceId - ibx: ibx - tether: - patchPanel: patchPanel - systemName: systemName - patchPanelPortB: patchPanelPortB - patchPanelPortA: patchPanelPortA - cabinetNumber: cabinetNumber - ibx: ibx - crossConnectId: crossConnectId - loas: - - href: https://openapi-generator.tech - type: CTR_LOA - uuid: uuid - - href: https://openapi-generator.tech - type: CTR_LOA - uuid: uuid - type: null - interface: - type: type - uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - interfaceType: interfaceType - additionalInfo: - - value: value - key: key - - value: value - key: key - href: https://openapi-generator.tech - id: 3 - state: null - operation: - operationalStatus: UP - evplVCCount: 5 - connectionCount: 4 - opStatusChangedAt: 2020-11-06T07:00:00Z - accessVCCount: 9 - fgVCCount: 9 - account: - resellerOrgId: 5 - organizationName: organizationName - resellerAccountNumber: 5 - accountName: accountName - ucmId: ucmId - resellerUcmId: resellerUcmId - globalOrganizationName: globalOrganizationName - globalOrgId: globalOrgId - resellerAccountName: resellerAccountName - accountNumber: 6 - globalCustId: globalCustId - orgId: 1 - interfaceSpeed: 0 - notifications: - - registeredUsers: - - registeredUsers - - registeredUsers - type: NOTIFICATION - - registeredUsers: - - registeredUsers - - registeredUsers - type: NOTIFICATION - order: - customerReferenceId: customerReferenceId - orderNumber: orderNumber - orderId: orderId - signature: - delegate: - firstName: firstName - lastName: lastName - email: email - signatory: DELEGATE - purchaseOrder: - number: number - amount: amount - selectionType: EXEMPTION - endDate: endDate - attachmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: EXEMPTION - startDate: startDate - uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - - settings: - errorMessage: errorMessage - packageType: packageType - demarcationPoint: - patchPanel: patchPanel - patchPanelName: patchPanelName - connectorType: connectorType - cabinetUniqueSpaceId: cabinetUniqueSpaceId - patchPanelPortB: patchPanelPortB - patchPanelPortA: patchPanelPortA - cageUniqueSpaceId: cageUniqueSpaceId - ibx: ibx - tether: - patchPanel: patchPanel - systemName: systemName - patchPanelPortB: patchPanelPortB - patchPanelPortA: patchPanelPortA - cabinetNumber: cabinetNumber - ibx: ibx - crossConnectId: crossConnectId - loas: - - href: https://openapi-generator.tech - type: CTR_LOA - uuid: uuid - - href: https://openapi-generator.tech - type: CTR_LOA - uuid: uuid - type: null - interface: - type: type - uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - interfaceType: interfaceType - additionalInfo: - - value: value - key: key - - value: value - key: key - href: https://openapi-generator.tech - id: 3 - state: null - operation: - operationalStatus: UP - evplVCCount: 5 - connectionCount: 4 - opStatusChangedAt: 2020-11-06T07:00:00Z - accessVCCount: 9 - fgVCCount: 9 - account: - resellerOrgId: 5 - organizationName: organizationName - resellerAccountNumber: 5 - accountName: accountName - ucmId: ucmId - resellerUcmId: resellerUcmId - globalOrganizationName: globalOrganizationName - globalOrgId: globalOrgId - resellerAccountName: resellerAccountName - accountNumber: 6 - globalCustId: globalCustId - orgId: 1 - interfaceSpeed: 0 - notifications: - - registeredUsers: - - registeredUsers - - registeredUsers - type: NOTIFICATION - - registeredUsers: - - registeredUsers - - registeredUsers - type: NOTIFICATION - order: - customerReferenceId: customerReferenceId - orderNumber: orderNumber - orderId: orderId - signature: - delegate: - firstName: firstName - lastName: lastName - email: email - signatory: DELEGATE - purchaseOrder: - number: number - amount: amount - selectionType: EXEMPTION - endDate: endDate - attachmentId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - type: EXEMPTION - startDate: startDate - uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 physicalPortsType: 1000BASE_LX physicalPortsCount: 5 name: name @@ -45548,6 +47660,12 @@ components: type: array marketplaceSubscription: $ref: '#/components/schemas/marketplaceSubscription' + required: + - location + - name + - notification + - package + - type type: object CloudRouter: allOf: @@ -45898,6 +48016,494 @@ components: example: 457400f8-d360-11e9-bb65-2a2ae2dbcced format: uuid type: string + GetAllCloudRouterCommands: + description: List of Fabric Cloud Router Command + example: + pagination: + next: next + total: 0 + offset: 0 + previous: previous + limit: 0 + data: + - request: + dataBytes: 100 + destination: 8.8.8.8 + count: 5 + sourceConnection: + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + interval: 1000 + timeout: 5 + response: + output: output + outputStructuredPing: + destinationIp: 8.8.8.8 + dataBytes: 100 + rttAvg: 15.483 + rttMin: 9.271 + rttMax: 26.771 + packetsReceived: 4 + destinationName: 8.8.8.8 + packetsLossPercent: 0 + responses: + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + packetsTransmitted: 4 + rttStdDev: 7.039 + name: test-fg-1 + description: description + project: + projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 + changeLog: + createdByEmail: john.smith@example.com + deletedByFullName: John Smith + updatedBy: johnsmith + createdBy: johnsmith + updatedByEmail: john.smith@example.com + createdByFullName: John Smith + createdDateTime: 2020-11-06T07:00:00Z + deletedDateTime: 2020-11-06T07:00:00Z + updatedByFullName: John Smith + deletedBy: johnsmith + deletedByEmail: john.smith@example.com + updatedDateTime: 2020-11-06T07:00:00Z + href: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/commands/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + state: SUCCEEDED + type: PING_COMMAND + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + - request: + dataBytes: 100 + destination: 8.8.8.8 + count: 5 + sourceConnection: + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + interval: 1000 + timeout: 5 + response: + output: output + outputStructuredPing: + destinationIp: 8.8.8.8 + dataBytes: 100 + rttAvg: 15.483 + rttMin: 9.271 + rttMax: 26.771 + packetsReceived: 4 + destinationName: 8.8.8.8 + packetsLossPercent: 0 + responses: + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + packetsTransmitted: 4 + rttStdDev: 7.039 + name: test-fg-1 + description: description + project: + projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 + changeLog: + createdByEmail: john.smith@example.com + deletedByFullName: John Smith + updatedBy: johnsmith + createdBy: johnsmith + updatedByEmail: john.smith@example.com + createdByFullName: John Smith + createdDateTime: 2020-11-06T07:00:00Z + deletedDateTime: 2020-11-06T07:00:00Z + updatedByFullName: John Smith + deletedBy: johnsmith + deletedByEmail: john.smith@example.com + updatedDateTime: 2020-11-06T07:00:00Z + href: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/commands/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + state: SUCCEEDED + type: PING_COMMAND + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + properties: + pagination: + $ref: '#/components/schemas/Pagination' + data: + items: + $ref: '#/components/schemas/CloudRouterCommand' + type: array + type: object + CloudRouterCommandPostRequest: + description: Execute Cloud Router Command Request + example: + request: + dataBytes: 100 + destination: 8.8.8.8 + count: 5 + sourceConnection: + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + interval: 1000 + timeout: 5 + name: name + description: description + project: + projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 + type: PING_COMMAND + properties: + type: + $ref: '#/components/schemas/CloudRouterCommandType' + name: + description: Customer-provided Cloud Router Command name + type: string + description: + description: Customer-provided Cloud Router Command description + type: string + project: + $ref: '#/components/schemas/Project' + request: + $ref: '#/components/schemas/CloudRouterCommandRequest' + required: + - project + - request + - type + type: object + CloudRouterCommand: + description: Get Fabric Cloud Router Command response object + example: + request: + dataBytes: 100 + destination: 8.8.8.8 + count: 5 + sourceConnection: + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + interval: 1000 + timeout: 5 + response: + output: output + outputStructuredPing: + destinationIp: 8.8.8.8 + dataBytes: 100 + rttAvg: 15.483 + rttMin: 9.271 + rttMax: 26.771 + packetsReceived: 4 + destinationName: 8.8.8.8 + packetsLossPercent: 0 + responses: + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + packetsTransmitted: 4 + rttStdDev: 7.039 + name: test-fg-1 + description: description + project: + projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 + changeLog: + createdByEmail: john.smith@example.com + deletedByFullName: John Smith + updatedBy: johnsmith + createdBy: johnsmith + updatedByEmail: john.smith@example.com + createdByFullName: John Smith + createdDateTime: 2020-11-06T07:00:00Z + deletedDateTime: 2020-11-06T07:00:00Z + updatedByFullName: John Smith + deletedBy: johnsmith + deletedByEmail: john.smith@example.com + updatedDateTime: 2020-11-06T07:00:00Z + href: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/commands/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + state: SUCCEEDED + type: PING_COMMAND + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + properties: + href: + example: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/commands/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + type: string + type: + $ref: '#/components/schemas/CloudRouterCommandType' + uuid: + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + format: uuid + type: string + name: + description: Customer-provided Cloud Router name + example: test-fg-1 + format: string + type: string + description: + example: description + type: string + state: + $ref: '#/components/schemas/CloudRouterCommandState' + project: + $ref: '#/components/schemas/Project' + request: + $ref: '#/components/schemas/CloudRouterCommandRequest' + response: + $ref: '#/components/schemas/CloudRouterCommandResponse' + changeLog: + $ref: '#/components/schemas/Changelog' + type: object + CloudRouterCommandSearchRequest: + description: Search requests containing criteria + example: + filter: + and: + - null + - null + - null + - null + - null + pagination: + offset: 0 + limit: 1 + sort: + - property: null + direction: null + - property: null + direction: null + properties: + filter: + $ref: '#/components/schemas/CloudRouterCommandSearchFilters' + pagination: + $ref: '#/components/schemas/PaginationRequest' + sort: + items: + $ref: '#/components/schemas/CloudRouterCommandSearchSortCriteria' + type: array + type: object + CloudRouterCommandSearchFilters: + example: + and: + - null + - null + - null + - null + - null + properties: + and: + items: + $ref: '#/components/schemas/CloudRouterCommandSearchFilter' + maxItems: 8 + type: array + type: object + CloudRouterCommandSearchFilter: + anyOf: + - $ref: '#/components/schemas/CloudRouterCommandSearchExpression' + - $ref: '#/components/schemas/CloudRouterCommandSearchOrFilter' + type: object + CloudRouterCommandSearchExpression: + properties: + property: + 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 + type: string + operator: + 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: = + type: string + values: + items: + example: PING_COMMAND + type: string + type: array + type: object + CloudRouterCommandSearchOrFilter: + properties: + or: + items: + $ref: '#/components/schemas/CloudRouterCommandSearchExpression' + maxItems: 3 + type: array + type: object + CloudRouterCommandSearchSortCriteria: + example: + property: null + direction: null + properties: + direction: + $ref: '#/components/schemas/CloudRouterCommandSearchSortDirection' + property: + $ref: '#/components/schemas/CloudRouterCommandSearchSortBy' + type: object + CloudRouterCommandSearchSortDirection: + default: DESC + description: Sorting direction + enum: + - DESC + - ASC + type: string + CloudRouterCommandSearchSortBy: + default: /changeLog/updatedDateTime + description: Possible field names to use on sorting + enum: + - /changeLog/createdDateTime + - /changeLog/updatedDateTime + - /name + - /type + type: string + CloudRouterCommandSearchResponse: + example: + pagination: + next: next + total: 0 + offset: 0 + previous: previous + limit: 0 + data: + - request: + dataBytes: 100 + destination: 8.8.8.8 + count: 5 + sourceConnection: + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + interval: 1000 + timeout: 5 + response: + output: output + outputStructuredPing: + destinationIp: 8.8.8.8 + dataBytes: 100 + rttAvg: 15.483 + rttMin: 9.271 + rttMax: 26.771 + packetsReceived: 4 + destinationName: 8.8.8.8 + packetsLossPercent: 0 + responses: + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + packetsTransmitted: 4 + rttStdDev: 7.039 + name: test-fg-1 + description: description + project: + projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 + changeLog: + createdByEmail: john.smith@example.com + deletedByFullName: John Smith + updatedBy: johnsmith + createdBy: johnsmith + updatedByEmail: john.smith@example.com + createdByFullName: John Smith + createdDateTime: 2020-11-06T07:00:00Z + deletedDateTime: 2020-11-06T07:00:00Z + updatedByFullName: John Smith + deletedBy: johnsmith + deletedByEmail: john.smith@example.com + updatedDateTime: 2020-11-06T07:00:00Z + href: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/commands/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + state: SUCCEEDED + type: PING_COMMAND + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + - request: + dataBytes: 100 + destination: 8.8.8.8 + count: 5 + sourceConnection: + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + interval: 1000 + timeout: 5 + response: + output: output + outputStructuredPing: + destinationIp: 8.8.8.8 + dataBytes: 100 + rttAvg: 15.483 + rttMin: 9.271 + rttMax: 26.771 + packetsReceived: 4 + destinationName: 8.8.8.8 + packetsLossPercent: 0 + responses: + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + packetsTransmitted: 4 + rttStdDev: 7.039 + name: test-fg-1 + description: description + project: + projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 + changeLog: + createdByEmail: john.smith@example.com + deletedByFullName: John Smith + updatedBy: johnsmith + createdBy: johnsmith + updatedByEmail: john.smith@example.com + createdByFullName: John Smith + createdDateTime: 2020-11-06T07:00:00Z + deletedDateTime: 2020-11-06T07:00:00Z + updatedByFullName: John Smith + deletedBy: johnsmith + deletedByEmail: john.smith@example.com + updatedDateTime: 2020-11-06T07:00:00Z + href: https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/commands/1e9414f1-763e-4c0a-86c6-0bc8336048d9 + state: SUCCEEDED + type: PING_COMMAND + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + properties: + pagination: + $ref: '#/components/schemas/Pagination' + data: + description: Data returned from the API call. + items: + $ref: '#/components/schemas/CloudRouterCommand' + type: array + type: object + CommandId: + description: Command UUID + example: 37c10edc-ba2e-4240-a850-8a48f9c47d00 + format: uuid + type: string RouteTableEntrySearchRequest: description: Search requests containing criteria example: @@ -53678,19 +56284,7 @@ components: example: package: 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 project: projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 changeLog: @@ -56008,7 +58602,7 @@ components: - REPROVISIONING_FAILED type: string package: - $ref: '#/components/schemas/precisionTimePackageResponse' + $ref: '#/components/schemas/precisionTimePackagePostResponse' connections: description: Fabric Connections associated with Precision Time Service. items: @@ -56204,19 +58798,7 @@ components: data: - package: 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 project: projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 changeLog: @@ -58500,19 +61082,7 @@ components: purchaseOrderNumber: purchaseOrderNumber - package: 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 project: projectId: 44f4c4f8-2f39-494e-838c-d8e640591be5 changeLog: @@ -61431,7 +64001,7 @@ components: $ref: '#/components/schemas/StreamAsset' type: array type: object - AssetId: + AssetId_1: description: Stream Asset UUID example: 757400f8-d360-11e9-bb65-2a2ae2dbcce6 format: uuid @@ -61522,6 +64092,7 @@ components: - equinix.fabric.connection.* - equinix.fabric.connection.* - equinix.fabric.connection.* + lastErrorMessage: lastErrorMessage eventSelector: include: - equinix.fabric.connection.* @@ -61544,7 +64115,6 @@ components: metricIndex: metricIndex eventIndex: eventIndex source: source - transformAlerts: true credential: password: password apiKey: apiKey @@ -61574,13 +64144,6 @@ components: updatedDateTime: 2020-11-06T07:00:00Z href: https://api.equinix.com/fabric/v4/streams/d684aa26-8276-48b7-bb42-a6d9def0a418/subscriptions/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 state: PROVISIONING - filters: - and: - - null - - null - - null - - null - - null type: STREAM_SUBSCRIPTION uuid: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 enabled: true @@ -61597,6 +64160,7 @@ components: - equinix.fabric.connection.* - equinix.fabric.connection.* - equinix.fabric.connection.* + lastErrorMessage: lastErrorMessage eventSelector: include: - equinix.fabric.connection.* @@ -61619,7 +64183,6 @@ components: metricIndex: metricIndex eventIndex: eventIndex source: source - transformAlerts: true credential: password: password apiKey: apiKey @@ -61649,13 +64212,6 @@ components: updatedDateTime: 2020-11-06T07:00:00Z href: https://api.equinix.com/fabric/v4/streams/d684aa26-8276-48b7-bb42-a6d9def0a418/subscriptions/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 state: PROVISIONING - filters: - and: - - null - - null - - null - - null - - null type: STREAM_SUBSCRIPTION uuid: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 enabled: true @@ -61706,7 +64262,6 @@ components: metricIndex: metricIndex eventIndex: eventIndex source: source - transformAlerts: true credential: password: password apiKey: apiKey @@ -61721,13 +64276,6 @@ components: batchEnabled: false name: name description: description - filters: - and: - - null - - null - - null - - null - - null type: STREAM_SUBSCRIPTION enabled: true properties: @@ -61745,8 +64293,6 @@ components: description: Stream subscription enabled status example: true type: boolean - filters: - $ref: '#/components/schemas/StreamSubscriptionFilter' metricSelector: $ref: '#/components/schemas/StreamSubscriptionSelector' eventSelector: @@ -61754,82 +64300,6 @@ components: sink: $ref: '#/components/schemas/StreamSubscriptionSink' type: object - StreamSubscriptionFilter: - example: - and: - - null - - null - - null - - null - - null - properties: - and: - items: - $ref: '#/components/schemas/StreamFilter' - maxItems: 8 - type: array - type: object - StreamFilter: - anyOf: - - $ref: '#/components/schemas/StreamFilterSimpleExpression' - - $ref: '#/components/schemas/StreamFilterOrFilter' - type: object - StreamFilterSimpleExpression: - properties: - property: - description: | - Possible field names to use on filters: - * `/subject` - subject - * `/type` - type - example: /type - type: string - operator: - description: | - Possible operators to use on filters: - * `=` - equal - * `in` - in - * `LIKE` - case-sensitive like - * `ILIKE` - case-insensitive like - example: = - type: string - values: - 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 - type: array - type: object - StreamFilterOrFilter: - properties: - or: - items: - $ref: '#/components/schemas/StreamFilterSimpleExpression' - maxItems: 3 - type: array - type: object StreamSubscriptionSelector: example: include: @@ -61884,7 +64354,6 @@ components: metricIndex: metricIndex eventIndex: eventIndex source: source - transformAlerts: true credential: password: password apiKey: apiKey @@ -61972,7 +64441,6 @@ components: metricIndex: metricIndex eventIndex: eventIndex source: source - transformAlerts: true properties: eventIndex: description: event index @@ -61992,10 +64460,6 @@ components: metricUri: description: metric uri type: string - transformAlerts: - description: transform alerts - example: true - type: boolean type: object StreamSubscription: description: Stream Subscription object @@ -62013,6 +64477,7 @@ components: - equinix.fabric.connection.* - equinix.fabric.connection.* - equinix.fabric.connection.* + lastErrorMessage: lastErrorMessage eventSelector: include: - equinix.fabric.connection.* @@ -62035,7 +64500,6 @@ components: metricIndex: metricIndex eventIndex: eventIndex source: source - transformAlerts: true credential: password: password apiKey: apiKey @@ -62065,13 +64529,6 @@ components: updatedDateTime: 2020-11-06T07:00:00Z href: https://api.equinix.com/fabric/v4/streams/d684aa26-8276-48b7-bb42-a6d9def0a418/subscriptions/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170 state: PROVISIONING - filters: - and: - - null - - null - - null - - null - - null type: STREAM_SUBSCRIPTION uuid: c9b8e7a2-f3b1-4576-a4a9-1366a63df170 enabled: true @@ -62111,8 +64568,6 @@ components: enabled: description: Stream subscription enabled status type: boolean - filters: - $ref: '#/components/schemas/StreamSubscriptionFilter' metricSelector: $ref: '#/components/schemas/StreamSubscriptionSelector' eventSelector: @@ -62121,6 +64576,9 @@ components: $ref: '#/components/schemas/StreamSubscriptionSink' changeLog: $ref: '#/components/schemas/Changelog' + lastErrorMessage: + description: HTTP response from sink type if error occurred + type: string type: object StreamSubscriptionId: description: Stream Subscription UUID @@ -62165,7 +64623,6 @@ components: metricIndex: metricIndex eventIndex: eventIndex source: source - transformAlerts: true credential: password: password apiKey: apiKey @@ -62449,6 +64906,130 @@ components: description: Stream alert rule metric critical threshold type: string type: object + Error: + description: Error Response with details + example: + help: help + errorMessage: errorMessage + additionalInfo: + - reason: reason + property: property + - reason: reason + property: property + errorCode: errorCode + correlationId: correlationId + details: details + properties: + errorCode: + pattern: "^EQ-\\d{7}$" + type: string + errorMessage: + type: string + correlationId: + type: string + details: + type: string + help: + type: string + additionalInfo: + items: + $ref: '#/components/schemas/PriceError_additionalInfo' + type: array + required: + - errorCode + - errorMessage + type: object + CloudEventData: + example: + resource: + name: name + href: href + state: state + type: type + uuid: uuid + auth: + name: name + authid: equinix + email: email + authtype: system + message: message + properties: + message: + description: Cloud Event message + type: string + resource: + $ref: '#/components/schemas/ResourceData' + auth: + $ref: '#/components/schemas/AuthContext' + type: object + ResourceData: + example: + name: name + href: href + state: state + type: type + uuid: uuid + properties: + href: + description: Cloud Event asset href + type: string + uuid: + description: Cloud Event asset uuid + type: string + type: + description: Cloud Event asset type + type: string + name: + description: Cloud Event asset name + type: string + state: + description: Cloud Event asset state + type: string + type: object + AuthContext: + example: + name: name + authid: equinix + email: email + authtype: system + properties: + authtype: + description: Cloud Event auth type + enum: + - system + - user + type: string + authid: + description: Cloud Event auth identifier + enum: + - equinix + - userId + type: string + name: + description: Cloud Event username + type: string + email: + description: Cloud Event email + type: string + type: object + PaginationRequest: + description: Pagination request information + example: + offset: 0 + limit: 1 + properties: + offset: + default: 0 + description: Index of the first element. + minimum: 0 + type: integer + limit: + default: 20 + description: "Number of elements to be requested per page. Number must be\ + \ between 1 and 100, and the default is 20." + minimum: 1 + type: integer + type: object ConnectionType: description: Connection type enum: @@ -63690,39 +66271,6 @@ components: format: date-time type: string type: object - Error: - description: Error Response with details - example: - help: help - errorMessage: errorMessage - additionalInfo: - - reason: reason - property: property - - reason: reason - property: property - errorCode: errorCode - correlationId: correlationId - details: details - properties: - errorCode: - pattern: "^EQ-\\d{7}$" - type: string - errorMessage: - type: string - correlationId: - type: string - details: - type: string - help: - type: string - additionalInfo: - items: - $ref: '#/components/schemas/PriceError_additionalInfo' - type: array - required: - - errorCode - - errorMessage - type: object ConnectionChangeOperation: description: Connection change operation data example: @@ -64590,24 +67138,6 @@ components: readOnly: true type: integer type: object - PaginationRequest: - description: Pagination request information - example: - offset: 0 - limit: 1 - properties: - offset: - default: 0 - description: Index of the first element. - minimum: 0 - type: integer - limit: - default: 20 - description: "Number of elements to be requested per page. Number must be\ - \ between 1 and 100, and the default is 20." - minimum: 1 - type: integer - type: object ConnectionRouteTableEntry: description: Advertised and received route table entry object example: @@ -65470,12 +68000,14 @@ components: enum: - XF_PORT - IX_PORT + - IA_PORT type: string PortState: description: Port lifecycle state enum: - PENDING - PROVISIONING + - REPROVISIONING - PROVISIONED - ACTIVE - DEPROVISIONING @@ -65566,6 +68098,53 @@ components: format: date-time type: string type: object + PortChange: + description: Current state of latest port change + example: + data: + op: replace + path: /name + value: "{}" + createdDateTime: 2020-11-06T07:00:00Z + information: information + type: PORT_CREATION + uuid: uuid + status: COMPLETED + updatedDateTime: 2020-11-06T07:00:00Z + properties: + uuid: + description: Uniquely identifies a change + type: string + type: + description: Type of change + enum: + - PORT_CREATION + - PORT_UPDATE + - PORT_DELETION + type: string + status: + description: Current outcome of the change flow + enum: + - COMPLETED + - FAILED + - REQUESTED + type: string + information: + description: Additional information + type: string + data: + $ref: '#/components/schemas/PortChangeOperation' + createdDateTime: + description: Set when change flow starts + example: 2020-11-06T07:00:00Z + format: date-time + type: string + updatedDateTime: + description: Set when change object is updated + example: 2020-11-06T07:00:00Z + format: date-time + type: string + type: object PortDevice: description: Port device example: @@ -66552,6 +69131,95 @@ components: example: 6 type: integer type: object + CloudRouterCommandType: + description: Fabric Cloud Router Command Type + enum: + - PING_COMMAND + example: PING_COMMAND + type: string + CloudRouterCommandRequest: + description: Fabric Cloud Router Command Request + example: + dataBytes: 100 + destination: 8.8.8.8 + count: 5 + sourceConnection: + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + interval: 1000 + timeout: 5 + properties: + destination: + description: Fabric Cloud Router Ping Command Destination + example: 8.8.8.8 + type: string + sourceConnection: + $ref: '#/components/schemas/CloudRouterCommandRequestConnection' + timeout: + description: Fabric Cloud Router Ping Command Timeout + example: 5 + type: integer + dataBytes: + default: 64 + description: Fabric Cloud Router Ping Command DataBytes + example: 100 + maximum: 9000 + minimum: 16 + type: integer + interval: + default: 1000 + description: Time in milliseconds between sending each packet + example: 1000 + readOnly: true + type: integer + count: + default: 5 + description: Total number of ping requests + example: 5 + readOnly: true + type: integer + required: + - destination + type: object + CloudRouterCommandState: + description: Fabric Cloud Router Command State + enum: + - PENDING + - SUCCEEDED + - FAILED + - DELETED + example: SUCCEEDED + type: string + CloudRouterCommandResponse: + example: + output: output + outputStructuredPing: + destinationIp: 8.8.8.8 + dataBytes: 100 + rttAvg: 15.483 + rttMin: 9.271 + rttMax: 26.771 + packetsReceived: 4 + destinationName: 8.8.8.8 + packetsLossPercent: 0 + responses: + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + packetsTransmitted: 4 + rttStdDev: 7.039 + properties: + output: + type: string + outputStructuredPing: + $ref: '#/components/schemas/OutputStructuredPing' + type: object RouteTableEntry: description: Route table entry object example: @@ -68320,6 +70988,8 @@ components: - EVPLAN - EPLAN - IPWAN + - EVPTREE + - EPTREE type: string NetworkScope: description: Network scope @@ -68630,6 +71300,25 @@ components: type: string title: precisionTimeOrder type: object + precisionTimePackagePostResponse: + example: + href: https://api.equinix.com/fabric/v4/timeServicePackage/NTP_STANDARD + code: NTP_STANDARD + properties: + href: + format: uri + type: string + code: + enum: + - NTP_STANDARD + - NTP_ENTERPRISE + - PTP_STANDARD + - PTP_ENTERPRISE + type: string + required: + - code + title: precisionTimePackagePostResponse + type: object virtualConnectionTimeServiceResponse: description: Fabric Connection Precision Time Service Response Object example: @@ -69757,10 +72446,6 @@ components: $ref: '#/components/schemas/virtualConnectionSide' zSide: $ref: '#/components/schemas/virtualConnectionSide' - required: - - href - - type - - uuid title: fabricConnectionResponse type: object precisionTimePrice: @@ -69800,6 +72485,82 @@ components: format: uuid type: string type: object + StreamSubscriptionFilter: + example: + and: + - null + - null + - null + - null + - null + properties: + and: + items: + $ref: '#/components/schemas/StreamFilter' + maxItems: 8 + type: array + type: object + StreamFilter: + anyOf: + - $ref: '#/components/schemas/StreamFilterSimpleExpression' + - $ref: '#/components/schemas/StreamFilterOrFilter' + type: object + StreamFilterSimpleExpression: + properties: + property: + description: | + Possible field names to use on filters: + * `/subject` - subject + * `/type` - type + example: /type + type: string + operator: + description: | + Possible operators to use on filters: + * `=` - equal + * `in` - in + * `LIKE` - case-sensitive like + * `ILIKE` - case-insensitive like + example: = + type: string + values: + 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 + type: array + type: object + StreamFilterOrFilter: + properties: + or: + items: + $ref: '#/components/schemas/StreamFilterSimpleExpression' + maxItems: 3 + type: array + type: object ConnectionPriority: description: Connection priority in redundancy group enum: @@ -70938,6 +73699,80 @@ components: format: int64 type: integer type: object + CloudRouterCommandRequestConnection: + description: Connection object for Cloud Router Command + example: + uuid: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + properties: + uuid: + description: Connection UUID + example: 557400f8-d360-11e9-bb65-2a2ae2dbcce4 + type: string + type: object + OutputStructuredPing: + example: + destinationIp: 8.8.8.8 + dataBytes: 100 + rttAvg: 15.483 + rttMin: 9.271 + rttMax: 26.771 + packetsReceived: 4 + destinationName: 8.8.8.8 + packetsLossPercent: 0 + responses: + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + - icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + packetsTransmitted: 4 + rttStdDev: 7.039 + properties: + destinationIp: + example: 8.8.8.8 + type: string + destinationName: + example: 8.8.8.8 + type: string + dataBytes: + example: 100 + type: integer + packetsTransmitted: + example: 4 + type: integer + packetsReceived: + example: 4 + type: integer + packetsLossPercent: + example: 0 + format: float + type: number + rttMin: + example: 9.271 + format: float + type: number + rttAvg: + example: 15.483 + format: float + type: number + rttMax: + example: 26.771 + format: float + type: number + rttStdDev: + example: 7.039 + format: float + type: number + responses: + items: + $ref: '#/components/schemas/OutputStructuredPingResponseItem' + type: array + type: object RouteTableEntryState: description: Route table entry state enum: @@ -72411,6 +75246,31 @@ components: network: $ref: '#/components/schemas/SimplifiedTokenNetwork' type: object + OutputStructuredPingResponseItem: + example: + icmpSeq: 0 + bytes: 100 + ip: 8.8.8.8 + time: 9.839 + ttl: 117 + properties: + bytes: + example: 100 + type: integer + ip: + example: 8.8.8.8 + type: string + icmpSeq: + example: 0 + type: integer + ttl: + example: 117 + type: integer + time: + example: 9.839 + format: float + type: number + type: object LinkProtocolType: description: Type of Link Protocol enum: diff --git a/equinix-openapi-fabric/docs/AuthContext.md b/equinix-openapi-fabric/docs/AuthContext.md new file mode 100644 index 00000000..80aef190 --- /dev/null +++ b/equinix-openapi-fabric/docs/AuthContext.md @@ -0,0 +1,34 @@ + + +# AuthContext + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authtype** | [**AuthtypeEnum**](#AuthtypeEnum) | Cloud Event auth type | [optional] | +|**authid** | [**AuthidEnum**](#AuthidEnum) | Cloud Event auth identifier | [optional] | +|**name** | **String** | Cloud Event username | [optional] | +|**email** | **String** | Cloud Event email | [optional] | + + + +## Enum: AuthtypeEnum + +| Name | Value | +|---- | -----| +| SYSTEM | "system" | +| USER | "user" | + + + +## Enum: AuthidEnum + +| Name | Value | +|---- | -----| +| EQUINIX | "equinix" | +| USERID | "userId" | + + + diff --git a/equinix-openapi-fabric/docs/CloudEvent.md b/equinix-openapi-fabric/docs/CloudEvent.md new file mode 100644 index 00000000..8f74b8ea --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudEvent.md @@ -0,0 +1,26 @@ + + +# CloudEvent + +Cloud Event object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**spec** | **String** | Cloud Event Open Telemetry specification | [optional] [readonly] | +|**source** | **String** | Cloud Event source | [optional] | +|**id** | **UUID** | Cloud Event identifier | [optional] | +|**type** | **String** | Equinix supported event type | [optional] | +|**subject** | **String** | Cloud Event subject | [optional] | +|**dataschema** | **String** | Cloud Event dataschema reference | [optional] | +|**datacontenttype** | **String** | Cloud Event data content type | [optional] | +|**severitynumber** | **String** | Cloud Event severity number | [optional] | +|**severitytext** | **String** | Cloud Event severity text | [optional] | +|**equinixproject** | **UUID** | Equinix project identifier | [optional] | +|**authtype** | **String** | Cloud Event auth type | [optional] | +|**authid** | **String** | Cloud Event user identifier | [optional] | +|**data** | [**CloudEventData**](CloudEventData.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudEventAssetType.md b/equinix-openapi-fabric/docs/CloudEventAssetType.md new file mode 100644 index 00000000..55f97a2c --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudEventAssetType.md @@ -0,0 +1,15 @@ + + +# CloudEventAssetType + +## Enum + + +* `PORTS` (value: `"ports"`) + +* `CONNECTIONS` (value: `"connections"`) + +* `ROUTERS` (value: `"routers"`) + + + diff --git a/equinix-openapi-fabric/docs/CloudEventData.md b/equinix-openapi-fabric/docs/CloudEventData.md new file mode 100644 index 00000000..d3d034c5 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudEventData.md @@ -0,0 +1,15 @@ + + +# CloudEventData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**message** | **String** | Cloud Event message | [optional] | +|**resource** | [**ResourceData**](ResourceData.md) | | [optional] | +|**auth** | [**AuthContext**](AuthContext.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudEventFilter.md b/equinix-openapi-fabric/docs/CloudEventFilter.md new file mode 100644 index 00000000..79e88a2a --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudEventFilter.md @@ -0,0 +1,15 @@ + + +# CloudEventFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/subject` - Cloud Event subject description * `/type` - Cloud Event type * `/time` - Time of Cloud Events | [optional] | +|**operator** | **String** | 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 | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudEventFilters.md b/equinix-openapi-fabric/docs/CloudEventFilters.md new file mode 100644 index 00000000..222e6393 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudEventFilters.md @@ -0,0 +1,13 @@ + + +# CloudEventFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<CloudEventFilter>**](CloudEventFilter.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudEventSearchRequest.md b/equinix-openapi-fabric/docs/CloudEventSearchRequest.md new file mode 100644 index 00000000..5ec54f86 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudEventSearchRequest.md @@ -0,0 +1,16 @@ + + +# CloudEventSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**CloudEventFilters**](CloudEventFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<CloudEventFilters>**](CloudEventFilters.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudEventSimpleExpression.md b/equinix-openapi-fabric/docs/CloudEventSimpleExpression.md new file mode 100644 index 00000000..213a355d --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudEventSimpleExpression.md @@ -0,0 +1,15 @@ + + +# CloudEventSimpleExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | Possible field names to use on filters: * `/subject` - Cloud Event subject description * `/type` - Cloud Event type * `/time` - Time of Cloud Events | [optional] | +|**operator** | **String** | 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 | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudEventsApi.md b/equinix-openapi-fabric/docs/CloudEventsApi.md new file mode 100644 index 00000000..4a75639a --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudEventsApi.md @@ -0,0 +1,234 @@ +# CloudEventsApi + +All URIs are relative to *https://api.equinix.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**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 | + + + +# **getCloudEvent** +> CloudEvent getCloudEvent(cloudEventId) + +Get Cloud Event + +This API provides capability to retrieve a cloud event by uuid + +### Example +```java +// Import classes: +import com.equinix.openapi.fabric.ApiClient; +import com.equinix.openapi.fabric.ApiException; +import com.equinix.openapi.fabric.Configuration; +import com.equinix.openapi.fabric.auth.*; +import com.equinix.openapi.fabric.models.*; +import com.equinix.openapi.fabric.v4.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); + UUID cloudEventId = UUID.randomUUID(); // UUID | Cloud Event UUID + try { + CloudEvent result = apiInstance.getCloudEvent(cloudEventId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudEventsApi#getCloudEvent"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **cloudEventId** | **UUID**| Cloud Event UUID | | + +### Return type + +[**CloudEvent**](CloudEvent.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** | Cloud Event object | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getCloudEventByAssetId** +> GetCloudEventsByAssetResponse getCloudEventByAssetId(asset, assetId, fromDateTime, toDateTime, offset, limit) + +Get Cloud Events by Asset Id + +This API provides capability to retrieve cloud events of an asset id + +### Example +```java +// Import classes: +import com.equinix.openapi.fabric.ApiClient; +import com.equinix.openapi.fabric.ApiException; +import com.equinix.openapi.fabric.Configuration; +import com.equinix.openapi.fabric.auth.*; +import com.equinix.openapi.fabric.models.*; +import com.equinix.openapi.fabric.v4.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); + CloudEventAssetType asset = CloudEventAssetType.fromValue("ports"); // CloudEventAssetType | asset + UUID assetId = UUID.randomUUID(); // UUID | asset UUID + OffsetDateTime fromDateTime = OffsetDateTime.now(); // OffsetDateTime | Start date and time + OffsetDateTime toDateTime = OffsetDateTime.now(); // OffsetDateTime | End date and time + Integer offset = 0; // Integer | offset + Integer limit = 20; // Integer | limit + try { + GetCloudEventsByAssetResponse result = apiInstance.getCloudEventByAssetId(asset, assetId, fromDateTime, toDateTime, offset, limit); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudEventsApi#getCloudEventByAssetId"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **asset** | [**CloudEventAssetType**](.md)| asset | [enum: ports, connections, routers] | +| **assetId** | **UUID**| asset UUID | | +| **fromDateTime** | **OffsetDateTime**| Start date and time | [optional] | +| **toDateTime** | **OffsetDateTime**| End date and time | [optional] | +| **offset** | **Integer**| offset | [optional] [default to 0] | +| **limit** | **Integer**| limit | [optional] [default to 20] | + +### Return type + +[**GetCloudEventsByAssetResponse**](GetCloudEventsByAssetResponse.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 | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **searchCloudEvents** +> GetCloudEventsByAssetResponse searchCloudEvents(cloudEventSearchRequest) + +Search Cloud Events + +This API provides capability to search cloud events from a filtered query + +### Example +```java +// Import classes: +import com.equinix.openapi.fabric.ApiClient; +import com.equinix.openapi.fabric.ApiException; +import com.equinix.openapi.fabric.Configuration; +import com.equinix.openapi.fabric.auth.*; +import com.equinix.openapi.fabric.models.*; +import com.equinix.openapi.fabric.v4.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); + CloudEventSearchRequest cloudEventSearchRequest = new CloudEventSearchRequest(); // CloudEventSearchRequest | + try { + GetCloudEventsByAssetResponse result = apiInstance.searchCloudEvents(cloudEventSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudEventsApi#searchCloudEvents"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **cloudEventSearchRequest** | [**CloudEventSearchRequest**](CloudEventSearchRequest.md)| | | + +### Return type + +[**GetCloudEventsByAssetResponse**](GetCloudEventsByAssetResponse.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/equinix-openapi-fabric/docs/CloudRouter.md b/equinix-openapi-fabric/docs/CloudRouter.md index 25a947ec..9cc89f64 100644 --- a/equinix-openapi-fabric/docs/CloudRouter.md +++ b/equinix-openapi-fabric/docs/CloudRouter.md @@ -17,9 +17,9 @@ Fabric Cloud Router object |**marketplaceSubscription** | [**MarketplaceSubscription**](MarketplaceSubscription.md) | | [optional] | |**changeLog** | [**Changelog**](Changelog.md) | | [optional] | |**change** | [**CloudRouterChange**](CloudRouterChange.md) | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**location** | [**SimplifiedLocationWithoutIBX**](SimplifiedLocationWithoutIBX.md) | | [optional] | -|**_package** | [**CloudRouterPostRequestPackage**](CloudRouterPostRequestPackage.md) | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**location** | [**SimplifiedLocationWithoutIBX**](SimplifiedLocationWithoutIBX.md) | | | +|**_package** | [**CloudRouterPostRequestPackage**](CloudRouterPostRequestPackage.md) | | | |**order** | [**Order**](Order.md) | | [optional] | |**project** | [**Project**](Project.md) | | [optional] | |**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] | diff --git a/equinix-openapi-fabric/docs/CloudRouterCommand.md b/equinix-openapi-fabric/docs/CloudRouterCommand.md new file mode 100644 index 00000000..4a98d2bc --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommand.md @@ -0,0 +1,23 @@ + + +# CloudRouterCommand + +Get Fabric Cloud Router Command response object + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **String** | | [optional] | +|**type** | **CloudRouterCommandType** | | [optional] | +|**uuid** | **UUID** | | [optional] | +|**name** | **String** | Customer-provided Cloud Router name | [optional] | +|**description** | **String** | | [optional] | +|**state** | **CloudRouterCommandState** | | [optional] | +|**project** | [**Project**](Project.md) | | [optional] | +|**request** | [**CloudRouterCommandRequest**](CloudRouterCommandRequest.md) | | [optional] | +|**response** | [**CloudRouterCommandResponse**](CloudRouterCommandResponse.md) | | [optional] | +|**changeLog** | [**Changelog**](Changelog.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandPostRequest.md b/equinix-openapi-fabric/docs/CloudRouterCommandPostRequest.md new file mode 100644 index 00000000..bdee5c94 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandPostRequest.md @@ -0,0 +1,18 @@ + + +# CloudRouterCommandPostRequest + +Execute Cloud Router Command Request + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **CloudRouterCommandType** | | | +|**name** | **String** | Customer-provided Cloud Router Command name | [optional] | +|**description** | **String** | Customer-provided Cloud Router Command description | [optional] | +|**project** | [**Project**](Project.md) | | | +|**request** | [**CloudRouterCommandRequest**](CloudRouterCommandRequest.md) | | | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandRequest.md b/equinix-openapi-fabric/docs/CloudRouterCommandRequest.md new file mode 100644 index 00000000..9336ea48 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandRequest.md @@ -0,0 +1,19 @@ + + +# CloudRouterCommandRequest + +Fabric Cloud Router Command Request + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**destination** | **String** | Fabric Cloud Router Ping Command Destination | | +|**sourceConnection** | [**CloudRouterCommandRequestConnection**](CloudRouterCommandRequestConnection.md) | | [optional] | +|**timeout** | **Integer** | Fabric Cloud Router Ping Command Timeout | [optional] | +|**dataBytes** | **Integer** | Fabric Cloud Router Ping Command DataBytes | [optional] | +|**interval** | **Integer** | Time in milliseconds between sending each packet | [optional] [readonly] | +|**count** | **Integer** | Total number of ping requests | [optional] [readonly] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandRequestConnection.md b/equinix-openapi-fabric/docs/CloudRouterCommandRequestConnection.md new file mode 100644 index 00000000..d0c83322 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandRequestConnection.md @@ -0,0 +1,14 @@ + + +# CloudRouterCommandRequestConnection + +Connection object for Cloud Router Command + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | Connection UUID | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandResponse.md b/equinix-openapi-fabric/docs/CloudRouterCommandResponse.md new file mode 100644 index 00000000..ae1ca6a2 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandResponse.md @@ -0,0 +1,14 @@ + + +# CloudRouterCommandResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**output** | **String** | | [optional] | +|**outputStructuredPing** | [**OutputStructuredPing**](OutputStructuredPing.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandSearchExpression.md b/equinix-openapi-fabric/docs/CloudRouterCommandSearchExpression.md new file mode 100644 index 00000000..02fa4b33 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandSearchExpression.md @@ -0,0 +1,15 @@ + + +# CloudRouterCommandSearchExpression + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | 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 | [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 * `~*` - case-insensitive like | [optional] | +|**values** | **List<String>** | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandSearchFilter.md b/equinix-openapi-fabric/docs/CloudRouterCommandSearchFilter.md new file mode 100644 index 00000000..e9ad3f5c --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandSearchFilter.md @@ -0,0 +1,16 @@ + + +# CloudRouterCommandSearchFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**property** | **String** | 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 | [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 * `~*` - case-insensitive like | [optional] | +|**values** | **List<String>** | | [optional] | +|**or** | [**List<CloudRouterCommandSearchExpression>**](CloudRouterCommandSearchExpression.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandSearchFilters.md b/equinix-openapi-fabric/docs/CloudRouterCommandSearchFilters.md new file mode 100644 index 00000000..7e482cf4 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandSearchFilters.md @@ -0,0 +1,13 @@ + + +# CloudRouterCommandSearchFilters + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<CloudRouterCommandSearchFilter>**](CloudRouterCommandSearchFilter.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandSearchOrFilter.md b/equinix-openapi-fabric/docs/CloudRouterCommandSearchOrFilter.md new file mode 100644 index 00000000..6fc5775e --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandSearchOrFilter.md @@ -0,0 +1,13 @@ + + +# CloudRouterCommandSearchOrFilter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**or** | [**List<CloudRouterCommandSearchExpression>**](CloudRouterCommandSearchExpression.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandSearchRequest.md b/equinix-openapi-fabric/docs/CloudRouterCommandSearchRequest.md new file mode 100644 index 00000000..504f2010 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandSearchRequest.md @@ -0,0 +1,16 @@ + + +# CloudRouterCommandSearchRequest + +Search requests containing criteria + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**filter** | [**CloudRouterCommandSearchFilters**](CloudRouterCommandSearchFilters.md) | | [optional] | +|**pagination** | [**PaginationRequest**](PaginationRequest.md) | | [optional] | +|**sort** | [**List<CloudRouterCommandSearchSortCriteria>**](CloudRouterCommandSearchSortCriteria.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandSearchResponse.md b/equinix-openapi-fabric/docs/CloudRouterCommandSearchResponse.md new file mode 100644 index 00000000..88e00ba8 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandSearchResponse.md @@ -0,0 +1,14 @@ + + +# CloudRouterCommandSearchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<CloudRouterCommand>**](CloudRouterCommand.md) | Data returned from the API call. | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandSearchSortBy.md b/equinix-openapi-fabric/docs/CloudRouterCommandSearchSortBy.md new file mode 100644 index 00000000..5afa176f --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandSearchSortBy.md @@ -0,0 +1,17 @@ + + +# CloudRouterCommandSearchSortBy + +## Enum + + +* `CHANGELOG_CREATEDDATETIME` (value: `"/changeLog/createdDateTime"`) + +* `CHANGELOG_UPDATEDDATETIME` (value: `"/changeLog/updatedDateTime"`) + +* `NAME` (value: `"/name"`) + +* `TYPE` (value: `"/type"`) + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandSearchSortCriteria.md b/equinix-openapi-fabric/docs/CloudRouterCommandSearchSortCriteria.md new file mode 100644 index 00000000..1625a18c --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandSearchSortCriteria.md @@ -0,0 +1,14 @@ + + +# CloudRouterCommandSearchSortCriteria + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**direction** | **CloudRouterCommandSearchSortDirection** | | [optional] | +|**property** | **CloudRouterCommandSearchSortBy** | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandSearchSortDirection.md b/equinix-openapi-fabric/docs/CloudRouterCommandSearchSortDirection.md new file mode 100644 index 00000000..4a5b76a1 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandSearchSortDirection.md @@ -0,0 +1,13 @@ + + +# CloudRouterCommandSearchSortDirection + +## Enum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandState.md b/equinix-openapi-fabric/docs/CloudRouterCommandState.md new file mode 100644 index 00000000..c93a6eb9 --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandState.md @@ -0,0 +1,17 @@ + + +# CloudRouterCommandState + +## Enum + + +* `PENDING` (value: `"PENDING"`) + +* `SUCCEEDED` (value: `"SUCCEEDED"`) + +* `FAILED` (value: `"FAILED"`) + +* `DELETED` (value: `"DELETED"`) + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterCommandType.md b/equinix-openapi-fabric/docs/CloudRouterCommandType.md new file mode 100644 index 00000000..8cb60a3a --- /dev/null +++ b/equinix-openapi-fabric/docs/CloudRouterCommandType.md @@ -0,0 +1,11 @@ + + +# CloudRouterCommandType + +## Enum + + +* `PING_COMMAND` (value: `"PING_COMMAND"`) + + + diff --git a/equinix-openapi-fabric/docs/CloudRouterPostRequest.md b/equinix-openapi-fabric/docs/CloudRouterPostRequest.md index de4c5608..8d24b4ea 100644 --- a/equinix-openapi-fabric/docs/CloudRouterPostRequest.md +++ b/equinix-openapi-fabric/docs/CloudRouterPostRequest.md @@ -8,10 +8,10 @@ Create Cloud Router | 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] | +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**name** | **String** | Customer-provided Cloud Router name | | +|**location** | [**SimplifiedLocationWithoutIBX**](SimplifiedLocationWithoutIBX.md) | | | +|**_package** | [**CloudRouterPostRequestPackage**](CloudRouterPostRequestPackage.md) | | | |**order** | [**Order**](Order.md) | | [optional] | |**project** | [**Project**](Project.md) | | [optional] | |**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] | diff --git a/equinix-openapi-fabric/docs/CloudRoutersApi.md b/equinix-openapi-fabric/docs/CloudRoutersApi.md index ec860611..823fa8c2 100644 --- a/equinix-openapi-fabric/docs/CloudRoutersApi.md +++ b/equinix-openapi-fabric/docs/CloudRoutersApi.md @@ -6,12 +6,17 @@ All URIs are relative to *https://api.equinix.com* |------------- | ------------- | -------------| | [**createCloudRouter**](CloudRoutersApi.md#createCloudRouter) | **POST** /fabric/v4/routers | Create Routers | | [**createCloudRouterAction**](CloudRoutersApi.md#createCloudRouterAction) | **POST** /fabric/v4/routers/{routerId}/actions | Create Route Table Action | +| [**createCloudRouterCommand**](CloudRoutersApi.md#createCloudRouterCommand) | **POST** /fabric/v4/routers/{routerId}/commands | Initiate Command | | [**deleteCloudRouterByUuid**](CloudRoutersApi.md#deleteCloudRouterByUuid) | **DELETE** /fabric/v4/routers/{routerId} | Delete Routers | +| [**deleteCloudRouterCommandByUuid**](CloudRoutersApi.md#deleteCloudRouterCommandByUuid) | **DELETE** /fabric/v4/routers/{routerId}/commands/{commandId} | Delete Command | +| [**getAllCloudRouterCommands**](CloudRoutersApi.md#getAllCloudRouterCommands) | **GET** /fabric/v4/routers/{routerId}/commands | Get Commands | | [**getCloudRouterActions**](CloudRoutersApi.md#getCloudRouterActions) | **GET** /fabric/v4/routers/{routerId}/actions | Get Route Table Actions | | [**getCloudRouterActionsByUuid**](CloudRoutersApi.md#getCloudRouterActionsByUuid) | **GET** /fabric/v4/routers/{routerId}/actions/{actionId} | Get Route Table Action by ID | | [**getCloudRouterByUuid**](CloudRoutersApi.md#getCloudRouterByUuid) | **GET** /fabric/v4/routers/{routerId} | Get Routers | +| [**getCloudRouterCommand**](CloudRoutersApi.md#getCloudRouterCommand) | **GET** /fabric/v4/routers/{routerId}/commands/{commandId} | Get Command | | [**getCloudRouterPackageByCode**](CloudRoutersApi.md#getCloudRouterPackageByCode) | **GET** /fabric/v4/routerPackages/{routerPackageCode} | Get Package Details | | [**getCloudRouterPackages**](CloudRoutersApi.md#getCloudRouterPackages) | **GET** /fabric/v4/routerPackages | List Packages | +| [**searchCloudRouterCommands**](CloudRoutersApi.md#searchCloudRouterCommands) | **POST** /fabric/v4/routers/{routerId}/commands/search | Search Commands | | [**searchCloudRouterRoutes**](CloudRoutersApi.md#searchCloudRouterRoutes) | **POST** /fabric/v4/routers/{routerId}/routes/search | Search Route Table | | [**searchCloudRouters**](CloudRoutersApi.md#searchCloudRouters) | **POST** /fabric/v4/routers/search | Search Routers | | [**searchConnectionAdvertisedRoutes**](CloudRoutersApi.md#searchConnectionAdvertisedRoutes) | **POST** /fabric/v4/connections/{connectionId}/advertisedRoutes/search | Search Advertised Routes | @@ -169,6 +174,81 @@ public class Example { | **415** | Internal server error | - | | **500** | Internal server error | - | + +# **createCloudRouterCommand** +> CloudRouterCommand createCloudRouterCommand(routerId, cloudRouterCommandPostRequest) + +Initiate Command + +This API provides capability to initiate Command + +### Example +```java +// Import classes: +import com.equinix.openapi.fabric.ApiClient; +import com.equinix.openapi.fabric.ApiException; +import com.equinix.openapi.fabric.Configuration; +import com.equinix.openapi.fabric.auth.*; +import com.equinix.openapi.fabric.models.*; +import com.equinix.openapi.fabric.v4.api.CloudRoutersApi; + +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"); + + CloudRoutersApi apiInstance = new CloudRoutersApi(defaultClient); + UUID routerId = UUID.randomUUID(); // UUID | Router UUID + CloudRouterCommandPostRequest cloudRouterCommandPostRequest = new CloudRouterCommandPostRequest(); // CloudRouterCommandPostRequest | + try { + CloudRouterCommand result = apiInstance.createCloudRouterCommand(routerId, cloudRouterCommandPostRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudRoutersApi#createCloudRouterCommand"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **routerId** | **UUID**| Router UUID | | +| **cloudRouterCommandPostRequest** | [**CloudRouterCommandPostRequest**](CloudRouterCommandPostRequest.md)| | | + +### Return type + +[**CloudRouterCommand**](CloudRouterCommand.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** | Successful operation | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **415** | Internal server error | - | +| **500** | Internal server error | - | + # **deleteCloudRouterByUuid** > deleteCloudRouterByUuid(routerId) @@ -240,6 +320,152 @@ null (empty response body) | **404** | Not Found | - | | **500** | Internal server error | - | + +# **deleteCloudRouterCommandByUuid** +> deleteCloudRouterCommandByUuid(routerId, commandId) + +Delete Command + +This API provides capability to delete command based on command Id + +### Example +```java +// Import classes: +import com.equinix.openapi.fabric.ApiClient; +import com.equinix.openapi.fabric.ApiException; +import com.equinix.openapi.fabric.Configuration; +import com.equinix.openapi.fabric.auth.*; +import com.equinix.openapi.fabric.models.*; +import com.equinix.openapi.fabric.v4.api.CloudRoutersApi; + +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"); + + CloudRoutersApi apiInstance = new CloudRoutersApi(defaultClient); + UUID routerId = UUID.randomUUID(); // UUID | Router UUID + UUID commandId = UUID.randomUUID(); // UUID | Command UUID + try { + apiInstance.deleteCloudRouterCommandByUuid(routerId, commandId); + } catch (ApiException e) { + System.err.println("Exception when calling CloudRoutersApi#deleteCloudRouterCommandByUuid"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **routerId** | **UUID**| Router UUID | | +| **commandId** | **UUID**| Command UUID | | + +### Return type + +null (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Deleted command successfully | - | +| **400** | Bad request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **500** | Internal server error | - | + + +# **getAllCloudRouterCommands** +> GetAllCloudRouterCommands getAllCloudRouterCommands(routerId) + +Get Commands + +This API provides capability to fetch all commands + +### Example +```java +// Import classes: +import com.equinix.openapi.fabric.ApiClient; +import com.equinix.openapi.fabric.ApiException; +import com.equinix.openapi.fabric.Configuration; +import com.equinix.openapi.fabric.auth.*; +import com.equinix.openapi.fabric.models.*; +import com.equinix.openapi.fabric.v4.api.CloudRoutersApi; + +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"); + + CloudRoutersApi apiInstance = new CloudRoutersApi(defaultClient); + UUID routerId = UUID.randomUUID(); // UUID | Router UUID + try { + GetAllCloudRouterCommands result = apiInstance.getAllCloudRouterCommands(routerId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudRoutersApi#getAllCloudRouterCommands"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **routerId** | **UUID**| Router UUID | | + +### Return type + +[**GetAllCloudRouterCommands**](GetAllCloudRouterCommands.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** | Internal server error | - | +| **500** | Internal server error | - | + # **getCloudRouterActions** > CloudRouterActionResponse getCloudRouterActions(routerId, state) @@ -463,6 +689,81 @@ public class Example { | **404** | Not Found | - | | **500** | Internal server error | - | + +# **getCloudRouterCommand** +> CloudRouterCommand getCloudRouterCommand(routerId, commandId) + +Get Command + +This API provides capability to fetch command using command Id + +### Example +```java +// Import classes: +import com.equinix.openapi.fabric.ApiClient; +import com.equinix.openapi.fabric.ApiException; +import com.equinix.openapi.fabric.Configuration; +import com.equinix.openapi.fabric.auth.*; +import com.equinix.openapi.fabric.models.*; +import com.equinix.openapi.fabric.v4.api.CloudRoutersApi; + +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"); + + CloudRoutersApi apiInstance = new CloudRoutersApi(defaultClient); + UUID routerId = UUID.randomUUID(); // UUID | Router UUID + UUID commandId = UUID.randomUUID(); // UUID | Command UUID + try { + CloudRouterCommand result = apiInstance.getCloudRouterCommand(routerId, commandId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudRoutersApi#getCloudRouterCommand"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **routerId** | **UUID**| Router UUID | | +| **commandId** | **UUID**| Command UUID | | + +### Return type + +[**CloudRouterCommand**](CloudRouterCommand.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** | Internal server error | - | +| **500** | Internal server error | - | + # **getCloudRouterPackageByCode** > CloudRouterPackage getCloudRouterPackageByCode(routerPackageCode) @@ -608,6 +909,81 @@ public class Example { | **415** | Unsupported Media Type | - | | **500** | Internal server error | - | + +# **searchCloudRouterCommands** +> CloudRouterCommandSearchResponse searchCloudRouterCommands(routerId, cloudRouterCommandSearchRequest) + +Search Commands + +This API provides capability to search commands + +### Example +```java +// Import classes: +import com.equinix.openapi.fabric.ApiClient; +import com.equinix.openapi.fabric.ApiException; +import com.equinix.openapi.fabric.Configuration; +import com.equinix.openapi.fabric.auth.*; +import com.equinix.openapi.fabric.models.*; +import com.equinix.openapi.fabric.v4.api.CloudRoutersApi; + +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"); + + CloudRoutersApi apiInstance = new CloudRoutersApi(defaultClient); + UUID routerId = UUID.randomUUID(); // UUID | Router UUID + CloudRouterCommandSearchRequest cloudRouterCommandSearchRequest = new CloudRouterCommandSearchRequest(); // CloudRouterCommandSearchRequest | + try { + CloudRouterCommandSearchResponse result = apiInstance.searchCloudRouterCommands(routerId, cloudRouterCommandSearchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudRoutersApi#searchCloudRouterCommands"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **routerId** | **UUID**| Router UUID | | +| **cloudRouterCommandSearchRequest** | [**CloudRouterCommandSearchRequest**](CloudRouterCommandSearchRequest.md)| | | + +### Return type + +[**CloudRouterCommandSearchResponse**](CloudRouterCommandSearchResponse.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 | - | +| **415** | Internal server error | - | +| **500** | Internal server error | - | + # **searchCloudRouterRoutes** > RouteTableEntrySearchResponse searchCloudRouterRoutes(routerId, routeTableEntrySearchRequest) diff --git a/equinix-openapi-fabric/docs/ConnectionsApi.md b/equinix-openapi-fabric/docs/ConnectionsApi.md index d9755726..82a15001 100644 --- a/equinix-openapi-fabric/docs/ConnectionsApi.md +++ b/equinix-openapi-fabric/docs/ConnectionsApi.md @@ -377,7 +377,7 @@ public class Example { # **updateConnectionByUuid** -> Connection updateConnectionByUuid(connectionId, connectionChangeOperation) +> Connection updateConnectionByUuid(connectionId, connectionChangeOperation, dryRun) Update by ID @@ -405,8 +405,9 @@ public class Example { ConnectionsApi apiInstance = new ConnectionsApi(defaultClient); String connectionId = "connectionId_example"; // String | Connection Id List connectionChangeOperation = Arrays.asList(); // List | + Boolean dryRun = false; // Boolean | option to verify that API calls will succeed try { - Connection result = apiInstance.updateConnectionByUuid(connectionId, connectionChangeOperation); + Connection result = apiInstance.updateConnectionByUuid(connectionId, connectionChangeOperation, dryRun); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ConnectionsApi#updateConnectionByUuid"); @@ -425,6 +426,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **connectionId** | **String**| Connection Id | | | **connectionChangeOperation** | [**List<ConnectionChangeOperation>**](ConnectionChangeOperation.md)| | | +| **dryRun** | **Boolean**| option to verify that API calls will succeed | [optional] [default to false] | ### Return type @@ -442,7 +444,9 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | Successful operation | - | | **202** | Successful operation | - | +| **400** | Bad request | - | | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | diff --git a/equinix-openapi-fabric/docs/GetAllCloudRouterCommands.md b/equinix-openapi-fabric/docs/GetAllCloudRouterCommands.md new file mode 100644 index 00000000..c47e5ed8 --- /dev/null +++ b/equinix-openapi-fabric/docs/GetAllCloudRouterCommands.md @@ -0,0 +1,15 @@ + + +# GetAllCloudRouterCommands + +List of Fabric Cloud Router Command + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pagination** | [**Pagination**](Pagination.md) | | [optional] | +|**data** | [**List<CloudRouterCommand>**](CloudRouterCommand.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/GetCloudEventsByAssetResponse.md b/equinix-openapi-fabric/docs/GetCloudEventsByAssetResponse.md new file mode 100644 index 00000000..230d0ce4 --- /dev/null +++ b/equinix-openapi-fabric/docs/GetCloudEventsByAssetResponse.md @@ -0,0 +1,14 @@ + + +# GetCloudEventsByAssetResponse + + +## 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/equinix-openapi-fabric/docs/NetworkType.md b/equinix-openapi-fabric/docs/NetworkType.md index e46e3090..59e1dd57 100644 --- a/equinix-openapi-fabric/docs/NetworkType.md +++ b/equinix-openapi-fabric/docs/NetworkType.md @@ -11,5 +11,9 @@ * `IPWAN` (value: `"IPWAN"`) +* `EVPTREE` (value: `"EVPTREE"`) + +* `EPTREE` (value: `"EPTREE"`) + diff --git a/equinix-openapi-fabric/docs/NetworksApi.md b/equinix-openapi-fabric/docs/NetworksApi.md index 8115b4e0..940e51de 100644 --- a/equinix-openapi-fabric/docs/NetworksApi.md +++ b/equinix-openapi-fabric/docs/NetworksApi.md @@ -81,7 +81,7 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Successful operation | - | +| **201** | Successful operation | - | | **202** | Fabric Network Access point object | - | | **400** | Bad request | - | | **401** | Unauthorized | - | diff --git a/equinix-openapi-fabric/docs/OutputStructuredPing.md b/equinix-openapi-fabric/docs/OutputStructuredPing.md new file mode 100644 index 00000000..bd36a4d3 --- /dev/null +++ b/equinix-openapi-fabric/docs/OutputStructuredPing.md @@ -0,0 +1,23 @@ + + +# OutputStructuredPing + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**destinationIp** | **String** | | [optional] | +|**destinationName** | **String** | | [optional] | +|**dataBytes** | **Integer** | | [optional] | +|**packetsTransmitted** | **Integer** | | [optional] | +|**packetsReceived** | **Integer** | | [optional] | +|**packetsLossPercent** | **Float** | | [optional] | +|**rttMin** | **Float** | | [optional] | +|**rttAvg** | **Float** | | [optional] | +|**rttMax** | **Float** | | [optional] | +|**rttStdDev** | **Float** | | [optional] | +|**responses** | [**List<OutputStructuredPingResponseItem>**](OutputStructuredPingResponseItem.md) | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/OutputStructuredPingResponseItem.md b/equinix-openapi-fabric/docs/OutputStructuredPingResponseItem.md new file mode 100644 index 00000000..50618551 --- /dev/null +++ b/equinix-openapi-fabric/docs/OutputStructuredPingResponseItem.md @@ -0,0 +1,17 @@ + + +# OutputStructuredPingResponseItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bytes** | **Integer** | | [optional] | +|**ip** | **String** | | [optional] | +|**icmpSeq** | **Integer** | | [optional] | +|**ttl** | **Integer** | | [optional] | +|**time** | **Float** | | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/Port.md b/equinix-openapi-fabric/docs/Port.md index 155c3688..78397d3d 100644 --- a/equinix-openapi-fabric/docs/Port.md +++ b/equinix-openapi-fabric/docs/Port.md @@ -25,6 +25,7 @@ Port specification |**order** | [**PortOrder**](PortOrder.md) | | [optional] | |**operation** | [**PortOperation**](PortOperation.md) | | [optional] | |**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | [optional] | +|**change** | [**PortChange**](PortChange.md) | | [optional] | |**changeLog** | [**Changelog**](Changelog.md) | | [optional] | |**serviceType** | [**ServiceTypeEnum**](#ServiceTypeEnum) | Port service Type | [optional] | |**bandwidth** | **Integer** | Equinix assigned response attribute for Port bandwidth in Mbps | [optional] | diff --git a/equinix-openapi-fabric/docs/PortChange.md b/equinix-openapi-fabric/docs/PortChange.md new file mode 100644 index 00000000..0a2efd46 --- /dev/null +++ b/equinix-openapi-fabric/docs/PortChange.md @@ -0,0 +1,40 @@ + + +# PortChange + +Current state of latest port change + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | Uniquely identifies a change | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of change | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Current outcome of the change flow | [optional] | +|**information** | **String** | Additional information | [optional] | +|**data** | [**PortChangeOperation**](PortChangeOperation.md) | | [optional] | +|**createdDateTime** | **OffsetDateTime** | Set when change flow starts | [optional] | +|**updatedDateTime** | **OffsetDateTime** | Set when change object is updated | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CREATION | "PORT_CREATION" | +| UPDATE | "PORT_UPDATE" | +| DELETION | "PORT_DELETION" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| COMPLETED | "COMPLETED" | +| FAILED | "FAILED" | +| REQUESTED | "REQUESTED" | + + + diff --git a/equinix-openapi-fabric/docs/PortRequest.md b/equinix-openapi-fabric/docs/PortRequest.md index 1a75dd48..4e904326 100644 --- a/equinix-openapi-fabric/docs/PortRequest.md +++ b/equinix-openapi-fabric/docs/PortRequest.md @@ -25,6 +25,7 @@ PortRequest is the Request Object for creating single and bulk fabric ports |**order** | [**PortOrder**](PortOrder.md) | | [optional] | |**operation** | [**PortOperation**](PortOperation.md) | | [optional] | |**account** | [**SimplifiedAccount**](SimplifiedAccount.md) | | | +|**change** | [**PortChange**](PortChange.md) | | [optional] | |**changeLog** | [**Changelog**](Changelog.md) | | [optional] | |**serviceType** | [**ServiceTypeEnum**](#ServiceTypeEnum) | Port service Type | [optional] | |**bandwidth** | **Integer** | Equinix assigned response attribute for Port bandwidth in Mbps | [optional] | diff --git a/equinix-openapi-fabric/docs/PortState.md b/equinix-openapi-fabric/docs/PortState.md index ab4a190e..e18e5ed1 100644 --- a/equinix-openapi-fabric/docs/PortState.md +++ b/equinix-openapi-fabric/docs/PortState.md @@ -9,6 +9,8 @@ * `PROVISIONING` (value: `"PROVISIONING"`) +* `REPROVISIONING` (value: `"REPROVISIONING"`) + * `PROVISIONED` (value: `"PROVISIONED"`) * `ACTIVE` (value: `"ACTIVE"`) diff --git a/equinix-openapi-fabric/docs/PortType.md b/equinix-openapi-fabric/docs/PortType.md index 6d386c8f..9db1ba32 100644 --- a/equinix-openapi-fabric/docs/PortType.md +++ b/equinix-openapi-fabric/docs/PortType.md @@ -9,5 +9,7 @@ * `IX_PORT` (value: `"IX_PORT"`) +* `IA_PORT` (value: `"IA_PORT"`) + diff --git a/equinix-openapi-fabric/docs/PrecisionTimePackagePostResponse.md b/equinix-openapi-fabric/docs/PrecisionTimePackagePostResponse.md new file mode 100644 index 00000000..2be007a2 --- /dev/null +++ b/equinix-openapi-fabric/docs/PrecisionTimePackagePostResponse.md @@ -0,0 +1,25 @@ + + +# PrecisionTimePackagePostResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | | [optional] | +|**code** | [**CodeEnum**](#CodeEnum) | | | + + + +## Enum: CodeEnum + +| Name | Value | +|---- | -----| +| NTP_STANDARD | "NTP_STANDARD" | +| NTP_ENTERPRISE | "NTP_ENTERPRISE" | +| PTP_STANDARD | "PTP_STANDARD" | +| PTP_ENTERPRISE | "PTP_ENTERPRISE" | + + + diff --git a/equinix-openapi-fabric/docs/PrecisionTimeServiceResponse.md b/equinix-openapi-fabric/docs/PrecisionTimeServiceResponse.md index 426a6b0e..ff421d93 100644 --- a/equinix-openapi-fabric/docs/PrecisionTimeServiceResponse.md +++ b/equinix-openapi-fabric/docs/PrecisionTimeServiceResponse.md @@ -13,7 +13,7 @@ Precision Time Service Response Schema. |**name** | **String** | Precision Time Service Name. | [optional] | |**uuid** | **UUID** | Precision Time Service UUID. | | |**state** | [**StateEnum**](#StateEnum) | Precision Time Service Status. | | -|**_package** | [**PrecisionTimePackageResponse**](PrecisionTimePackageResponse.md) | | | +|**_package** | [**PrecisionTimePackagePostResponse**](PrecisionTimePackagePostResponse.md) | | | |**connections** | [**Set<VirtualConnectionTimeServiceResponse>**](VirtualConnectionTimeServiceResponse.md) | Fabric Connections associated with Precision Time Service. | [optional] | |**ipv4** | [**Ipv4**](Ipv4.md) | | [optional] | |**ntpAdvancedConfiguration** | [**List<Md5>**](Md5.md) | NTP Advanced configuration - MD5 Authentication. | [optional] | diff --git a/equinix-openapi-fabric/docs/ResourceData.md b/equinix-openapi-fabric/docs/ResourceData.md new file mode 100644 index 00000000..6a65069e --- /dev/null +++ b/equinix-openapi-fabric/docs/ResourceData.md @@ -0,0 +1,17 @@ + + +# ResourceData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **String** | Cloud Event asset href | [optional] | +|**uuid** | **String** | Cloud Event asset uuid | [optional] | +|**type** | **String** | Cloud Event asset type | [optional] | +|**name** | **String** | Cloud Event asset name | [optional] | +|**state** | **String** | Cloud Event asset state | [optional] | + + + diff --git a/equinix-openapi-fabric/docs/ServiceTokensApi.md b/equinix-openapi-fabric/docs/ServiceTokensApi.md index 2761dd97..753339fb 100644 --- a/equinix-openapi-fabric/docs/ServiceTokensApi.md +++ b/equinix-openapi-fabric/docs/ServiceTokensApi.md @@ -446,7 +446,7 @@ public class Example { # **updateServiceTokenByUuid** -> ServiceToken updateServiceTokenByUuid(serviceTokenId, serviceTokenChangeOperation) +> ServiceToken updateServiceTokenByUuid(serviceTokenId, serviceTokenChangeOperation, dryRun) Update Token By ID @@ -474,8 +474,9 @@ public class Example { ServiceTokensApi apiInstance = new ServiceTokensApi(defaultClient); UUID serviceTokenId = UUID.randomUUID(); // UUID | Service Token UUID List serviceTokenChangeOperation = Arrays.asList(); // List | + Boolean dryRun = false; // Boolean | option to verify that API calls will succeed try { - ServiceToken result = apiInstance.updateServiceTokenByUuid(serviceTokenId, serviceTokenChangeOperation); + ServiceToken result = apiInstance.updateServiceTokenByUuid(serviceTokenId, serviceTokenChangeOperation, dryRun); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ServiceTokensApi#updateServiceTokenByUuid"); @@ -494,6 +495,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **serviceTokenId** | **UUID**| Service Token UUID | | | **serviceTokenChangeOperation** | [**List<ServiceTokenChangeOperation>**](ServiceTokenChangeOperation.md)| | | +| **dryRun** | **Boolean**| option to verify that API calls will succeed | [optional] [default to false] | ### Return type diff --git a/equinix-openapi-fabric/docs/StreamSubscription.md b/equinix-openapi-fabric/docs/StreamSubscription.md index 365ee5cd..c578c8f7 100644 --- a/equinix-openapi-fabric/docs/StreamSubscription.md +++ b/equinix-openapi-fabric/docs/StreamSubscription.md @@ -15,11 +15,11 @@ Stream Subscription object |**description** | **String** | Customer-provided subscription description | [optional] | |**state** | [**StateEnum**](#StateEnum) | Steam subscription provision state | [optional] | |**enabled** | **Boolean** | Stream subscription enabled status | [optional] | -|**filters** | [**StreamSubscriptionFilter**](StreamSubscriptionFilter.md) | | [optional] | |**metricSelector** | [**StreamSubscriptionSelector**](StreamSubscriptionSelector.md) | | [optional] | |**eventSelector** | [**StreamSubscriptionSelector**](StreamSubscriptionSelector.md) | | [optional] | |**sink** | [**StreamSubscriptionSink**](StreamSubscriptionSink.md) | | [optional] | |**changeLog** | [**Changelog**](Changelog.md) | | [optional] | +|**lastErrorMessage** | **String** | HTTP response from sink type if error occurred | [optional] | diff --git a/equinix-openapi-fabric/docs/StreamSubscriptionPostRequest.md b/equinix-openapi-fabric/docs/StreamSubscriptionPostRequest.md index 368fa79a..fe48eb34 100644 --- a/equinix-openapi-fabric/docs/StreamSubscriptionPostRequest.md +++ b/equinix-openapi-fabric/docs/StreamSubscriptionPostRequest.md @@ -12,7 +12,6 @@ Create Stream Subscription |**name** | **String** | Customer-provided stream subscription name | [optional] | |**description** | **String** | Customer-provided stream subscription description | [optional] | |**enabled** | **Boolean** | Stream subscription enabled status | [optional] | -|**filters** | [**StreamSubscriptionFilter**](StreamSubscriptionFilter.md) | | [optional] | |**metricSelector** | [**StreamSubscriptionSelector**](StreamSubscriptionSelector.md) | | [optional] | |**eventSelector** | [**StreamSubscriptionSelector**](StreamSubscriptionSelector.md) | | [optional] | |**sink** | [**StreamSubscriptionSink**](StreamSubscriptionSink.md) | | [optional] | diff --git a/equinix-openapi-fabric/docs/StreamSubscriptionSinkSetting.md b/equinix-openapi-fabric/docs/StreamSubscriptionSinkSetting.md index b036544f..2e03117c 100644 --- a/equinix-openapi-fabric/docs/StreamSubscriptionSinkSetting.md +++ b/equinix-openapi-fabric/docs/StreamSubscriptionSinkSetting.md @@ -14,7 +14,6 @@ Stream subscription sink settings |**applicationKey** | **String** | Application key | [optional] | |**eventUri** | **String** | event uri | [optional] | |**metricUri** | **String** | metric uri | [optional] | -|**transformAlerts** | **Boolean** | transform alerts | [optional] | diff --git a/equinix-openapi-fabric/docs/VirtualConnectionTimeServiceResponse.md b/equinix-openapi-fabric/docs/VirtualConnectionTimeServiceResponse.md index 06fa30d1..3e90089e 100644 --- a/equinix-openapi-fabric/docs/VirtualConnectionTimeServiceResponse.md +++ b/equinix-openapi-fabric/docs/VirtualConnectionTimeServiceResponse.md @@ -8,9 +8,9 @@ Fabric Connection Precision Time Service Response Object | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**href** | **URI** | Connection URI | [readonly] | -|**type** | **String** | Connection Type. | | -|**uuid** | **UUID** | Connection UUID. | | +|**href** | **URI** | Connection URI | [optional] [readonly] | +|**type** | **String** | Connection Type. | [optional] | +|**uuid** | **UUID** | Connection UUID. | [optional] | |**aSide** | [**VirtualConnectionSide**](VirtualConnectionSide.md) | | [optional] | |**zSide** | [**VirtualConnectionSide**](VirtualConnectionSide.md) | | [optional] | diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/JSON.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/JSON.java index d64d653b..546f968f 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/JSON.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/JSON.java @@ -150,6 +150,7 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AllPortsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ApiConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ApiServices.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AuthContext.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.AuthenticationKey.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPActionData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BGPActionRequest.CustomTypeAdapterFactory()); @@ -163,6 +164,12 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.BulkPortRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Change.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Changelog.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudEvent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudEventData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudEventFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudEventFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudEventSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudEventSimpleExpression.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterActionRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterActionResponse.CustomTypeAdapterFactory()); @@ -175,6 +182,18 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterActionsSearchSortCriteria.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterChange.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterChangeOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommand.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandPostRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandRequestConnection.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchExpression.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchFilters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchOrFilter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchSortCriteria.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterFilter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterFilters.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.CloudRouterOrFilter.CustomTypeAdapterFactory()); @@ -225,11 +244,13 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.FabricCloudRouterPrice.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.FilterBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GeoCoordinates.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetAllCloudRouterCommands.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetAllConnectionRouteAggregationsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetAllConnectionRouteFiltersResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetAllStreamAssetResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetAllStreamResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetAllStreamSubscriptionResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetCloudEventsByAssetResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetRouteAggregationGetConnectionsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.GetRouteAggregationRulesResponse.CustomTypeAdapterFactory()); @@ -271,6 +292,8 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.NetworkSortCriteriaResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Operation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Order.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.OutputStructuredPing.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.OutputStructuredPingResponseItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PackageChangeLog.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PackageResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Pagination.CustomTypeAdapterFactory()); @@ -279,6 +302,7 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PhysicalPortSettings.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.Port.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortAdditionalInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortChange.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortChangeOperation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortDemarcationPoint.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortDevice.CustomTypeAdapterFactory()); @@ -302,6 +326,7 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PortV4SearchRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeChangeOperation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimeOrder.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimePackagePostResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimePackageRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimePackageResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PrecisionTimePrice.CustomTypeAdapterFactory()); @@ -320,6 +345,7 @@ public Enum deserialize(JsonElement json, java.lang.reflect.Type type, JsonDeser gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.PtpAdvanceConfiguration.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RemoveOperation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ReplaceOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ResourceData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.ResourceSelector.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteAggregationChangeData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.equinix.openapi.fabric.v4.model.RouteAggregationChangeDataResponse.CustomTypeAdapterFactory()); diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/CloudEventsApi.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/CloudEventsApi.java new file mode 100644 index 00000000..b168bc33 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/CloudEventsApi.java @@ -0,0 +1,539 @@ +/* + * 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.openapi.fabric.v4.api; + +import com.equinix.openapi.fabric.ApiCallback; +import com.equinix.openapi.fabric.ApiClient; +import com.equinix.openapi.fabric.ApiException; +import com.equinix.openapi.fabric.ApiResponse; +import com.equinix.openapi.fabric.Configuration; +import com.equinix.openapi.fabric.Pair; +import com.equinix.openapi.fabric.ProgressRequestBody; +import com.equinix.openapi.fabric.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.equinix.openapi.fabric.v4.model.CloudEvent; +import com.equinix.openapi.fabric.v4.model.CloudEventAssetType; +import com.equinix.openapi.fabric.v4.model.CloudEventSearchRequest; +import com.equinix.openapi.fabric.v4.model.Error; +import com.equinix.openapi.fabric.v4.model.GetCloudEventsByAssetResponse; +import java.time.OffsetDateTime; +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; +import javax.ws.rs.core.GenericType; + +public class CloudEventsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public CloudEventsApi() { + this(Configuration.getDefaultApiClient()); + } + + public CloudEventsApi(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 getCloudEvent + * @param cloudEventId Cloud Event 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 + + + + + + + +
Status Code Description Response Headers
200 Cloud Event object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getCloudEventCall(UUID cloudEventId, 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/cloudevents/{cloudEventId}" + .replace("{" + "cloudEventId" + "}", localVarApiClient.escapeString(cloudEventId.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 getCloudEventValidateBeforeCall(UUID cloudEventId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'cloudEventId' is set + if (cloudEventId == null) { + throw new ApiException("Missing the required parameter 'cloudEventId' when calling getCloudEvent(Async)"); + } + + return getCloudEventCall(cloudEventId, _callback); + + } + + /** + * Get Cloud Event + * This API provides capability to retrieve a cloud event by uuid + * @param cloudEventId Cloud Event UUID (required) + * @return CloudEvent + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Cloud Event object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public CloudEvent getCloudEvent(UUID cloudEventId) throws ApiException { + ApiResponse localVarResp = getCloudEventWithHttpInfo(cloudEventId); + return localVarResp.getData(); + } + + /** + * Get Cloud Event + * This API provides capability to retrieve a cloud event by uuid + * @param cloudEventId Cloud Event UUID (required) + * @return ApiResponse<CloudEvent> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Cloud Event object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getCloudEventWithHttpInfo(UUID cloudEventId) throws ApiException { + okhttp3.Call localVarCall = getCloudEventValidateBeforeCall(cloudEventId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Cloud Event (asynchronously) + * This API provides capability to retrieve a cloud event by uuid + * @param cloudEventId Cloud Event 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 + + + + + + + +
Status Code Description Response Headers
200 Cloud Event object -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getCloudEventAsync(UUID cloudEventId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCloudEventValidateBeforeCall(cloudEventId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCloudEventByAssetId + * @param asset asset (required) + * @param assetId asset UUID (required) + * @param fromDateTime Start date and time (optional) + * @param toDateTime End date and time (optional) + * @param offset offset (optional, default to 0) + * @param limit limit (optional, default to 20) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getCloudEventByAssetIdCall(CloudEventAssetType asset, UUID assetId, OffsetDateTime fromDateTime, OffsetDateTime toDateTime, Integer offset, 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/{asset}/{assetId}/cloudevents" + .replace("{" + "asset" + "}", localVarApiClient.escapeString(asset.toString())) + .replace("{" + "assetId" + "}", localVarApiClient.escapeString(assetId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (fromDateTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fromDateTime", fromDateTime)); + } + + if (toDateTime != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("toDateTime", toDateTime)); + } + + 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 getCloudEventByAssetIdValidateBeforeCall(CloudEventAssetType asset, UUID assetId, OffsetDateTime fromDateTime, OffsetDateTime toDateTime, Integer offset, Integer limit, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'asset' is set + if (asset == null) { + throw new ApiException("Missing the required parameter 'asset' when calling getCloudEventByAssetId(Async)"); + } + + // verify the required parameter 'assetId' is set + if (assetId == null) { + throw new ApiException("Missing the required parameter 'assetId' when calling getCloudEventByAssetId(Async)"); + } + + return getCloudEventByAssetIdCall(asset, assetId, fromDateTime, toDateTime, offset, limit, _callback); + + } + + /** + * Get Cloud Events by Asset Id + * This API provides capability to retrieve cloud events of an asset id + * @param asset asset (required) + * @param assetId asset UUID (required) + * @param fromDateTime Start date and time (optional) + * @param toDateTime End date and time (optional) + * @param offset offset (optional, default to 0) + * @param limit limit (optional, default to 20) + * @return GetCloudEventsByAssetResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public GetCloudEventsByAssetResponse getCloudEventByAssetId(CloudEventAssetType asset, UUID assetId, OffsetDateTime fromDateTime, OffsetDateTime toDateTime, Integer offset, Integer limit) throws ApiException { + ApiResponse localVarResp = getCloudEventByAssetIdWithHttpInfo(asset, assetId, fromDateTime, toDateTime, offset, limit); + return localVarResp.getData(); + } + + /** + * Get Cloud Events by Asset Id + * This API provides capability to retrieve cloud events of an asset id + * @param asset asset (required) + * @param assetId asset UUID (required) + * @param fromDateTime Start date and time (optional) + * @param toDateTime End date and time (optional) + * @param offset offset (optional, default to 0) + * @param limit limit (optional, default to 20) + * @return ApiResponse<GetCloudEventsByAssetResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse getCloudEventByAssetIdWithHttpInfo(CloudEventAssetType asset, UUID assetId, OffsetDateTime fromDateTime, OffsetDateTime toDateTime, Integer offset, Integer limit) throws ApiException { + okhttp3.Call localVarCall = getCloudEventByAssetIdValidateBeforeCall(asset, assetId, fromDateTime, toDateTime, offset, limit, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Cloud Events by Asset Id (asynchronously) + * This API provides capability to retrieve cloud events of an asset id + * @param asset asset (required) + * @param assetId asset UUID (required) + * @param fromDateTime Start date and time (optional) + * @param toDateTime End date and time (optional) + * @param offset offset (optional, default to 0) + * @param limit limit (optional, default to 20) + * @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 + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call getCloudEventByAssetIdAsync(CloudEventAssetType asset, UUID assetId, OffsetDateTime fromDateTime, OffsetDateTime toDateTime, Integer offset, Integer limit, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCloudEventByAssetIdValidateBeforeCall(asset, assetId, fromDateTime, toDateTime, offset, limit, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchCloudEvents + * @param cloudEventSearchRequest (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 + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call searchCloudEventsCall(CloudEventSearchRequest cloudEventSearchRequest, 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 = cloudEventSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/cloudevents/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 searchCloudEventsValidateBeforeCall(CloudEventSearchRequest cloudEventSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'cloudEventSearchRequest' is set + if (cloudEventSearchRequest == null) { + throw new ApiException("Missing the required parameter 'cloudEventSearchRequest' when calling searchCloudEvents(Async)"); + } + + return searchCloudEventsCall(cloudEventSearchRequest, _callback); + + } + + /** + * Search Cloud Events + * This API provides capability to search cloud events from a filtered query + * @param cloudEventSearchRequest (required) + * @return GetCloudEventsByAssetResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public GetCloudEventsByAssetResponse searchCloudEvents(CloudEventSearchRequest cloudEventSearchRequest) throws ApiException { + ApiResponse localVarResp = searchCloudEventsWithHttpInfo(cloudEventSearchRequest); + return localVarResp.getData(); + } + + /** + * Search Cloud Events + * This API provides capability to search cloud events from a filtered query + * @param cloudEventSearchRequest (required) + * @return ApiResponse<GetCloudEventsByAssetResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse searchCloudEventsWithHttpInfo(CloudEventSearchRequest cloudEventSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchCloudEventsValidateBeforeCall(cloudEventSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Cloud Events (asynchronously) + * This API provides capability to search cloud events from a filtered query + * @param cloudEventSearchRequest (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 + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call searchCloudEventsAsync(CloudEventSearchRequest cloudEventSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchCloudEventsValidateBeforeCall(cloudEventSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/CloudRoutersApi.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/CloudRoutersApi.java index 7fc0e270..f83a8601 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/CloudRoutersApi.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/CloudRoutersApi.java @@ -32,12 +32,17 @@ import com.equinix.openapi.fabric.v4.model.CloudRouterActionsSearchRequest; import com.equinix.openapi.fabric.v4.model.CloudRouterActionsSearchResponse; import com.equinix.openapi.fabric.v4.model.CloudRouterChangeOperation; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommand; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandPostRequest; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchRequest; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchResponse; import com.equinix.openapi.fabric.v4.model.CloudRouterPackage; import com.equinix.openapi.fabric.v4.model.CloudRouterPostRequest; import com.equinix.openapi.fabric.v4.model.CloudRouterSearchRequest; import com.equinix.openapi.fabric.v4.model.ConnectionRouteSearchRequest; import com.equinix.openapi.fabric.v4.model.ConnectionRouteTableEntrySearchResponse; import com.equinix.openapi.fabric.v4.model.Error; +import com.equinix.openapi.fabric.v4.model.GetAllCloudRouterCommands; import com.equinix.openapi.fabric.v4.model.PackageResponse; import com.equinix.openapi.fabric.v4.model.RouteTableEntrySearchRequest; import com.equinix.openapi.fabric.v4.model.RouteTableEntrySearchResponse; @@ -397,6 +402,163 @@ public okhttp3.Call createCloudRouterActionAsync(UUID routerId, CloudRouterActio localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for createCloudRouterCommand + * @param routerId Router UUID (required) + * @param cloudRouterCommandPostRequest (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 + + + + + + + + + +
Status Code Description Response Headers
202 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public okhttp3.Call createCloudRouterCommandCall(UUID routerId, CloudRouterCommandPostRequest cloudRouterCommandPostRequest, 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 = cloudRouterCommandPostRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/routers/{routerId}/commands" + .replace("{" + "routerId" + "}", localVarApiClient.escapeString(routerId.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 createCloudRouterCommandValidateBeforeCall(UUID routerId, CloudRouterCommandPostRequest cloudRouterCommandPostRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'routerId' is set + if (routerId == null) { + throw new ApiException("Missing the required parameter 'routerId' when calling createCloudRouterCommand(Async)"); + } + + // verify the required parameter 'cloudRouterCommandPostRequest' is set + if (cloudRouterCommandPostRequest == null) { + throw new ApiException("Missing the required parameter 'cloudRouterCommandPostRequest' when calling createCloudRouterCommand(Async)"); + } + + return createCloudRouterCommandCall(routerId, cloudRouterCommandPostRequest, _callback); + + } + + /** + * Initiate Command + * This API provides capability to initiate Command + * @param routerId Router UUID (required) + * @param cloudRouterCommandPostRequest (required) + * @return CloudRouterCommand + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
202 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public CloudRouterCommand createCloudRouterCommand(UUID routerId, CloudRouterCommandPostRequest cloudRouterCommandPostRequest) throws ApiException { + ApiResponse localVarResp = createCloudRouterCommandWithHttpInfo(routerId, cloudRouterCommandPostRequest); + return localVarResp.getData(); + } + + /** + * Initiate Command + * This API provides capability to initiate Command + * @param routerId Router UUID (required) + * @param cloudRouterCommandPostRequest (required) + * @return ApiResponse<CloudRouterCommand> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
202 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public ApiResponse createCloudRouterCommandWithHttpInfo(UUID routerId, CloudRouterCommandPostRequest cloudRouterCommandPostRequest) throws ApiException { + okhttp3.Call localVarCall = createCloudRouterCommandValidateBeforeCall(routerId, cloudRouterCommandPostRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Initiate Command (asynchronously) + * This API provides capability to initiate Command + * @param routerId Router UUID (required) + * @param cloudRouterCommandPostRequest (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 + + + + + + + + + +
Status Code Description Response Headers
202 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public okhttp3.Call createCloudRouterCommandAsync(UUID routerId, CloudRouterCommandPostRequest cloudRouterCommandPostRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createCloudRouterCommandValidateBeforeCall(routerId, cloudRouterCommandPostRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for deleteCloudRouterByUuid * @param routerId Cloud Router UUID (required) @@ -536,6 +698,302 @@ public okhttp3.Call deleteCloudRouterByUuidAsync(UUID routerId, final ApiCallbac localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for deleteCloudRouterCommandByUuid + * @param routerId Router UUID (required) + * @param commandId Command 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 + + + + + + + + +
Status Code Description Response Headers
204 Deleted command successfully -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call deleteCloudRouterCommandByUuidCall(UUID routerId, UUID commandId, 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/routers/{routerId}/commands/{commandId}" + .replace("{" + "routerId" + "}", localVarApiClient.escapeString(routerId.toString())) + .replace("{" + "commandId" + "}", localVarApiClient.escapeString(commandId.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 deleteCloudRouterCommandByUuidValidateBeforeCall(UUID routerId, UUID commandId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'routerId' is set + if (routerId == null) { + throw new ApiException("Missing the required parameter 'routerId' when calling deleteCloudRouterCommandByUuid(Async)"); + } + + // verify the required parameter 'commandId' is set + if (commandId == null) { + throw new ApiException("Missing the required parameter 'commandId' when calling deleteCloudRouterCommandByUuid(Async)"); + } + + return deleteCloudRouterCommandByUuidCall(routerId, commandId, _callback); + + } + + /** + * Delete Command + * This API provides capability to delete command based on command Id + * @param routerId Router UUID (required) + * @param commandId Command UUID (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Deleted command successfully -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public void deleteCloudRouterCommandByUuid(UUID routerId, UUID commandId) throws ApiException { + deleteCloudRouterCommandByUuidWithHttpInfo(routerId, commandId); + } + + /** + * Delete Command + * This API provides capability to delete command based on command Id + * @param routerId Router UUID (required) + * @param commandId Command UUID (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Deleted command successfully -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public ApiResponse deleteCloudRouterCommandByUuidWithHttpInfo(UUID routerId, UUID commandId) throws ApiException { + okhttp3.Call localVarCall = deleteCloudRouterCommandByUuidValidateBeforeCall(routerId, commandId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete Command (asynchronously) + * This API provides capability to delete command based on command Id + * @param routerId Router UUID (required) + * @param commandId Command 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 + + + + + + + + +
Status Code Description Response Headers
204 Deleted command successfully -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
500 Internal server error -
+ */ + public okhttp3.Call deleteCloudRouterCommandByUuidAsync(UUID routerId, UUID commandId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteCloudRouterCommandByUuidValidateBeforeCall(routerId, commandId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getAllCloudRouterCommands + * @param routerId Router 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 + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public okhttp3.Call getAllCloudRouterCommandsCall(UUID routerId, 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/routers/{routerId}/commands" + .replace("{" + "routerId" + "}", localVarApiClient.escapeString(routerId.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 getAllCloudRouterCommandsValidateBeforeCall(UUID routerId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'routerId' is set + if (routerId == null) { + throw new ApiException("Missing the required parameter 'routerId' when calling getAllCloudRouterCommands(Async)"); + } + + return getAllCloudRouterCommandsCall(routerId, _callback); + + } + + /** + * Get Commands + * This API provides capability to fetch all commands + * @param routerId Router UUID (required) + * @return GetAllCloudRouterCommands + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public GetAllCloudRouterCommands getAllCloudRouterCommands(UUID routerId) throws ApiException { + ApiResponse localVarResp = getAllCloudRouterCommandsWithHttpInfo(routerId); + return localVarResp.getData(); + } + + /** + * Get Commands + * This API provides capability to fetch all commands + * @param routerId Router UUID (required) + * @return ApiResponse<GetAllCloudRouterCommands> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public ApiResponse getAllCloudRouterCommandsWithHttpInfo(UUID routerId) throws ApiException { + okhttp3.Call localVarCall = getAllCloudRouterCommandsValidateBeforeCall(routerId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Commands (asynchronously) + * This API provides capability to fetch all commands + * @param routerId Router 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 + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public okhttp3.Call getAllCloudRouterCommandsAsync(UUID routerId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAllCloudRouterCommandsValidateBeforeCall(routerId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getCloudRouterActions * @param routerId Router UUID (required) @@ -995,6 +1453,163 @@ public okhttp3.Call getCloudRouterByUuidAsync(UUID routerId, final ApiCallback + Status Code Description Response Headers + 200 Successful operation - + 400 Bad request - + 401 Unauthorized - + 403 Forbidden - + 404 Not Found - + 415 Internal server error - + 500 Internal server error - + + */ + public okhttp3.Call getCloudRouterCommandCall(UUID routerId, UUID commandId, 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/routers/{routerId}/commands/{commandId}" + .replace("{" + "routerId" + "}", localVarApiClient.escapeString(routerId.toString())) + .replace("{" + "commandId" + "}", localVarApiClient.escapeString(commandId.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 getCloudRouterCommandValidateBeforeCall(UUID routerId, UUID commandId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'routerId' is set + if (routerId == null) { + throw new ApiException("Missing the required parameter 'routerId' when calling getCloudRouterCommand(Async)"); + } + + // verify the required parameter 'commandId' is set + if (commandId == null) { + throw new ApiException("Missing the required parameter 'commandId' when calling getCloudRouterCommand(Async)"); + } + + return getCloudRouterCommandCall(routerId, commandId, _callback); + + } + + /** + * Get Command + * This API provides capability to fetch command using command Id + * @param routerId Router UUID (required) + * @param commandId Command UUID (required) + * @return CloudRouterCommand + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public CloudRouterCommand getCloudRouterCommand(UUID routerId, UUID commandId) throws ApiException { + ApiResponse localVarResp = getCloudRouterCommandWithHttpInfo(routerId, commandId); + return localVarResp.getData(); + } + + /** + * Get Command + * This API provides capability to fetch command using command Id + * @param routerId Router UUID (required) + * @param commandId Command UUID (required) + * @return ApiResponse<CloudRouterCommand> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public ApiResponse getCloudRouterCommandWithHttpInfo(UUID routerId, UUID commandId) throws ApiException { + okhttp3.Call localVarCall = getCloudRouterCommandValidateBeforeCall(routerId, commandId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Command (asynchronously) + * This API provides capability to fetch command using command Id + * @param routerId Router UUID (required) + * @param commandId Command 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 + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public okhttp3.Call getCloudRouterCommandAsync(UUID routerId, UUID commandId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCloudRouterCommandValidateBeforeCall(routerId, commandId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getCloudRouterPackageByCode * @param routerPackageCode Equinix-assigned Cloud Router package identifier (required) @@ -1283,6 +1898,163 @@ public okhttp3.Call getCloudRouterPackagesAsync(Integer offset, Integer limit, f localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for searchCloudRouterCommands + * @param routerId Router UUID (required) + * @param cloudRouterCommandSearchRequest (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 + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public okhttp3.Call searchCloudRouterCommandsCall(UUID routerId, CloudRouterCommandSearchRequest cloudRouterCommandSearchRequest, 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 = cloudRouterCommandSearchRequest; + + // create path and map variables + String localVarPath = "/fabric/v4/routers/{routerId}/commands/search" + .replace("{" + "routerId" + "}", localVarApiClient.escapeString(routerId.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 searchCloudRouterCommandsValidateBeforeCall(UUID routerId, CloudRouterCommandSearchRequest cloudRouterCommandSearchRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'routerId' is set + if (routerId == null) { + throw new ApiException("Missing the required parameter 'routerId' when calling searchCloudRouterCommands(Async)"); + } + + // verify the required parameter 'cloudRouterCommandSearchRequest' is set + if (cloudRouterCommandSearchRequest == null) { + throw new ApiException("Missing the required parameter 'cloudRouterCommandSearchRequest' when calling searchCloudRouterCommands(Async)"); + } + + return searchCloudRouterCommandsCall(routerId, cloudRouterCommandSearchRequest, _callback); + + } + + /** + * Search Commands + * This API provides capability to search commands + * @param routerId Router UUID (required) + * @param cloudRouterCommandSearchRequest (required) + * @return CloudRouterCommandSearchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public CloudRouterCommandSearchResponse searchCloudRouterCommands(UUID routerId, CloudRouterCommandSearchRequest cloudRouterCommandSearchRequest) throws ApiException { + ApiResponse localVarResp = searchCloudRouterCommandsWithHttpInfo(routerId, cloudRouterCommandSearchRequest); + return localVarResp.getData(); + } + + /** + * Search Commands + * This API provides capability to search commands + * @param routerId Router UUID (required) + * @param cloudRouterCommandSearchRequest (required) + * @return ApiResponse<CloudRouterCommandSearchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public ApiResponse searchCloudRouterCommandsWithHttpInfo(UUID routerId, CloudRouterCommandSearchRequest cloudRouterCommandSearchRequest) throws ApiException { + okhttp3.Call localVarCall = searchCloudRouterCommandsValidateBeforeCall(routerId, cloudRouterCommandSearchRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Search Commands (asynchronously) + * This API provides capability to search commands + * @param routerId Router UUID (required) + * @param cloudRouterCommandSearchRequest (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 + + + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
415 Internal server error -
500 Internal server error -
+ */ + public okhttp3.Call searchCloudRouterCommandsAsync(UUID routerId, CloudRouterCommandSearchRequest cloudRouterCommandSearchRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchCloudRouterCommandsValidateBeforeCall(routerId, cloudRouterCommandSearchRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for searchCloudRouterRoutes * @param routerId Router UUID (required) diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/ConnectionsApi.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/ConnectionsApi.java index 0cc4417e..20c084e5 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/ConnectionsApi.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/ConnectionsApi.java @@ -810,19 +810,22 @@ public okhttp3.Call searchConnectionsAsync(SearchRequest searchRequest, final Ap * Build call for updateConnectionByUuid * @param connectionId Connection Id (required) * @param connectionChangeOperation (required) + * @param dryRun option to verify that API calls will succeed (optional, default to false) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details + +
Status Code Description Response Headers
200 Successful operation -
202 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
*/ - public okhttp3.Call updateConnectionByUuidCall(String connectionId, List connectionChangeOperation, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConnectionByUuidCall(String connectionId, List connectionChangeOperation, Boolean dryRun, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -848,6 +851,10 @@ public okhttp3.Call updateConnectionByUuidCall(String connectionId, List localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + final String[] localVarAccepts = { "application/json" }; @@ -869,7 +876,7 @@ public okhttp3.Call updateConnectionByUuidCall(String connectionId, List connectionChangeOperation, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateConnectionByUuidValidateBeforeCall(String connectionId, List connectionChangeOperation, Boolean dryRun, final ApiCallback _callback) throws ApiException { // verify the required parameter 'connectionId' is set if (connectionId == null) { throw new ApiException("Missing the required parameter 'connectionId' when calling updateConnectionByUuid(Async)"); @@ -880,7 +887,7 @@ private okhttp3.Call updateConnectionByUuidValidateBeforeCall(String connectionI throw new ApiException("Missing the required parameter 'connectionChangeOperation' when calling updateConnectionByUuid(Async)"); } - return updateConnectionByUuidCall(connectionId, connectionChangeOperation, _callback); + return updateConnectionByUuidCall(connectionId, connectionChangeOperation, dryRun, _callback); } @@ -889,19 +896,22 @@ private okhttp3.Call updateConnectionByUuidValidateBeforeCall(String connectionI * Update Connection by ID * @param connectionId Connection Id (required) * @param connectionChangeOperation (required) + * @param dryRun option to verify that API calls will succeed (optional, default to false) * @return Connection * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details + +
Status Code Description Response Headers
200 Successful operation -
202 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
*/ - public Connection updateConnectionByUuid(String connectionId, List connectionChangeOperation) throws ApiException { - ApiResponse localVarResp = updateConnectionByUuidWithHttpInfo(connectionId, connectionChangeOperation); + public Connection updateConnectionByUuid(String connectionId, List connectionChangeOperation, Boolean dryRun) throws ApiException { + ApiResponse localVarResp = updateConnectionByUuidWithHttpInfo(connectionId, connectionChangeOperation, dryRun); return localVarResp.getData(); } @@ -910,19 +920,22 @@ public Connection updateConnectionByUuid(String connectionId, List Status Code Description Response Headers + 200 Successful operation - 202 Successful operation - + 400 Bad request - 401 Unauthorized - 403 Forbidden - 404 Not Found - */ - public ApiResponse updateConnectionByUuidWithHttpInfo(String connectionId, List connectionChangeOperation) throws ApiException { - okhttp3.Call localVarCall = updateConnectionByUuidValidateBeforeCall(connectionId, connectionChangeOperation, null); + public ApiResponse updateConnectionByUuidWithHttpInfo(String connectionId, List connectionChangeOperation, Boolean dryRun) throws ApiException { + okhttp3.Call localVarCall = updateConnectionByUuidValidateBeforeCall(connectionId, connectionChangeOperation, dryRun, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -932,21 +945,24 @@ public ApiResponse updateConnectionByUuidWithHttpInfo(String connect * Update Connection by ID * @param connectionId Connection Id (required) * @param connectionChangeOperation (required) + * @param dryRun option to verify that API calls will succeed (optional, default to false) * @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 + +
Status Code Description Response Headers
200 Successful operation -
202 Successful operation -
400 Bad request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
*/ - public okhttp3.Call updateConnectionByUuidAsync(String connectionId, List connectionChangeOperation, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConnectionByUuidAsync(String connectionId, List connectionChangeOperation, Boolean dryRun, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = updateConnectionByUuidValidateBeforeCall(connectionId, connectionChangeOperation, _callback); + okhttp3.Call localVarCall = updateConnectionByUuidValidateBeforeCall(connectionId, connectionChangeOperation, dryRun, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/NetworksApi.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/NetworksApi.java index 735ff1c8..80a78cb7 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/NetworksApi.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/NetworksApi.java @@ -90,7 +90,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * @http.response.details - + @@ -169,7 +169,7 @@ private okhttp3.Call createNetworkValidateBeforeCall(NetworkPostRequest networkP * @http.response.details
Status Code Description Response Headers
200 Successful operation -
201 Successful operation -
202 Fabric Network Access point object -
400 Bad request -
401 Unauthorized -
- + @@ -193,7 +193,7 @@ public Network createNetwork(NetworkPostRequest networkPostRequest, Boolean dryR * @http.response.details
Status Code Description Response Headers
200 Successful operation -
201 Successful operation -
202 Fabric Network Access point object -
400 Bad request -
401 Unauthorized -
- + @@ -219,7 +219,7 @@ public ApiResponse createNetworkWithHttpInfo(NetworkPostRequest network * @http.response.details
Status Code Description Response Headers
200 Successful operation -
201 Successful operation -
202 Fabric Network Access point object -
400 Bad request -
401 Unauthorized -
- + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/ServiceTokensApi.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/ServiceTokensApi.java index 388e3960..9afe3fd7 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/ServiceTokensApi.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/api/ServiceTokensApi.java @@ -936,6 +936,7 @@ public okhttp3.Call searchServiceTokensAsync(ServiceTokenSearchRequest serviceTo * Build call for updateServiceTokenByUuid * @param serviceTokenId Service Token UUID (required) * @param serviceTokenChangeOperation (required) + * @param dryRun option to verify that API calls will succeed (optional, default to false) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -948,7 +949,7 @@ public okhttp3.Call searchServiceTokensAsync(ServiceTokenSearchRequest serviceTo
Status Code Description Response Headers
200 Successful operation -
201 Successful operation -
202 Fabric Network Access point object -
400 Bad request -
401 Unauthorized -
500 Internal server error -
*/ - public okhttp3.Call updateServiceTokenByUuidCall(UUID serviceTokenId, List serviceTokenChangeOperation, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateServiceTokenByUuidCall(UUID serviceTokenId, List serviceTokenChangeOperation, Boolean dryRun, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -974,6 +975,10 @@ public okhttp3.Call updateServiceTokenByUuidCall(UUID serviceTokenId, List localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (dryRun != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", dryRun)); + } + final String[] localVarAccepts = { "application/json" }; @@ -995,7 +1000,7 @@ public okhttp3.Call updateServiceTokenByUuidCall(UUID serviceTokenId, List serviceTokenChangeOperation, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateServiceTokenByUuidValidateBeforeCall(UUID serviceTokenId, List serviceTokenChangeOperation, Boolean dryRun, final ApiCallback _callback) throws ApiException { // verify the required parameter 'serviceTokenId' is set if (serviceTokenId == null) { throw new ApiException("Missing the required parameter 'serviceTokenId' when calling updateServiceTokenByUuid(Async)"); @@ -1006,7 +1011,7 @@ private okhttp3.Call updateServiceTokenByUuidValidateBeforeCall(UUID serviceToke throw new ApiException("Missing the required parameter 'serviceTokenChangeOperation' when calling updateServiceTokenByUuid(Async)"); } - return updateServiceTokenByUuidCall(serviceTokenId, serviceTokenChangeOperation, _callback); + return updateServiceTokenByUuidCall(serviceTokenId, serviceTokenChangeOperation, dryRun, _callback); } @@ -1015,6 +1020,7 @@ private okhttp3.Call updateServiceTokenByUuidValidateBeforeCall(UUID serviceToke * This API provides capability to update user's Service Token * @param serviceTokenId Service Token UUID (required) * @param serviceTokenChangeOperation (required) + * @param dryRun option to verify that API calls will succeed (optional, default to false) * @return ServiceToken * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1026,8 +1032,8 @@ private okhttp3.Call updateServiceTokenByUuidValidateBeforeCall(UUID serviceToke 500 Internal server error - */ - public ServiceToken updateServiceTokenByUuid(UUID serviceTokenId, List serviceTokenChangeOperation) throws ApiException { - ApiResponse localVarResp = updateServiceTokenByUuidWithHttpInfo(serviceTokenId, serviceTokenChangeOperation); + public ServiceToken updateServiceTokenByUuid(UUID serviceTokenId, List serviceTokenChangeOperation, Boolean dryRun) throws ApiException { + ApiResponse localVarResp = updateServiceTokenByUuidWithHttpInfo(serviceTokenId, serviceTokenChangeOperation, dryRun); return localVarResp.getData(); } @@ -1036,6 +1042,7 @@ public ServiceToken updateServiceTokenByUuid(UUID serviceTokenId, List 500 Internal server error - */ - public ApiResponse updateServiceTokenByUuidWithHttpInfo(UUID serviceTokenId, List serviceTokenChangeOperation) throws ApiException { - okhttp3.Call localVarCall = updateServiceTokenByUuidValidateBeforeCall(serviceTokenId, serviceTokenChangeOperation, null); + public ApiResponse updateServiceTokenByUuidWithHttpInfo(UUID serviceTokenId, List serviceTokenChangeOperation, Boolean dryRun) throws ApiException { + okhttp3.Call localVarCall = updateServiceTokenByUuidValidateBeforeCall(serviceTokenId, serviceTokenChangeOperation, dryRun, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1058,6 +1065,7 @@ public ApiResponse updateServiceTokenByUuidWithHttpInfo(UUID servi * This API provides capability to update user's Service Token * @param serviceTokenId Service Token UUID (required) * @param serviceTokenChangeOperation (required) + * @param dryRun option to verify that API calls will succeed (optional, default to false) * @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 @@ -1070,9 +1078,9 @@ public ApiResponse updateServiceTokenByUuidWithHttpInfo(UUID servi 500 Internal server error - */ - public okhttp3.Call updateServiceTokenByUuidAsync(UUID serviceTokenId, List serviceTokenChangeOperation, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateServiceTokenByUuidAsync(UUID serviceTokenId, List serviceTokenChangeOperation, Boolean dryRun, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = updateServiceTokenByUuidValidateBeforeCall(serviceTokenId, serviceTokenChangeOperation, _callback); + okhttp3.Call localVarCall = updateServiceTokenByUuidValidateBeforeCall(serviceTokenId, serviceTokenChangeOperation, dryRun, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/AuthContext.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/AuthContext.java new file mode 100644 index 00000000..245962b0 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/AuthContext.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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * AuthContext + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthContext { + /** + * Cloud Event auth type + */ + @JsonAdapter(AuthtypeEnum.Adapter.class) + public enum AuthtypeEnum { + SYSTEM("system"), + + USER("user"); + + private String value; + + AuthtypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthtypeEnum fromValue(String value) { + for (AuthtypeEnum b : AuthtypeEnum.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 AuthtypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthtypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthtypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_AUTHTYPE = "authtype"; + @SerializedName(SERIALIZED_NAME_AUTHTYPE) + private AuthtypeEnum authtype; + + /** + * Cloud Event auth identifier + */ + @JsonAdapter(AuthidEnum.Adapter.class) + public enum AuthidEnum { + EQUINIX("equinix"), + + USERID("userId"); + + private String value; + + AuthidEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AuthidEnum fromValue(String value) { + for (AuthidEnum b : AuthidEnum.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 AuthidEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AuthidEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AuthidEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_AUTHID = "authid"; + @SerializedName(SERIALIZED_NAME_AUTHID) + private AuthidEnum authid; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public AuthContext() { + } + + public AuthContext authtype(AuthtypeEnum authtype) { + + this.authtype = authtype; + return this; + } + + /** + * Cloud Event auth type + * @return authtype + **/ + @javax.annotation.Nullable + + public AuthtypeEnum getAuthtype() { + return authtype; + } + + + public void setAuthtype(AuthtypeEnum authtype) { + this.authtype = authtype; + } + + + public AuthContext authid(AuthidEnum authid) { + + this.authid = authid; + return this; + } + + /** + * Cloud Event auth identifier + * @return authid + **/ + @javax.annotation.Nullable + + public AuthidEnum getAuthid() { + return authid; + } + + + public void setAuthid(AuthidEnum authid) { + this.authid = authid; + } + + + public AuthContext name(String name) { + + this.name = name; + return this; + } + + /** + * Cloud Event username + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public AuthContext email(String email) { + + this.email = email; + return this; + } + + /** + * Cloud Event email + * @return email + **/ + @javax.annotation.Nullable + + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + /** + * 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 AuthContext instance itself + */ + public AuthContext 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; + } + AuthContext authContext = (AuthContext) o; + return Objects.equals(this.authtype, authContext.authtype) && + Objects.equals(this.authid, authContext.authid) && + Objects.equals(this.name, authContext.name) && + Objects.equals(this.email, authContext.email)&& + Objects.equals(this.additionalProperties, authContext.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authtype, authid, name, email, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AuthContext {\n"); + sb.append(" authtype: ").append(toIndentedString(authtype)).append("\n"); + sb.append(" authid: ").append(toIndentedString(authid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).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(); + openapiFields.add("authtype"); + openapiFields.add("authid"); + openapiFields.add("name"); + openapiFields.add("email"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AuthContext + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AuthContext.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AuthContext is not found in the empty JSON string", AuthContext.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("authtype") != null && !jsonObj.get("authtype").isJsonNull()) && !jsonObj.get("authtype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authtype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authtype").toString())); + } + if ((jsonObj.get("authid") != null && !jsonObj.get("authid").isJsonNull()) && !jsonObj.get("authid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authid").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AuthContext.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AuthContext' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AuthContext.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AuthContext 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AuthContext read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AuthContext 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("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 AuthContext given an JSON string + * + * @param jsonString JSON string + * @return An instance of AuthContext + * @throws IOException if the JSON string is invalid with respect to AuthContext + */ + public static AuthContext fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AuthContext.class); + } + + /** + * Convert an instance of AuthContext to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEvent.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEvent.java new file mode 100644 index 00000000..4b1d8935 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEvent.java @@ -0,0 +1,664 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudEventData; +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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * Cloud Event object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudEvent { + public static final String SERIALIZED_NAME_SPEC = "spec"; + @SerializedName(SERIALIZED_NAME_SPEC) + private String spec; + + public static final String SERIALIZED_NAME_SOURCE = "source"; + @SerializedName(SERIALIZED_NAME_SOURCE) + private String source; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private UUID id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_SUBJECT = "subject"; + @SerializedName(SERIALIZED_NAME_SUBJECT) + private String subject; + + public static final String SERIALIZED_NAME_DATASCHEMA = "dataschema"; + @SerializedName(SERIALIZED_NAME_DATASCHEMA) + private String dataschema; + + public static final String SERIALIZED_NAME_DATACONTENTTYPE = "datacontenttype"; + @SerializedName(SERIALIZED_NAME_DATACONTENTTYPE) + private String datacontenttype; + + public static final String SERIALIZED_NAME_SEVERITYNUMBER = "severitynumber"; + @SerializedName(SERIALIZED_NAME_SEVERITYNUMBER) + private String severitynumber; + + public static final String SERIALIZED_NAME_SEVERITYTEXT = "severitytext"; + @SerializedName(SERIALIZED_NAME_SEVERITYTEXT) + private String severitytext; + + public static final String SERIALIZED_NAME_EQUINIXPROJECT = "equinixproject"; + @SerializedName(SERIALIZED_NAME_EQUINIXPROJECT) + private UUID equinixproject; + + public static final String SERIALIZED_NAME_AUTHTYPE = "authtype"; + @SerializedName(SERIALIZED_NAME_AUTHTYPE) + private String authtype; + + public static final String SERIALIZED_NAME_AUTHID = "authid"; + @SerializedName(SERIALIZED_NAME_AUTHID) + private String authid; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CloudEventData data; + + public CloudEvent() { + } + + + public CloudEvent( + String spec + ) { + this(); + this.spec = spec; + } + + /** + * Cloud Event Open Telemetry specification + * @return spec + **/ + @javax.annotation.Nullable + + public String getSpec() { + return spec; + } + + + + + public CloudEvent source(String source) { + + this.source = source; + return this; + } + + /** + * Cloud Event source + * @return source + **/ + @javax.annotation.Nullable + + public String getSource() { + return source; + } + + + public void setSource(String source) { + this.source = source; + } + + + public CloudEvent id(UUID id) { + + this.id = id; + return this; + } + + /** + * Cloud Event identifier + * @return id + **/ + @javax.annotation.Nullable + + public UUID getId() { + return id; + } + + + public void setId(UUID id) { + this.id = id; + } + + + public CloudEvent type(String type) { + + this.type = type; + return this; + } + + /** + * Equinix supported event type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public CloudEvent subject(String subject) { + + this.subject = subject; + return this; + } + + /** + * Cloud Event subject + * @return subject + **/ + @javax.annotation.Nullable + + public String getSubject() { + return subject; + } + + + public void setSubject(String subject) { + this.subject = subject; + } + + + public CloudEvent dataschema(String dataschema) { + + this.dataschema = dataschema; + return this; + } + + /** + * Cloud Event dataschema reference + * @return dataschema + **/ + @javax.annotation.Nullable + + public String getDataschema() { + return dataschema; + } + + + public void setDataschema(String dataschema) { + this.dataschema = dataschema; + } + + + public CloudEvent datacontenttype(String datacontenttype) { + + this.datacontenttype = datacontenttype; + return this; + } + + /** + * Cloud Event data content type + * @return datacontenttype + **/ + @javax.annotation.Nullable + + public String getDatacontenttype() { + return datacontenttype; + } + + + public void setDatacontenttype(String datacontenttype) { + this.datacontenttype = datacontenttype; + } + + + public CloudEvent severitynumber(String severitynumber) { + + this.severitynumber = severitynumber; + return this; + } + + /** + * Cloud Event severity number + * @return severitynumber + **/ + @javax.annotation.Nullable + + public String getSeveritynumber() { + return severitynumber; + } + + + public void setSeveritynumber(String severitynumber) { + this.severitynumber = severitynumber; + } + + + public CloudEvent severitytext(String severitytext) { + + this.severitytext = severitytext; + return this; + } + + /** + * Cloud Event severity text + * @return severitytext + **/ + @javax.annotation.Nullable + + public String getSeveritytext() { + return severitytext; + } + + + public void setSeveritytext(String severitytext) { + this.severitytext = severitytext; + } + + + public CloudEvent equinixproject(UUID equinixproject) { + + this.equinixproject = equinixproject; + return this; + } + + /** + * Equinix project identifier + * @return equinixproject + **/ + @javax.annotation.Nullable + + public UUID getEquinixproject() { + return equinixproject; + } + + + public void setEquinixproject(UUID equinixproject) { + this.equinixproject = equinixproject; + } + + + public CloudEvent authtype(String authtype) { + + this.authtype = authtype; + return this; + } + + /** + * Cloud Event auth type + * @return authtype + **/ + @javax.annotation.Nullable + + public String getAuthtype() { + return authtype; + } + + + public void setAuthtype(String authtype) { + this.authtype = authtype; + } + + + public CloudEvent authid(String authid) { + + this.authid = authid; + return this; + } + + /** + * Cloud Event user identifier + * @return authid + **/ + @javax.annotation.Nullable + + public String getAuthid() { + return authid; + } + + + public void setAuthid(String authid) { + this.authid = authid; + } + + + public CloudEvent data(CloudEventData data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public CloudEventData getData() { + return data; + } + + + public void setData(CloudEventData 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 CloudEvent instance itself + */ + public CloudEvent 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; + } + CloudEvent cloudEvent = (CloudEvent) o; + return Objects.equals(this.spec, cloudEvent.spec) && + Objects.equals(this.source, cloudEvent.source) && + Objects.equals(this.id, cloudEvent.id) && + Objects.equals(this.type, cloudEvent.type) && + Objects.equals(this.subject, cloudEvent.subject) && + Objects.equals(this.dataschema, cloudEvent.dataschema) && + Objects.equals(this.datacontenttype, cloudEvent.datacontenttype) && + Objects.equals(this.severitynumber, cloudEvent.severitynumber) && + Objects.equals(this.severitytext, cloudEvent.severitytext) && + Objects.equals(this.equinixproject, cloudEvent.equinixproject) && + Objects.equals(this.authtype, cloudEvent.authtype) && + Objects.equals(this.authid, cloudEvent.authid) && + Objects.equals(this.data, cloudEvent.data)&& + Objects.equals(this.additionalProperties, cloudEvent.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(spec, source, id, type, subject, dataschema, datacontenttype, severitynumber, severitytext, equinixproject, authtype, authid, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudEvent {\n"); + sb.append(" spec: ").append(toIndentedString(spec)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" dataschema: ").append(toIndentedString(dataschema)).append("\n"); + sb.append(" datacontenttype: ").append(toIndentedString(datacontenttype)).append("\n"); + sb.append(" severitynumber: ").append(toIndentedString(severitynumber)).append("\n"); + sb.append(" severitytext: ").append(toIndentedString(severitytext)).append("\n"); + sb.append(" equinixproject: ").append(toIndentedString(equinixproject)).append("\n"); + sb.append(" authtype: ").append(toIndentedString(authtype)).append("\n"); + sb.append(" authid: ").append(toIndentedString(authid)).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(); + openapiFields.add("spec"); + openapiFields.add("source"); + openapiFields.add("id"); + openapiFields.add("type"); + openapiFields.add("subject"); + openapiFields.add("dataschema"); + openapiFields.add("datacontenttype"); + openapiFields.add("severitynumber"); + openapiFields.add("severitytext"); + openapiFields.add("equinixproject"); + openapiFields.add("authtype"); + openapiFields.add("authid"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudEvent + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudEvent is not found in the empty JSON string", CloudEvent.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("spec") != null && !jsonObj.get("spec").isJsonNull()) && !jsonObj.get("spec").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `spec` to be a primitive type in the JSON string but got `%s`", jsonObj.get("spec").toString())); + } + if ((jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) && !jsonObj.get("source").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source").toString())); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("subject") != null && !jsonObj.get("subject").isJsonNull()) && !jsonObj.get("subject").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subject").toString())); + } + if ((jsonObj.get("dataschema") != null && !jsonObj.get("dataschema").isJsonNull()) && !jsonObj.get("dataschema").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dataschema` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataschema").toString())); + } + if ((jsonObj.get("datacontenttype") != null && !jsonObj.get("datacontenttype").isJsonNull()) && !jsonObj.get("datacontenttype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `datacontenttype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("datacontenttype").toString())); + } + if ((jsonObj.get("severitynumber") != null && !jsonObj.get("severitynumber").isJsonNull()) && !jsonObj.get("severitynumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `severitynumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("severitynumber").toString())); + } + if ((jsonObj.get("severitytext") != null && !jsonObj.get("severitytext").isJsonNull()) && !jsonObj.get("severitytext").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `severitytext` to be a primitive type in the JSON string but got `%s`", jsonObj.get("severitytext").toString())); + } + if ((jsonObj.get("equinixproject") != null && !jsonObj.get("equinixproject").isJsonNull()) && !jsonObj.get("equinixproject").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `equinixproject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("equinixproject").toString())); + } + if ((jsonObj.get("authtype") != null && !jsonObj.get("authtype").isJsonNull()) && !jsonObj.get("authtype").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authtype` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authtype").toString())); + } + if ((jsonObj.get("authid") != null && !jsonObj.get("authid").isJsonNull()) && !jsonObj.get("authid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authid").toString())); + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CloudEventData.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudEvent.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudEvent' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudEvent.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudEvent 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudEvent read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudEvent 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("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 CloudEvent given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudEvent + * @throws IOException if the JSON string is invalid with respect to CloudEvent + */ + public static CloudEvent fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudEvent.class); + } + + /** + * Convert an instance of CloudEvent to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventAssetType.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventAssetType.java new file mode 100644 index 00000000..0a5d9d75 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventAssetType.java @@ -0,0 +1,73 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets CloudEventAssetType + */ +@JsonAdapter(CloudEventAssetType.Adapter.class) +public enum CloudEventAssetType { + + PORTS("ports"), + + CONNECTIONS("connections"), + + ROUTERS("routers"); + + private String value; + + CloudEventAssetType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CloudEventAssetType fromValue(String value) { + for (CloudEventAssetType b : CloudEventAssetType.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 CloudEventAssetType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CloudEventAssetType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CloudEventAssetType.fromValue(value); + } + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventData.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventData.java new file mode 100644 index 00000000..9014e0ea --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventData.java @@ -0,0 +1,346 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.AuthContext; +import com.equinix.openapi.fabric.v4.model.ResourceData; +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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * CloudEventData + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudEventData { + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_RESOURCE = "resource"; + @SerializedName(SERIALIZED_NAME_RESOURCE) + private ResourceData resource; + + public static final String SERIALIZED_NAME_AUTH = "auth"; + @SerializedName(SERIALIZED_NAME_AUTH) + private AuthContext auth; + + public CloudEventData() { + } + + public CloudEventData message(String message) { + + this.message = message; + return this; + } + + /** + * Cloud Event message + * @return message + **/ + @javax.annotation.Nullable + + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + + public CloudEventData resource(ResourceData resource) { + + this.resource = resource; + return this; + } + + /** + * Get resource + * @return resource + **/ + @javax.annotation.Nullable + + public ResourceData getResource() { + return resource; + } + + + public void setResource(ResourceData resource) { + this.resource = resource; + } + + + public CloudEventData auth(AuthContext auth) { + + this.auth = auth; + return this; + } + + /** + * Get auth + * @return auth + **/ + @javax.annotation.Nullable + + public AuthContext getAuth() { + return auth; + } + + + public void setAuth(AuthContext auth) { + this.auth = auth; + } + + /** + * 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 CloudEventData instance itself + */ + public CloudEventData 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; + } + CloudEventData cloudEventData = (CloudEventData) o; + return Objects.equals(this.message, cloudEventData.message) && + Objects.equals(this.resource, cloudEventData.resource) && + Objects.equals(this.auth, cloudEventData.auth)&& + Objects.equals(this.additionalProperties, cloudEventData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(message, resource, auth, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudEventData {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).append("\n"); + sb.append(" auth: ").append(toIndentedString(auth)).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(); + openapiFields.add("message"); + openapiFields.add("resource"); + openapiFields.add("auth"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudEventData + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudEventData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudEventData is not found in the empty JSON string", CloudEventData.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + // validate the optional field `resource` + if (jsonObj.get("resource") != null && !jsonObj.get("resource").isJsonNull()) { + ResourceData.validateJsonObject(jsonObj.getAsJsonObject("resource")); + } + // validate the optional field `auth` + if (jsonObj.get("auth") != null && !jsonObj.get("auth").isJsonNull()) { + AuthContext.validateJsonObject(jsonObj.getAsJsonObject("auth")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudEventData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudEventData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudEventData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudEventData 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudEventData read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudEventData 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("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 CloudEventData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudEventData + * @throws IOException if the JSON string is invalid with respect to CloudEventData + */ + public static CloudEventData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudEventData.class); + } + + /** + * Convert an instance of CloudEventData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventFilter.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventFilter.java new file mode 100644 index 00000000..16f6de0a --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventFilter.java @@ -0,0 +1,221 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudEventSimpleExpression; +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.List; + +import javax.ws.rs.core.GenericType; + +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.Map; + +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.JsonParseException; + +import com.equinix.openapi.fabric.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudEventFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CloudEventFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudEventFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudEventFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterCloudEventSimpleExpression = gson.getDelegateAdapter(this, TypeToken.get(CloudEventSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudEventFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `CloudEventSimpleExpression` + if (value.getActualInstance() instanceof CloudEventSimpleExpression) { + JsonObject obj = adapterCloudEventSimpleExpression.toJsonTree((CloudEventSimpleExpression)value.getActualInstance()).getAsJsonObject(); + elementAdapter.write(out, obj); + return; + } + + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: CloudEventSimpleExpression"); + } + + @Override + public CloudEventFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonObject jsonObject = elementAdapter.read(in).getAsJsonObject(); + + // deserialize CloudEventSimpleExpression + try { + // validate the JSON object to see if any exception is thrown + CloudEventSimpleExpression.validateJsonObject(jsonObject); + log.log(Level.FINER, "Input data matches schema 'CloudEventSimpleExpression'"); + CloudEventFilter ret = new CloudEventFilter(); + ret.setActualInstance(adapterCloudEventSimpleExpression.fromJsonTree(jsonObject)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CloudEventSimpleExpression'", e); + } + + + throw new IOException(String.format("Failed deserialization for CloudEventFilter: no class matched. JSON: %s", jsonObject.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map schemas = new HashMap(); + + public CloudEventFilter() { + super("anyOf", Boolean.FALSE); + } + + public CloudEventFilter(CloudEventSimpleExpression o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CloudEventSimpleExpression", new GenericType() { + }); + } + + @Override + public Map getSchemas() { + return CloudEventFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * CloudEventSimpleExpression + * + * It could be an instance of the 'anyOf' schemas. + * The anyOf child schemas may themselves be a composed schema (allOf, anyOf, anyOf). + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof CloudEventSimpleExpression) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CloudEventSimpleExpression"); + } + + /** + * Get the actual instance, which can be the following: + * CloudEventSimpleExpression + * + * @return The actual instance (CloudEventSimpleExpression) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CloudEventSimpleExpression`. If the actual instance is not `CloudEventSimpleExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CloudEventSimpleExpression` + * @throws ClassCastException if the instance is not `CloudEventSimpleExpression` + */ + public CloudEventSimpleExpression getCloudEventSimpleExpression() throws ClassCastException { + return (CloudEventSimpleExpression)super.getActualInstance(); + } + + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudEventFilter + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + // validate anyOf schemas one by one + int validCount = 0; + // validate the json string with CloudEventSimpleExpression + try { + CloudEventSimpleExpression.validateJsonObject(jsonObj); + return; // return earlier as at least one schema is valid with respect to the Json object + //validCount++; + } catch (Exception e) { + // continue to the next one + } + if (validCount == 0) { + throw new IOException(String.format("The JSON string is invalid for CloudEventFilter with anyOf schemas: CloudEventSimpleExpression. JSON: %s", jsonObj.toString())); + } + } + + /** + * Create an instance of CloudEventFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudEventFilter + * @throws IOException if the JSON string is invalid with respect to CloudEventFilter + */ + public static CloudEventFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudEventFilter.class); + } + + /** + * Convert an instance of CloudEventFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventFilters.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventFilters.java new file mode 100644 index 00000000..8721bda9 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventFilters.java @@ -0,0 +1,300 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudEventFilter; +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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * CloudEventFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudEventFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + private List and = new ArrayList<>(); + + public CloudEventFilters() { + } + + public CloudEventFilters and(List and) { + + this.and = and; + return this; + } + + public CloudEventFilters addAndItem(CloudEventFilter 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(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 CloudEventFilters instance itself + */ + public CloudEventFilters 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; + } + CloudEventFilters cloudEventFilters = (CloudEventFilters) o; + return Objects.equals(this.and, cloudEventFilters.and)&& + Objects.equals(this.additionalProperties, cloudEventFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudEventFilters {\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(); + openapiFields.add("and"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudEventFilters + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudEventFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudEventFilters is not found in the empty JSON string", CloudEventFilters.openapiRequiredFields.toString())); + } + } + 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("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++) { + CloudEventFilter.validateJsonObject(jsonArrayand.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudEventFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudEventFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudEventFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudEventFilters 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudEventFilters read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudEventFilters 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("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 CloudEventFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudEventFilters + * @throws IOException if the JSON string is invalid with respect to CloudEventFilters + */ + public static CloudEventFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudEventFilters.class); + } + + /** + * Convert an instance of CloudEventFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventSearchRequest.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventSearchRequest.java new file mode 100644 index 00000000..183be770 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventSearchRequest.java @@ -0,0 +1,367 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudEventFilters; +import com.equinix.openapi.fabric.v4.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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudEventSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + private CloudEventFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + private List sort = new ArrayList<>(); + + public CloudEventSearchRequest() { + } + + public CloudEventSearchRequest filter(CloudEventFilters filter) { + + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + **/ + @javax.annotation.Nullable + + public CloudEventFilters getFilter() { + return filter; + } + + + public void setFilter(CloudEventFilters filter) { + this.filter = filter; + } + + + public CloudEventSearchRequest pagination(PaginationRequest pagination) { + + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + **/ + @javax.annotation.Nullable + + public PaginationRequest getPagination() { + return pagination; + } + + + public void setPagination(PaginationRequest pagination) { + this.pagination = pagination; + } + + + public CloudEventSearchRequest sort(List sort) { + + this.sort = sort; + return this; + } + + public CloudEventSearchRequest addSortItem(CloudEventFilters 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(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 CloudEventSearchRequest instance itself + */ + public CloudEventSearchRequest 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; + } + CloudEventSearchRequest cloudEventSearchRequest = (CloudEventSearchRequest) o; + return Objects.equals(this.filter, cloudEventSearchRequest.filter) && + Objects.equals(this.pagination, cloudEventSearchRequest.pagination) && + Objects.equals(this.sort, cloudEventSearchRequest.sort)&& + Objects.equals(this.additionalProperties, cloudEventSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudEventSearchRequest {\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(); + openapiFields.add("filter"); + openapiFields.add("pagination"); + openapiFields.add("sort"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudEventSearchRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudEventSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudEventSearchRequest is not found in the empty JSON string", CloudEventSearchRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + CloudEventFilters.validateJsonObject(jsonObj.getAsJsonObject("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonObject(jsonObj.getAsJsonObject("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("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++) { + CloudEventFilters.validateJsonObject(jsonArraysort.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudEventSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudEventSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudEventSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudEventSearchRequest 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudEventSearchRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudEventSearchRequest 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("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 CloudEventSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudEventSearchRequest + * @throws IOException if the JSON string is invalid with respect to CloudEventSearchRequest + */ + public static CloudEventSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudEventSearchRequest.class); + } + + /** + * Convert an instance of CloudEventSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventSimpleExpression.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventSimpleExpression.java new file mode 100644 index 00000000..a521607b --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudEventSimpleExpression.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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * CloudEventSimpleExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudEventSimpleExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + private List values = new ArrayList<>(); + + public CloudEventSimpleExpression() { + } + + public CloudEventSimpleExpression property(String property) { + + this.property = property; + return this; + } + + /** + * Possible field names to use on filters: * `/subject` - Cloud Event subject description * `/type` - Cloud Event type * `/time` - Time of Cloud Events + * @return property + **/ + @javax.annotation.Nullable + + public String getProperty() { + return property; + } + + + public void setProperty(String property) { + this.property = property; + } + + + public CloudEventSimpleExpression operator(String operator) { + + this.operator = operator; + return this; + } + + /** + * 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 + * @return operator + **/ + @javax.annotation.Nullable + + public String getOperator() { + return operator; + } + + + public void setOperator(String operator) { + this.operator = operator; + } + + + public CloudEventSimpleExpression values(List values) { + + this.values = values; + return this; + } + + public CloudEventSimpleExpression 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(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 CloudEventSimpleExpression instance itself + */ + public CloudEventSimpleExpression 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; + } + CloudEventSimpleExpression cloudEventSimpleExpression = (CloudEventSimpleExpression) o; + return Objects.equals(this.property, cloudEventSimpleExpression.property) && + Objects.equals(this.operator, cloudEventSimpleExpression.operator) && + Objects.equals(this.values, cloudEventSimpleExpression.values)&& + Objects.equals(this.additionalProperties, cloudEventSimpleExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudEventSimpleExpression {\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(); + openapiFields.add("property"); + openapiFields.add("operator"); + openapiFields.add("values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudEventSimpleExpression + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudEventSimpleExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudEventSimpleExpression is not found in the empty JSON string", CloudEventSimpleExpression.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("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("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").isJsonArray()) { + throw new IllegalArgumentException(String.format("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 (!CloudEventSimpleExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudEventSimpleExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudEventSimpleExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudEventSimpleExpression 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudEventSimpleExpression read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudEventSimpleExpression 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("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 CloudEventSimpleExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudEventSimpleExpression + * @throws IOException if the JSON string is invalid with respect to CloudEventSimpleExpression + */ + public static CloudEventSimpleExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudEventSimpleExpression.class); + } + + /** + * Convert an instance of CloudEventSimpleExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouter.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouter.java index 8f295532..52e63932 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouter.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouter.java @@ -380,7 +380,7 @@ public CloudRouter type(TypeEnum type) { * Get type * @return type **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public TypeEnum getType() { return type; @@ -402,7 +402,7 @@ public CloudRouter location(SimplifiedLocationWithoutIBX location) { * Get location * @return location **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public SimplifiedLocationWithoutIBX getLocation() { return location; @@ -424,7 +424,7 @@ public CloudRouter _package(CloudRouterPostRequestPackage _package) { * Get _package * @return _package **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public CloudRouterPostRequestPackage getPackage() { return _package; @@ -665,6 +665,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("location"); + openapiRequiredFields.add("package"); } /** @@ -679,6 +683,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouter is not found in the empty JSON string", CloudRouter.openapiRequiredFields.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CloudRouter.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } @@ -700,17 +711,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.get("change") != null && !jsonObj.get("change").isJsonNull()) { CloudRouterChange.validateJsonObject(jsonObj.getAsJsonObject("change")); } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - // validate the optional field `location` - if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { - SimplifiedLocationWithoutIBX.validateJsonObject(jsonObj.getAsJsonObject("location")); - } - // validate the optional field `package` - if (jsonObj.get("package") != null && !jsonObj.get("package").isJsonNull()) { - CloudRouterPostRequestPackage.validateJsonObject(jsonObj.getAsJsonObject("package")); - } + // validate the required field `location` + SimplifiedLocationWithoutIBX.validateJsonObject(jsonObj.getAsJsonObject("location")); + // validate the required field `package` + CloudRouterPostRequestPackage.validateJsonObject(jsonObj.getAsJsonObject("package")); // validate the optional field `order` if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { Order.validateJsonObject(jsonObj.getAsJsonObject("order")); diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommand.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommand.java new file mode 100644 index 00000000..4bc72807 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommand.java @@ -0,0 +1,571 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.Changelog; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandRequest; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandResponse; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandState; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandType; +import com.equinix.openapi.fabric.v4.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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * Get Fabric Cloud Router Command response object + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommand { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private CloudRouterCommandType type; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + private UUID uuid; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private CloudRouterCommandState state; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + private Project project; + + public static final String SERIALIZED_NAME_REQUEST = "request"; + @SerializedName(SERIALIZED_NAME_REQUEST) + private CloudRouterCommandRequest request; + + public static final String SERIALIZED_NAME_RESPONSE = "response"; + @SerializedName(SERIALIZED_NAME_RESPONSE) + private CloudRouterCommandResponse response; + + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; + @SerializedName(SERIALIZED_NAME_CHANGE_LOG) + private Changelog changeLog; + + public CloudRouterCommand() { + } + + public CloudRouterCommand href(String href) { + + this.href = href; + return this; + } + + /** + * Get href + * @return href + **/ + @javax.annotation.Nullable + + public String getHref() { + return href; + } + + + public void setHref(String href) { + this.href = href; + } + + + public CloudRouterCommand type(CloudRouterCommandType type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public CloudRouterCommandType getType() { + return type; + } + + + public void setType(CloudRouterCommandType type) { + this.type = type; + } + + + public CloudRouterCommand uuid(UUID uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + + public UUID getUuid() { + return uuid; + } + + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + + public CloudRouterCommand name(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(String name) { + this.name = name; + } + + + public CloudRouterCommand description(String description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public CloudRouterCommand state(CloudRouterCommandState state) { + + this.state = state; + return this; + } + + /** + * Get state + * @return state + **/ + @javax.annotation.Nullable + + public CloudRouterCommandState getState() { + return state; + } + + + public void setState(CloudRouterCommandState state) { + this.state = state; + } + + + public CloudRouterCommand project(Project project) { + + this.project = project; + return this; + } + + /** + * Get project + * @return project + **/ + @javax.annotation.Nullable + + public Project getProject() { + return project; + } + + + public void setProject(Project project) { + this.project = project; + } + + + public CloudRouterCommand request(CloudRouterCommandRequest request) { + + this.request = request; + return this; + } + + /** + * Get request + * @return request + **/ + @javax.annotation.Nullable + + public CloudRouterCommandRequest getRequest() { + return request; + } + + + public void setRequest(CloudRouterCommandRequest request) { + this.request = request; + } + + + public CloudRouterCommand response(CloudRouterCommandResponse response) { + + this.response = response; + return this; + } + + /** + * Get response + * @return response + **/ + @javax.annotation.Nullable + + public CloudRouterCommandResponse getResponse() { + return response; + } + + + public void setResponse(CloudRouterCommandResponse response) { + this.response = response; + } + + + public CloudRouterCommand changeLog(Changelog changeLog) { + + this.changeLog = changeLog; + return this; + } + + /** + * Get changeLog + * @return changeLog + **/ + @javax.annotation.Nullable + + public Changelog getChangeLog() { + return changeLog; + } + + + public void setChangeLog(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 CloudRouterCommand instance itself + */ + public CloudRouterCommand 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; + } + CloudRouterCommand cloudRouterCommand = (CloudRouterCommand) o; + return Objects.equals(this.href, cloudRouterCommand.href) && + Objects.equals(this.type, cloudRouterCommand.type) && + Objects.equals(this.uuid, cloudRouterCommand.uuid) && + Objects.equals(this.name, cloudRouterCommand.name) && + Objects.equals(this.description, cloudRouterCommand.description) && + Objects.equals(this.state, cloudRouterCommand.state) && + Objects.equals(this.project, cloudRouterCommand.project) && + Objects.equals(this.request, cloudRouterCommand.request) && + Objects.equals(this.response, cloudRouterCommand.response) && + Objects.equals(this.changeLog, cloudRouterCommand.changeLog)&& + Objects.equals(this.additionalProperties, cloudRouterCommand.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, type, uuid, name, description, state, project, request, response, changeLog, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommand {\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(" request: ").append(toIndentedString(request)).append("\n"); + sb.append(" response: ").append(toIndentedString(response)).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(); + openapiFields.add("href"); + openapiFields.add("type"); + openapiFields.add("uuid"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("state"); + openapiFields.add("project"); + openapiFields.add("request"); + openapiFields.add("response"); + openapiFields.add("changeLog"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommand + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommand.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommand is not found in the empty JSON string", CloudRouterCommand.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("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("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("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("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the optional field `project` + if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { + Project.validateJsonObject(jsonObj.getAsJsonObject("project")); + } + // validate the optional field `request` + if (jsonObj.get("request") != null && !jsonObj.get("request").isJsonNull()) { + CloudRouterCommandRequest.validateJsonObject(jsonObj.getAsJsonObject("request")); + } + // validate the optional field `response` + if (jsonObj.get("response") != null && !jsonObj.get("response").isJsonNull()) { + CloudRouterCommandResponse.validateJsonObject(jsonObj.getAsJsonObject("response")); + } + // validate the optional field `changeLog` + if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { + Changelog.validateJsonObject(jsonObj.getAsJsonObject("changeLog")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterCommand.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommand' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommand.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommand 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommand read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommand 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("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 CloudRouterCommand given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommand + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommand + */ + public static CloudRouterCommand fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommand.class); + } + + /** + * Convert an instance of CloudRouterCommand to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandPostRequest.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandPostRequest.java new file mode 100644 index 00000000..61883338 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandPostRequest.java @@ -0,0 +1,414 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandRequest; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandType; +import com.equinix.openapi.fabric.v4.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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * Execute Cloud Router Command Request + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandPostRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private CloudRouterCommandType type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_PROJECT = "project"; + @SerializedName(SERIALIZED_NAME_PROJECT) + private Project project; + + public static final String SERIALIZED_NAME_REQUEST = "request"; + @SerializedName(SERIALIZED_NAME_REQUEST) + private CloudRouterCommandRequest request; + + public CloudRouterCommandPostRequest() { + } + + public CloudRouterCommandPostRequest type(CloudRouterCommandType type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + + public CloudRouterCommandType getType() { + return type; + } + + + public void setType(CloudRouterCommandType type) { + this.type = type; + } + + + public CloudRouterCommandPostRequest name(String name) { + + this.name = name; + return this; + } + + /** + * Customer-provided Cloud Router Command name + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CloudRouterCommandPostRequest description(String description) { + + this.description = description; + return this; + } + + /** + * Customer-provided Cloud Router Command description + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public CloudRouterCommandPostRequest project(Project project) { + + this.project = project; + return this; + } + + /** + * Get project + * @return project + **/ + @javax.annotation.Nonnull + + public Project getProject() { + return project; + } + + + public void setProject(Project project) { + this.project = project; + } + + + public CloudRouterCommandPostRequest request(CloudRouterCommandRequest request) { + + this.request = request; + return this; + } + + /** + * Get request + * @return request + **/ + @javax.annotation.Nonnull + + public CloudRouterCommandRequest getRequest() { + return request; + } + + + public void setRequest(CloudRouterCommandRequest request) { + this.request = request; + } + + /** + * 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 CloudRouterCommandPostRequest instance itself + */ + public CloudRouterCommandPostRequest 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; + } + CloudRouterCommandPostRequest cloudRouterCommandPostRequest = (CloudRouterCommandPostRequest) o; + return Objects.equals(this.type, cloudRouterCommandPostRequest.type) && + Objects.equals(this.name, cloudRouterCommandPostRequest.name) && + Objects.equals(this.description, cloudRouterCommandPostRequest.description) && + Objects.equals(this.project, cloudRouterCommandPostRequest.project) && + Objects.equals(this.request, cloudRouterCommandPostRequest.request)&& + Objects.equals(this.additionalProperties, cloudRouterCommandPostRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, name, description, project, request, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommandPostRequest {\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(" request: ").append(toIndentedString(request)).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(); + openapiFields.add("type"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("project"); + openapiFields.add("request"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("project"); + openapiRequiredFields.add("request"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandPostRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommandPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommandPostRequest is not found in the empty JSON string", CloudRouterCommandPostRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CloudRouterCommandPostRequest.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("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("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.validateJsonObject(jsonObj.getAsJsonObject("project")); + // validate the required field `request` + CloudRouterCommandRequest.validateJsonObject(jsonObj.getAsJsonObject("request")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterCommandPostRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandPostRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandPostRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandPostRequest 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommandPostRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommandPostRequest 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("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 CloudRouterCommandPostRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandPostRequest + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandPostRequest + */ + public static CloudRouterCommandPostRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandPostRequest.class); + } + + /** + * Convert an instance of CloudRouterCommandPostRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandRequest.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandRequest.java new file mode 100644 index 00000000..1a6625a6 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandRequest.java @@ -0,0 +1,430 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandRequestConnection; +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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * Fabric Cloud Router Command Request + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandRequest { + public static final String SERIALIZED_NAME_DESTINATION = "destination"; + @SerializedName(SERIALIZED_NAME_DESTINATION) + private String destination; + + public static final String SERIALIZED_NAME_SOURCE_CONNECTION = "sourceConnection"; + @SerializedName(SERIALIZED_NAME_SOURCE_CONNECTION) + private CloudRouterCommandRequestConnection sourceConnection; + + public static final String SERIALIZED_NAME_TIMEOUT = "timeout"; + @SerializedName(SERIALIZED_NAME_TIMEOUT) + private Integer timeout; + + public static final String SERIALIZED_NAME_DATA_BYTES = "dataBytes"; + @SerializedName(SERIALIZED_NAME_DATA_BYTES) + private Integer dataBytes = 64; + + public static final String SERIALIZED_NAME_INTERVAL = "interval"; + @SerializedName(SERIALIZED_NAME_INTERVAL) + private Integer interval = 1000; + + public static final String SERIALIZED_NAME_COUNT = "count"; + @SerializedName(SERIALIZED_NAME_COUNT) + private Integer count = 5; + + public CloudRouterCommandRequest() { + } + + + public CloudRouterCommandRequest( + Integer interval, + Integer count + ) { + this(); + this.interval = interval; + this.count = count; + } + + public CloudRouterCommandRequest destination(String destination) { + + this.destination = destination; + return this; + } + + /** + * Fabric Cloud Router Ping Command Destination + * @return destination + **/ + @javax.annotation.Nonnull + + public String getDestination() { + return destination; + } + + + public void setDestination(String destination) { + this.destination = destination; + } + + + public CloudRouterCommandRequest sourceConnection(CloudRouterCommandRequestConnection sourceConnection) { + + this.sourceConnection = sourceConnection; + return this; + } + + /** + * Get sourceConnection + * @return sourceConnection + **/ + @javax.annotation.Nullable + + public CloudRouterCommandRequestConnection getSourceConnection() { + return sourceConnection; + } + + + public void setSourceConnection(CloudRouterCommandRequestConnection sourceConnection) { + this.sourceConnection = sourceConnection; + } + + + public CloudRouterCommandRequest timeout(Integer timeout) { + + this.timeout = timeout; + return this; + } + + /** + * Fabric Cloud Router Ping Command Timeout + * @return timeout + **/ + @javax.annotation.Nullable + + public Integer getTimeout() { + return timeout; + } + + + public void setTimeout(Integer timeout) { + this.timeout = timeout; + } + + + public CloudRouterCommandRequest dataBytes(Integer dataBytes) { + + this.dataBytes = dataBytes; + return this; + } + + /** + * Fabric Cloud Router Ping Command DataBytes + * minimum: 16 + * maximum: 9000 + * @return dataBytes + **/ + @javax.annotation.Nullable + + public Integer getDataBytes() { + return dataBytes; + } + + + public void setDataBytes(Integer dataBytes) { + this.dataBytes = dataBytes; + } + + + /** + * Time in milliseconds between sending each packet + * @return interval + **/ + @javax.annotation.Nullable + + public Integer getInterval() { + return interval; + } + + + + + /** + * Total number of ping requests + * @return count + **/ + @javax.annotation.Nullable + + public Integer getCount() { + return count; + } + + + + /** + * 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 CloudRouterCommandRequest instance itself + */ + public CloudRouterCommandRequest 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; + } + CloudRouterCommandRequest cloudRouterCommandRequest = (CloudRouterCommandRequest) o; + return Objects.equals(this.destination, cloudRouterCommandRequest.destination) && + Objects.equals(this.sourceConnection, cloudRouterCommandRequest.sourceConnection) && + Objects.equals(this.timeout, cloudRouterCommandRequest.timeout) && + Objects.equals(this.dataBytes, cloudRouterCommandRequest.dataBytes) && + Objects.equals(this.interval, cloudRouterCommandRequest.interval) && + Objects.equals(this.count, cloudRouterCommandRequest.count)&& + Objects.equals(this.additionalProperties, cloudRouterCommandRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(destination, sourceConnection, timeout, dataBytes, interval, count, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommandRequest {\n"); + sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); + sb.append(" sourceConnection: ").append(toIndentedString(sourceConnection)).append("\n"); + sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n"); + sb.append(" dataBytes: ").append(toIndentedString(dataBytes)).append("\n"); + sb.append(" interval: ").append(toIndentedString(interval)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).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(); + openapiFields.add("destination"); + openapiFields.add("sourceConnection"); + openapiFields.add("timeout"); + openapiFields.add("dataBytes"); + openapiFields.add("interval"); + openapiFields.add("count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("destination"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommandRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommandRequest is not found in the empty JSON string", CloudRouterCommandRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CloudRouterCommandRequest.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("destination").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `destination` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destination").toString())); + } + // validate the optional field `sourceConnection` + if (jsonObj.get("sourceConnection") != null && !jsonObj.get("sourceConnection").isJsonNull()) { + CloudRouterCommandRequestConnection.validateJsonObject(jsonObj.getAsJsonObject("sourceConnection")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterCommandRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandRequest 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommandRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommandRequest 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("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 CloudRouterCommandRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandRequest + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandRequest + */ + public static CloudRouterCommandRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandRequest.class); + } + + /** + * Convert an instance of CloudRouterCommandRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandRequestConnection.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandRequestConnection.java new file mode 100644 index 00000000..a0c20f2d --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandRequestConnection.java @@ -0,0 +1,278 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * Connection object for Cloud Router Command + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandRequestConnection { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + private String uuid; + + public CloudRouterCommandRequestConnection() { + } + + public CloudRouterCommandRequestConnection uuid(String uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Connection UUID + * @return uuid + **/ + @javax.annotation.Nullable + + public String getUuid() { + return uuid; + } + + + public void setUuid(String 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 CloudRouterCommandRequestConnection instance itself + */ + public CloudRouterCommandRequestConnection 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; + } + CloudRouterCommandRequestConnection cloudRouterCommandRequestConnection = (CloudRouterCommandRequestConnection) o; + return Objects.equals(this.uuid, cloudRouterCommandRequestConnection.uuid)&& + Objects.equals(this.additionalProperties, cloudRouterCommandRequestConnection.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommandRequestConnection {\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(); + openapiFields.add("uuid"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandRequestConnection + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommandRequestConnection.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommandRequestConnection is not found in the empty JSON string", CloudRouterCommandRequestConnection.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("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 (!CloudRouterCommandRequestConnection.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandRequestConnection' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandRequestConnection.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandRequestConnection 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommandRequestConnection read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommandRequestConnection 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("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 CloudRouterCommandRequestConnection given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandRequestConnection + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandRequestConnection + */ + public static CloudRouterCommandRequestConnection fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandRequestConnection.class); + } + + /** + * Convert an instance of CloudRouterCommandRequestConnection to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandResponse.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandResponse.java new file mode 100644 index 00000000..042cfdd1 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandResponse.java @@ -0,0 +1,312 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.OutputStructuredPing; +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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * CloudRouterCommandResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandResponse { + public static final String SERIALIZED_NAME_OUTPUT = "output"; + @SerializedName(SERIALIZED_NAME_OUTPUT) + private String output; + + public static final String SERIALIZED_NAME_OUTPUT_STRUCTURED_PING = "outputStructuredPing"; + @SerializedName(SERIALIZED_NAME_OUTPUT_STRUCTURED_PING) + private OutputStructuredPing outputStructuredPing; + + public CloudRouterCommandResponse() { + } + + public CloudRouterCommandResponse output(String output) { + + this.output = output; + return this; + } + + /** + * Get output + * @return output + **/ + @javax.annotation.Nullable + + public String getOutput() { + return output; + } + + + public void setOutput(String output) { + this.output = output; + } + + + public CloudRouterCommandResponse outputStructuredPing(OutputStructuredPing outputStructuredPing) { + + this.outputStructuredPing = outputStructuredPing; + return this; + } + + /** + * Get outputStructuredPing + * @return outputStructuredPing + **/ + @javax.annotation.Nullable + + public OutputStructuredPing getOutputStructuredPing() { + return outputStructuredPing; + } + + + public void setOutputStructuredPing(OutputStructuredPing outputStructuredPing) { + this.outputStructuredPing = outputStructuredPing; + } + + /** + * 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 CloudRouterCommandResponse instance itself + */ + public CloudRouterCommandResponse 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; + } + CloudRouterCommandResponse cloudRouterCommandResponse = (CloudRouterCommandResponse) o; + return Objects.equals(this.output, cloudRouterCommandResponse.output) && + Objects.equals(this.outputStructuredPing, cloudRouterCommandResponse.outputStructuredPing)&& + Objects.equals(this.additionalProperties, cloudRouterCommandResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(output, outputStructuredPing, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommandResponse {\n"); + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" outputStructuredPing: ").append(toIndentedString(outputStructuredPing)).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(); + openapiFields.add("output"); + openapiFields.add("outputStructuredPing"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommandResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommandResponse is not found in the empty JSON string", CloudRouterCommandResponse.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("output") != null && !jsonObj.get("output").isJsonNull()) && !jsonObj.get("output").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `output` to be a primitive type in the JSON string but got `%s`", jsonObj.get("output").toString())); + } + // validate the optional field `outputStructuredPing` + if (jsonObj.get("outputStructuredPing") != null && !jsonObj.get("outputStructuredPing").isJsonNull()) { + OutputStructuredPing.validateJsonObject(jsonObj.getAsJsonObject("outputStructuredPing")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterCommandResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandResponse 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommandResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommandResponse 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("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 CloudRouterCommandResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandResponse + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandResponse + */ + public static CloudRouterCommandResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandResponse.class); + } + + /** + * Convert an instance of CloudRouterCommandResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchExpression.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchExpression.java new file mode 100644 index 00000000..171e6192 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchExpression.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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * CloudRouterCommandSearchExpression + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandSearchExpression { + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + private String property; + + public static final String SERIALIZED_NAME_OPERATOR = "operator"; + @SerializedName(SERIALIZED_NAME_OPERATOR) + private String operator; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + private List values = new ArrayList<>(); + + public CloudRouterCommandSearchExpression() { + } + + public CloudRouterCommandSearchExpression property(String property) { + + this.property = property; + return this; + } + + /** + * 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 + * @return property + **/ + @javax.annotation.Nullable + + public String getProperty() { + return property; + } + + + public void setProperty(String property) { + this.property = property; + } + + + public CloudRouterCommandSearchExpression operator(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 * `[NOT] BETWEEN` - (not) between * `[NOT] LIKE` - (not) like * `[NOT] IN` - (not) in * `~*` - case-insensitive like + * @return operator + **/ + @javax.annotation.Nullable + + public String getOperator() { + return operator; + } + + + public void setOperator(String operator) { + this.operator = operator; + } + + + public CloudRouterCommandSearchExpression values(List values) { + + this.values = values; + return this; + } + + public CloudRouterCommandSearchExpression 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(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 CloudRouterCommandSearchExpression instance itself + */ + public CloudRouterCommandSearchExpression 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; + } + CloudRouterCommandSearchExpression cloudRouterCommandSearchExpression = (CloudRouterCommandSearchExpression) o; + return Objects.equals(this.property, cloudRouterCommandSearchExpression.property) && + Objects.equals(this.operator, cloudRouterCommandSearchExpression.operator) && + Objects.equals(this.values, cloudRouterCommandSearchExpression.values)&& + Objects.equals(this.additionalProperties, cloudRouterCommandSearchExpression.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(property, operator, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommandSearchExpression {\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(); + openapiFields.add("property"); + openapiFields.add("operator"); + openapiFields.add("values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandSearchExpression + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommandSearchExpression.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommandSearchExpression is not found in the empty JSON string", CloudRouterCommandSearchExpression.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("property") != null && !jsonObj.get("property").isJsonNull()) && !jsonObj.get("property").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("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("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").isJsonArray()) { + throw new IllegalArgumentException(String.format("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 (!CloudRouterCommandSearchExpression.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandSearchExpression' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandSearchExpression.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandSearchExpression 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommandSearchExpression read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommandSearchExpression 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("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 CloudRouterCommandSearchExpression given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandSearchExpression + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandSearchExpression + */ + public static CloudRouterCommandSearchExpression fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandSearchExpression.class); + } + + /** + * Convert an instance of CloudRouterCommandSearchExpression to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchFilter.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchFilter.java new file mode 100644 index 00000000..a531dad5 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchFilter.java @@ -0,0 +1,274 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchExpression; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchOrFilter; +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.List; + +import javax.ws.rs.core.GenericType; + +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.Map; + +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.JsonParseException; + +import com.equinix.openapi.fabric.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandSearchFilter extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CloudRouterCommandSearchFilter.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterCommandSearchFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandSearchFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterCloudRouterCommandSearchExpression = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandSearchExpression.class)); + final TypeAdapter adapterCloudRouterCommandSearchOrFilter = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandSearchOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandSearchFilter value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `CloudRouterCommandSearchExpression` + if (value.getActualInstance() instanceof CloudRouterCommandSearchExpression) { + JsonObject obj = adapterCloudRouterCommandSearchExpression.toJsonTree((CloudRouterCommandSearchExpression)value.getActualInstance()).getAsJsonObject(); + elementAdapter.write(out, obj); + return; + } + + // check if the actual instance is of the type `CloudRouterCommandSearchOrFilter` + if (value.getActualInstance() instanceof CloudRouterCommandSearchOrFilter) { + JsonObject obj = adapterCloudRouterCommandSearchOrFilter.toJsonTree((CloudRouterCommandSearchOrFilter)value.getActualInstance()).getAsJsonObject(); + elementAdapter.write(out, obj); + return; + } + + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: CloudRouterCommandSearchExpression, CloudRouterCommandSearchOrFilter"); + } + + @Override + public CloudRouterCommandSearchFilter read(JsonReader in) throws IOException { + Object deserialized = null; + JsonObject jsonObject = elementAdapter.read(in).getAsJsonObject(); + + // deserialize CloudRouterCommandSearchExpression + try { + // validate the JSON object to see if any exception is thrown + CloudRouterCommandSearchExpression.validateJsonObject(jsonObject); + log.log(Level.FINER, "Input data matches schema 'CloudRouterCommandSearchExpression'"); + CloudRouterCommandSearchFilter ret = new CloudRouterCommandSearchFilter(); + ret.setActualInstance(adapterCloudRouterCommandSearchExpression.fromJsonTree(jsonObject)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CloudRouterCommandSearchExpression'", e); + } + + // deserialize CloudRouterCommandSearchOrFilter + try { + // validate the JSON object to see if any exception is thrown + CloudRouterCommandSearchOrFilter.validateJsonObject(jsonObject); + log.log(Level.FINER, "Input data matches schema 'CloudRouterCommandSearchOrFilter'"); + CloudRouterCommandSearchFilter ret = new CloudRouterCommandSearchFilter(); + ret.setActualInstance(adapterCloudRouterCommandSearchOrFilter.fromJsonTree(jsonObject)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CloudRouterCommandSearchOrFilter'", e); + } + + + throw new IOException(String.format("Failed deserialization for CloudRouterCommandSearchFilter: no class matched. JSON: %s", jsonObject.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map schemas = new HashMap(); + + public CloudRouterCommandSearchFilter() { + super("anyOf", Boolean.FALSE); + } + + public CloudRouterCommandSearchFilter(CloudRouterCommandSearchExpression o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + public CloudRouterCommandSearchFilter(CloudRouterCommandSearchOrFilter o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CloudRouterCommandSearchExpression", new GenericType() { + }); + schemas.put("CloudRouterCommandSearchOrFilter", new GenericType() { + }); + } + + @Override + public Map getSchemas() { + return CloudRouterCommandSearchFilter.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * CloudRouterCommandSearchExpression, CloudRouterCommandSearchOrFilter + * + * It could be an instance of the 'anyOf' schemas. + * The anyOf child schemas may themselves be a composed schema (allOf, anyOf, anyOf). + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof CloudRouterCommandSearchExpression) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof CloudRouterCommandSearchOrFilter) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CloudRouterCommandSearchExpression, CloudRouterCommandSearchOrFilter"); + } + + /** + * Get the actual instance, which can be the following: + * CloudRouterCommandSearchExpression, CloudRouterCommandSearchOrFilter + * + * @return The actual instance (CloudRouterCommandSearchExpression, CloudRouterCommandSearchOrFilter) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CloudRouterCommandSearchExpression`. If the actual instance is not `CloudRouterCommandSearchExpression`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CloudRouterCommandSearchExpression` + * @throws ClassCastException if the instance is not `CloudRouterCommandSearchExpression` + */ + public CloudRouterCommandSearchExpression getCloudRouterCommandSearchExpression() throws ClassCastException { + return (CloudRouterCommandSearchExpression)super.getActualInstance(); + } + + /** + * Get the actual instance of `CloudRouterCommandSearchOrFilter`. If the actual instance is not `CloudRouterCommandSearchOrFilter`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CloudRouterCommandSearchOrFilter` + * @throws ClassCastException if the instance is not `CloudRouterCommandSearchOrFilter` + */ + public CloudRouterCommandSearchOrFilter getCloudRouterCommandSearchOrFilter() throws ClassCastException { + return (CloudRouterCommandSearchOrFilter)super.getActualInstance(); + } + + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandSearchFilter + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + // validate anyOf schemas one by one + int validCount = 0; + // validate the json string with CloudRouterCommandSearchExpression + try { + CloudRouterCommandSearchExpression.validateJsonObject(jsonObj); + return; // return earlier as at least one schema is valid with respect to the Json object + //validCount++; + } catch (Exception e) { + // continue to the next one + } + // validate the json string with CloudRouterCommandSearchOrFilter + try { + CloudRouterCommandSearchOrFilter.validateJsonObject(jsonObj); + return; // return earlier as at least one schema is valid with respect to the Json object + //validCount++; + } catch (Exception e) { + // continue to the next one + } + if (validCount == 0) { + throw new IOException(String.format("The JSON string is invalid for CloudRouterCommandSearchFilter with anyOf schemas: CloudRouterCommandSearchExpression, CloudRouterCommandSearchOrFilter. JSON: %s", jsonObj.toString())); + } + } + + /** + * Create an instance of CloudRouterCommandSearchFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandSearchFilter + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandSearchFilter + */ + public static CloudRouterCommandSearchFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandSearchFilter.class); + } + + /** + * Convert an instance of CloudRouterCommandSearchFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchFilters.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchFilters.java new file mode 100644 index 00000000..e1d2aa81 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchFilters.java @@ -0,0 +1,300 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchFilter; +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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * CloudRouterCommandSearchFilters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandSearchFilters { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + private List and = new ArrayList<>(); + + public CloudRouterCommandSearchFilters() { + } + + public CloudRouterCommandSearchFilters and(List and) { + + this.and = and; + return this; + } + + public CloudRouterCommandSearchFilters addAndItem(CloudRouterCommandSearchFilter 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(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 CloudRouterCommandSearchFilters instance itself + */ + public CloudRouterCommandSearchFilters 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; + } + CloudRouterCommandSearchFilters cloudRouterCommandSearchFilters = (CloudRouterCommandSearchFilters) o; + return Objects.equals(this.and, cloudRouterCommandSearchFilters.and)&& + Objects.equals(this.additionalProperties, cloudRouterCommandSearchFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(and, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommandSearchFilters {\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(); + openapiFields.add("and"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandSearchFilters + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommandSearchFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommandSearchFilters is not found in the empty JSON string", CloudRouterCommandSearchFilters.openapiRequiredFields.toString())); + } + } + 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("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++) { + CloudRouterCommandSearchFilter.validateJsonObject(jsonArrayand.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterCommandSearchFilters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandSearchFilters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandSearchFilters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandSearchFilters 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommandSearchFilters read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommandSearchFilters 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("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 CloudRouterCommandSearchFilters given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandSearchFilters + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandSearchFilters + */ + public static CloudRouterCommandSearchFilters fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandSearchFilters.class); + } + + /** + * Convert an instance of CloudRouterCommandSearchFilters to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchOrFilter.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchOrFilter.java new file mode 100644 index 00000000..1f74afe9 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchOrFilter.java @@ -0,0 +1,300 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchExpression; +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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * CloudRouterCommandSearchOrFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandSearchOrFilter { + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + private List or = new ArrayList<>(); + + public CloudRouterCommandSearchOrFilter() { + } + + public CloudRouterCommandSearchOrFilter or(List or) { + + this.or = or; + return this; + } + + public CloudRouterCommandSearchOrFilter addOrItem(CloudRouterCommandSearchExpression 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(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 CloudRouterCommandSearchOrFilter instance itself + */ + public CloudRouterCommandSearchOrFilter 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; + } + CloudRouterCommandSearchOrFilter cloudRouterCommandSearchOrFilter = (CloudRouterCommandSearchOrFilter) o; + return Objects.equals(this.or, cloudRouterCommandSearchOrFilter.or)&& + Objects.equals(this.additionalProperties, cloudRouterCommandSearchOrFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(or, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommandSearchOrFilter {\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(); + openapiFields.add("or"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandSearchOrFilter + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommandSearchOrFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommandSearchOrFilter is not found in the empty JSON string", CloudRouterCommandSearchOrFilter.openapiRequiredFields.toString())); + } + } + 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("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++) { + CloudRouterCommandSearchExpression.validateJsonObject(jsonArrayor.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterCommandSearchOrFilter.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandSearchOrFilter' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandSearchOrFilter.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandSearchOrFilter 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommandSearchOrFilter read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommandSearchOrFilter 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("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 CloudRouterCommandSearchOrFilter given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandSearchOrFilter + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandSearchOrFilter + */ + public static CloudRouterCommandSearchOrFilter fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandSearchOrFilter.class); + } + + /** + * Convert an instance of CloudRouterCommandSearchOrFilter to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchRequest.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchRequest.java new file mode 100644 index 00000000..bc90ffe2 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchRequest.java @@ -0,0 +1,368 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchFilters; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchSortCriteria; +import com.equinix.openapi.fabric.v4.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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * Search requests containing criteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandSearchRequest { + public static final String SERIALIZED_NAME_FILTER = "filter"; + @SerializedName(SERIALIZED_NAME_FILTER) + private CloudRouterCommandSearchFilters filter; + + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + private PaginationRequest pagination; + + public static final String SERIALIZED_NAME_SORT = "sort"; + @SerializedName(SERIALIZED_NAME_SORT) + private List sort = new ArrayList<>(); + + public CloudRouterCommandSearchRequest() { + } + + public CloudRouterCommandSearchRequest filter(CloudRouterCommandSearchFilters filter) { + + this.filter = filter; + return this; + } + + /** + * Get filter + * @return filter + **/ + @javax.annotation.Nullable + + public CloudRouterCommandSearchFilters getFilter() { + return filter; + } + + + public void setFilter(CloudRouterCommandSearchFilters filter) { + this.filter = filter; + } + + + public CloudRouterCommandSearchRequest pagination(PaginationRequest pagination) { + + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + **/ + @javax.annotation.Nullable + + public PaginationRequest getPagination() { + return pagination; + } + + + public void setPagination(PaginationRequest pagination) { + this.pagination = pagination; + } + + + public CloudRouterCommandSearchRequest sort(List sort) { + + this.sort = sort; + return this; + } + + public CloudRouterCommandSearchRequest addSortItem(CloudRouterCommandSearchSortCriteria 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(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 CloudRouterCommandSearchRequest instance itself + */ + public CloudRouterCommandSearchRequest 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; + } + CloudRouterCommandSearchRequest cloudRouterCommandSearchRequest = (CloudRouterCommandSearchRequest) o; + return Objects.equals(this.filter, cloudRouterCommandSearchRequest.filter) && + Objects.equals(this.pagination, cloudRouterCommandSearchRequest.pagination) && + Objects.equals(this.sort, cloudRouterCommandSearchRequest.sort)&& + Objects.equals(this.additionalProperties, cloudRouterCommandSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, pagination, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommandSearchRequest {\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(); + openapiFields.add("filter"); + openapiFields.add("pagination"); + openapiFields.add("sort"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandSearchRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommandSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommandSearchRequest is not found in the empty JSON string", CloudRouterCommandSearchRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `filter` + if (jsonObj.get("filter") != null && !jsonObj.get("filter").isJsonNull()) { + CloudRouterCommandSearchFilters.validateJsonObject(jsonObj.getAsJsonObject("filter")); + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + PaginationRequest.validateJsonObject(jsonObj.getAsJsonObject("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("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++) { + CloudRouterCommandSearchSortCriteria.validateJsonObject(jsonArraysort.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterCommandSearchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandSearchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandSearchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandSearchRequest 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommandSearchRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommandSearchRequest 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("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 CloudRouterCommandSearchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandSearchRequest + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandSearchRequest + */ + public static CloudRouterCommandSearchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandSearchRequest.class); + } + + /** + * Convert an instance of CloudRouterCommandSearchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchResponse.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchResponse.java new file mode 100644 index 00000000..1aea26ee --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchResponse.java @@ -0,0 +1,334 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommand; +import com.equinix.openapi.fabric.v4.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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * CloudRouterCommandSearchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandSearchResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = new ArrayList<>(); + + public CloudRouterCommandSearchResponse() { + } + + public CloudRouterCommandSearchResponse pagination(Pagination pagination) { + + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + **/ + @javax.annotation.Nullable + + public Pagination getPagination() { + return pagination; + } + + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } + + + public CloudRouterCommandSearchResponse data(List data) { + + this.data = data; + return this; + } + + public CloudRouterCommandSearchResponse addDataItem(CloudRouterCommand 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(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 CloudRouterCommandSearchResponse instance itself + */ + public CloudRouterCommandSearchResponse 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; + } + CloudRouterCommandSearchResponse cloudRouterCommandSearchResponse = (CloudRouterCommandSearchResponse) o; + return Objects.equals(this.pagination, cloudRouterCommandSearchResponse.pagination) && + Objects.equals(this.data, cloudRouterCommandSearchResponse.data)&& + Objects.equals(this.additionalProperties, cloudRouterCommandSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommandSearchResponse {\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(); + openapiFields.add("pagination"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandSearchResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommandSearchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommandSearchResponse is not found in the empty JSON string", CloudRouterCommandSearchResponse.openapiRequiredFields.toString())); + } + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonObject(jsonObj.getAsJsonObject("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("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++) { + CloudRouterCommand.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterCommandSearchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandSearchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandSearchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandSearchResponse 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommandSearchResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommandSearchResponse 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("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 CloudRouterCommandSearchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandSearchResponse + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandSearchResponse + */ + public static CloudRouterCommandSearchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandSearchResponse.class); + } + + /** + * Convert an instance of CloudRouterCommandSearchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortBy.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortBy.java new file mode 100644 index 00000000..0b48e23d --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortBy.java @@ -0,0 +1,75 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +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(CloudRouterCommandSearchSortBy.Adapter.class) +public enum CloudRouterCommandSearchSortBy { + + CHANGELOG_CREATEDDATETIME("/changeLog/createdDateTime"), + + CHANGELOG_UPDATEDDATETIME("/changeLog/updatedDateTime"), + + NAME("/name"), + + TYPE("/type"); + + private String value; + + CloudRouterCommandSearchSortBy(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CloudRouterCommandSearchSortBy fromValue(String value) { + for (CloudRouterCommandSearchSortBy b : CloudRouterCommandSearchSortBy.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 CloudRouterCommandSearchSortBy enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CloudRouterCommandSearchSortBy read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CloudRouterCommandSearchSortBy.fromValue(value); + } + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortCriteria.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortCriteria.java new file mode 100644 index 00000000..05c72be7 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortCriteria.java @@ -0,0 +1,306 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchSortBy; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommandSearchSortDirection; +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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * CloudRouterCommandSearchSortCriteria + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CloudRouterCommandSearchSortCriteria { + public static final String SERIALIZED_NAME_DIRECTION = "direction"; + @SerializedName(SERIALIZED_NAME_DIRECTION) + private CloudRouterCommandSearchSortDirection direction = CloudRouterCommandSearchSortDirection.DESC; + + public static final String SERIALIZED_NAME_PROPERTY = "property"; + @SerializedName(SERIALIZED_NAME_PROPERTY) + private CloudRouterCommandSearchSortBy property = CloudRouterCommandSearchSortBy.CHANGELOG_UPDATEDDATETIME; + + public CloudRouterCommandSearchSortCriteria() { + } + + public CloudRouterCommandSearchSortCriteria direction(CloudRouterCommandSearchSortDirection direction) { + + this.direction = direction; + return this; + } + + /** + * Get direction + * @return direction + **/ + @javax.annotation.Nullable + + public CloudRouterCommandSearchSortDirection getDirection() { + return direction; + } + + + public void setDirection(CloudRouterCommandSearchSortDirection direction) { + this.direction = direction; + } + + + public CloudRouterCommandSearchSortCriteria property(CloudRouterCommandSearchSortBy property) { + + this.property = property; + return this; + } + + /** + * Get property + * @return property + **/ + @javax.annotation.Nullable + + public CloudRouterCommandSearchSortBy getProperty() { + return property; + } + + + public void setProperty(CloudRouterCommandSearchSortBy 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 CloudRouterCommandSearchSortCriteria instance itself + */ + public CloudRouterCommandSearchSortCriteria 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; + } + CloudRouterCommandSearchSortCriteria cloudRouterCommandSearchSortCriteria = (CloudRouterCommandSearchSortCriteria) o; + return Objects.equals(this.direction, cloudRouterCommandSearchSortCriteria.direction) && + Objects.equals(this.property, cloudRouterCommandSearchSortCriteria.property)&& + Objects.equals(this.additionalProperties, cloudRouterCommandSearchSortCriteria.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(direction, property, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudRouterCommandSearchSortCriteria {\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(); + openapiFields.add("direction"); + openapiFields.add("property"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CloudRouterCommandSearchSortCriteria + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CloudRouterCommandSearchSortCriteria.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterCommandSearchSortCriteria is not found in the empty JSON string", CloudRouterCommandSearchSortCriteria.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CloudRouterCommandSearchSortCriteria.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CloudRouterCommandSearchSortCriteria' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CloudRouterCommandSearchSortCriteria.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CloudRouterCommandSearchSortCriteria 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CloudRouterCommandSearchSortCriteria read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CloudRouterCommandSearchSortCriteria 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("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 CloudRouterCommandSearchSortCriteria given an JSON string + * + * @param jsonString JSON string + * @return An instance of CloudRouterCommandSearchSortCriteria + * @throws IOException if the JSON string is invalid with respect to CloudRouterCommandSearchSortCriteria + */ + public static CloudRouterCommandSearchSortCriteria fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CloudRouterCommandSearchSortCriteria.class); + } + + /** + * Convert an instance of CloudRouterCommandSearchSortCriteria to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortDirection.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortDirection.java new file mode 100644 index 00000000..fca8fc1f --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandSearchSortDirection.java @@ -0,0 +1,71 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Sorting direction + */ +@JsonAdapter(CloudRouterCommandSearchSortDirection.Adapter.class) +public enum CloudRouterCommandSearchSortDirection { + + DESC("DESC"), + + ASC("ASC"); + + private String value; + + CloudRouterCommandSearchSortDirection(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CloudRouterCommandSearchSortDirection fromValue(String value) { + for (CloudRouterCommandSearchSortDirection b : CloudRouterCommandSearchSortDirection.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 CloudRouterCommandSearchSortDirection enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CloudRouterCommandSearchSortDirection read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CloudRouterCommandSearchSortDirection.fromValue(value); + } + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandState.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandState.java new file mode 100644 index 00000000..bc2e91c3 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandState.java @@ -0,0 +1,75 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Fabric Cloud Router Command State + */ +@JsonAdapter(CloudRouterCommandState.Adapter.class) +public enum CloudRouterCommandState { + + PENDING("PENDING"), + + SUCCEEDED("SUCCEEDED"), + + FAILED("FAILED"), + + DELETED("DELETED"); + + private String value; + + CloudRouterCommandState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CloudRouterCommandState fromValue(String value) { + for (CloudRouterCommandState b : CloudRouterCommandState.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 CloudRouterCommandState enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CloudRouterCommandState read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CloudRouterCommandState.fromValue(value); + } + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandType.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandType.java new file mode 100644 index 00000000..7262d017 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterCommandType.java @@ -0,0 +1,69 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Fabric Cloud Router Command Type + */ +@JsonAdapter(CloudRouterCommandType.Adapter.class) +public enum CloudRouterCommandType { + + PING_COMMAND("PING_COMMAND"); + + private String value; + + CloudRouterCommandType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CloudRouterCommandType fromValue(String value) { + for (CloudRouterCommandType b : CloudRouterCommandType.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 CloudRouterCommandType enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CloudRouterCommandType read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CloudRouterCommandType.fromValue(value); + } + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterPostRequest.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterPostRequest.java index 3f621efe..e0b97385 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterPostRequest.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/CloudRouterPostRequest.java @@ -149,7 +149,7 @@ public CloudRouterPostRequest type(TypeEnum type) { * Get type * @return type **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public TypeEnum getType() { return type; @@ -171,7 +171,7 @@ public CloudRouterPostRequest name(String name) { * Customer-provided Cloud Router name * @return name **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getName() { return name; @@ -193,7 +193,7 @@ public CloudRouterPostRequest location(SimplifiedLocationWithoutIBX location) { * Get location * @return location **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public SimplifiedLocationWithoutIBX getLocation() { return location; @@ -215,7 +215,7 @@ public CloudRouterPostRequest _package(CloudRouterPostRequestPackage _package) { * Get _package * @return _package **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public CloudRouterPostRequestPackage getPackage() { return _package; @@ -464,6 +464,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("location"); + openapiRequiredFields.add("package"); } /** @@ -478,20 +482,23 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in CloudRouterPostRequest is not found in the empty JSON string", CloudRouterPostRequest.openapiRequiredFields.toString())); } } - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CloudRouterPostRequest.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("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.validateJsonObject(jsonObj.getAsJsonObject("location")); - } - // validate the optional field `package` - if (jsonObj.get("package") != null && !jsonObj.get("package").isJsonNull()) { - CloudRouterPostRequestPackage.validateJsonObject(jsonObj.getAsJsonObject("package")); - } + // validate the required field `location` + SimplifiedLocationWithoutIBX.validateJsonObject(jsonObj.getAsJsonObject("location")); + // validate the required field `package` + CloudRouterPostRequestPackage.validateJsonObject(jsonObj.getAsJsonObject("package")); // validate the optional field `order` if (jsonObj.get("order") != null && !jsonObj.get("order").isJsonNull()) { Order.validateJsonObject(jsonObj.getAsJsonObject("order")); diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/GetAllCloudRouterCommands.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/GetAllCloudRouterCommands.java new file mode 100644 index 00000000..f6ba3a16 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/GetAllCloudRouterCommands.java @@ -0,0 +1,334 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudRouterCommand; +import com.equinix.openapi.fabric.v4.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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * List of Fabric Cloud Router Command + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetAllCloudRouterCommands { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = new ArrayList<>(); + + public GetAllCloudRouterCommands() { + } + + public GetAllCloudRouterCommands pagination(Pagination pagination) { + + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + **/ + @javax.annotation.Nullable + + public Pagination getPagination() { + return pagination; + } + + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } + + + public GetAllCloudRouterCommands data(List data) { + + this.data = data; + return this; + } + + public GetAllCloudRouterCommands addDataItem(CloudRouterCommand 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(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 GetAllCloudRouterCommands instance itself + */ + public GetAllCloudRouterCommands 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; + } + GetAllCloudRouterCommands getAllCloudRouterCommands = (GetAllCloudRouterCommands) o; + return Objects.equals(this.pagination, getAllCloudRouterCommands.pagination) && + Objects.equals(this.data, getAllCloudRouterCommands.data)&& + Objects.equals(this.additionalProperties, getAllCloudRouterCommands.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAllCloudRouterCommands {\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(); + openapiFields.add("pagination"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to GetAllCloudRouterCommands + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!GetAllCloudRouterCommands.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetAllCloudRouterCommands is not found in the empty JSON string", GetAllCloudRouterCommands.openapiRequiredFields.toString())); + } + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonObject(jsonObj.getAsJsonObject("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("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++) { + CloudRouterCommand.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetAllCloudRouterCommands.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetAllCloudRouterCommands' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetAllCloudRouterCommands.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetAllCloudRouterCommands 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetAllCloudRouterCommands read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + GetAllCloudRouterCommands 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("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 GetAllCloudRouterCommands given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetAllCloudRouterCommands + * @throws IOException if the JSON string is invalid with respect to GetAllCloudRouterCommands + */ + public static GetAllCloudRouterCommands fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetAllCloudRouterCommands.class); + } + + /** + * Convert an instance of GetAllCloudRouterCommands to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/GetCloudEventsByAssetResponse.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/GetCloudEventsByAssetResponse.java new file mode 100644 index 00000000..f9257b9f --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/GetCloudEventsByAssetResponse.java @@ -0,0 +1,334 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.CloudEvent; +import com.equinix.openapi.fabric.v4.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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * GetCloudEventsByAssetResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetCloudEventsByAssetResponse { + public static final String SERIALIZED_NAME_PAGINATION = "pagination"; + @SerializedName(SERIALIZED_NAME_PAGINATION) + private Pagination pagination; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = new ArrayList<>(); + + public GetCloudEventsByAssetResponse() { + } + + public GetCloudEventsByAssetResponse pagination(Pagination pagination) { + + this.pagination = pagination; + return this; + } + + /** + * Get pagination + * @return pagination + **/ + @javax.annotation.Nullable + + public Pagination getPagination() { + return pagination; + } + + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } + + + public GetCloudEventsByAssetResponse data(List data) { + + this.data = data; + return this; + } + + public GetCloudEventsByAssetResponse 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(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 GetCloudEventsByAssetResponse instance itself + */ + public GetCloudEventsByAssetResponse 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; + } + GetCloudEventsByAssetResponse getCloudEventsByAssetResponse = (GetCloudEventsByAssetResponse) o; + return Objects.equals(this.pagination, getCloudEventsByAssetResponse.pagination) && + Objects.equals(this.data, getCloudEventsByAssetResponse.data)&& + Objects.equals(this.additionalProperties, getCloudEventsByAssetResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pagination, data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCloudEventsByAssetResponse {\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(); + openapiFields.add("pagination"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to GetCloudEventsByAssetResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!GetCloudEventsByAssetResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GetCloudEventsByAssetResponse is not found in the empty JSON string", GetCloudEventsByAssetResponse.openapiRequiredFields.toString())); + } + } + // validate the optional field `pagination` + if (jsonObj.get("pagination") != null && !jsonObj.get("pagination").isJsonNull()) { + Pagination.validateJsonObject(jsonObj.getAsJsonObject("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("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.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetCloudEventsByAssetResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetCloudEventsByAssetResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetCloudEventsByAssetResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetCloudEventsByAssetResponse 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetCloudEventsByAssetResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + GetCloudEventsByAssetResponse 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("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 GetCloudEventsByAssetResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetCloudEventsByAssetResponse + * @throws IOException if the JSON string is invalid with respect to GetCloudEventsByAssetResponse + */ + public static GetCloudEventsByAssetResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetCloudEventsByAssetResponse.class); + } + + /** + * Convert an instance of GetCloudEventsByAssetResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/NetworkType.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/NetworkType.java index bb6dc549..f7f19e17 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/NetworkType.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/NetworkType.java @@ -31,7 +31,11 @@ public enum NetworkType { EPLAN("EPLAN"), - IPWAN("IPWAN"); + IPWAN("IPWAN"), + + EVPTREE("EVPTREE"), + + EPTREE("EPTREE"); private String value; diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/OutputStructuredPing.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/OutputStructuredPing.java new file mode 100644 index 00000000..ef0e9d5f --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/OutputStructuredPing.java @@ -0,0 +1,596 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.OutputStructuredPingResponseItem; +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.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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * OutputStructuredPing + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OutputStructuredPing { + public static final String SERIALIZED_NAME_DESTINATION_IP = "destinationIp"; + @SerializedName(SERIALIZED_NAME_DESTINATION_IP) + private String destinationIp; + + public static final String SERIALIZED_NAME_DESTINATION_NAME = "destinationName"; + @SerializedName(SERIALIZED_NAME_DESTINATION_NAME) + private String destinationName; + + public static final String SERIALIZED_NAME_DATA_BYTES = "dataBytes"; + @SerializedName(SERIALIZED_NAME_DATA_BYTES) + private Integer dataBytes; + + public static final String SERIALIZED_NAME_PACKETS_TRANSMITTED = "packetsTransmitted"; + @SerializedName(SERIALIZED_NAME_PACKETS_TRANSMITTED) + private Integer packetsTransmitted; + + public static final String SERIALIZED_NAME_PACKETS_RECEIVED = "packetsReceived"; + @SerializedName(SERIALIZED_NAME_PACKETS_RECEIVED) + private Integer packetsReceived; + + public static final String SERIALIZED_NAME_PACKETS_LOSS_PERCENT = "packetsLossPercent"; + @SerializedName(SERIALIZED_NAME_PACKETS_LOSS_PERCENT) + private Float packetsLossPercent; + + public static final String SERIALIZED_NAME_RTT_MIN = "rttMin"; + @SerializedName(SERIALIZED_NAME_RTT_MIN) + private Float rttMin; + + public static final String SERIALIZED_NAME_RTT_AVG = "rttAvg"; + @SerializedName(SERIALIZED_NAME_RTT_AVG) + private Float rttAvg; + + public static final String SERIALIZED_NAME_RTT_MAX = "rttMax"; + @SerializedName(SERIALIZED_NAME_RTT_MAX) + private Float rttMax; + + public static final String SERIALIZED_NAME_RTT_STD_DEV = "rttStdDev"; + @SerializedName(SERIALIZED_NAME_RTT_STD_DEV) + private Float rttStdDev; + + public static final String SERIALIZED_NAME_RESPONSES = "responses"; + @SerializedName(SERIALIZED_NAME_RESPONSES) + private List responses = new ArrayList<>(); + + public OutputStructuredPing() { + } + + public OutputStructuredPing destinationIp(String destinationIp) { + + this.destinationIp = destinationIp; + return this; + } + + /** + * Get destinationIp + * @return destinationIp + **/ + @javax.annotation.Nullable + + public String getDestinationIp() { + return destinationIp; + } + + + public void setDestinationIp(String destinationIp) { + this.destinationIp = destinationIp; + } + + + public OutputStructuredPing destinationName(String destinationName) { + + this.destinationName = destinationName; + return this; + } + + /** + * Get destinationName + * @return destinationName + **/ + @javax.annotation.Nullable + + public String getDestinationName() { + return destinationName; + } + + + public void setDestinationName(String destinationName) { + this.destinationName = destinationName; + } + + + public OutputStructuredPing dataBytes(Integer dataBytes) { + + this.dataBytes = dataBytes; + return this; + } + + /** + * Get dataBytes + * @return dataBytes + **/ + @javax.annotation.Nullable + + public Integer getDataBytes() { + return dataBytes; + } + + + public void setDataBytes(Integer dataBytes) { + this.dataBytes = dataBytes; + } + + + public OutputStructuredPing packetsTransmitted(Integer packetsTransmitted) { + + this.packetsTransmitted = packetsTransmitted; + return this; + } + + /** + * Get packetsTransmitted + * @return packetsTransmitted + **/ + @javax.annotation.Nullable + + public Integer getPacketsTransmitted() { + return packetsTransmitted; + } + + + public void setPacketsTransmitted(Integer packetsTransmitted) { + this.packetsTransmitted = packetsTransmitted; + } + + + public OutputStructuredPing packetsReceived(Integer packetsReceived) { + + this.packetsReceived = packetsReceived; + return this; + } + + /** + * Get packetsReceived + * @return packetsReceived + **/ + @javax.annotation.Nullable + + public Integer getPacketsReceived() { + return packetsReceived; + } + + + public void setPacketsReceived(Integer packetsReceived) { + this.packetsReceived = packetsReceived; + } + + + public OutputStructuredPing packetsLossPercent(Float packetsLossPercent) { + + this.packetsLossPercent = packetsLossPercent; + return this; + } + + /** + * Get packetsLossPercent + * @return packetsLossPercent + **/ + @javax.annotation.Nullable + + public Float getPacketsLossPercent() { + return packetsLossPercent; + } + + + public void setPacketsLossPercent(Float packetsLossPercent) { + this.packetsLossPercent = packetsLossPercent; + } + + + public OutputStructuredPing rttMin(Float rttMin) { + + this.rttMin = rttMin; + return this; + } + + /** + * Get rttMin + * @return rttMin + **/ + @javax.annotation.Nullable + + public Float getRttMin() { + return rttMin; + } + + + public void setRttMin(Float rttMin) { + this.rttMin = rttMin; + } + + + public OutputStructuredPing rttAvg(Float rttAvg) { + + this.rttAvg = rttAvg; + return this; + } + + /** + * Get rttAvg + * @return rttAvg + **/ + @javax.annotation.Nullable + + public Float getRttAvg() { + return rttAvg; + } + + + public void setRttAvg(Float rttAvg) { + this.rttAvg = rttAvg; + } + + + public OutputStructuredPing rttMax(Float rttMax) { + + this.rttMax = rttMax; + return this; + } + + /** + * Get rttMax + * @return rttMax + **/ + @javax.annotation.Nullable + + public Float getRttMax() { + return rttMax; + } + + + public void setRttMax(Float rttMax) { + this.rttMax = rttMax; + } + + + public OutputStructuredPing rttStdDev(Float rttStdDev) { + + this.rttStdDev = rttStdDev; + return this; + } + + /** + * Get rttStdDev + * @return rttStdDev + **/ + @javax.annotation.Nullable + + public Float getRttStdDev() { + return rttStdDev; + } + + + public void setRttStdDev(Float rttStdDev) { + this.rttStdDev = rttStdDev; + } + + + public OutputStructuredPing responses(List responses) { + + this.responses = responses; + return this; + } + + public OutputStructuredPing addResponsesItem(OutputStructuredPingResponseItem responsesItem) { + if (this.responses == null) { + this.responses = new ArrayList<>(); + } + this.responses.add(responsesItem); + return this; + } + + /** + * Get responses + * @return responses + **/ + @javax.annotation.Nullable + + public List getResponses() { + return responses; + } + + + public void setResponses(List responses) { + this.responses = responses; + } + + /** + * 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 OutputStructuredPing instance itself + */ + public OutputStructuredPing 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; + } + OutputStructuredPing outputStructuredPing = (OutputStructuredPing) o; + return Objects.equals(this.destinationIp, outputStructuredPing.destinationIp) && + Objects.equals(this.destinationName, outputStructuredPing.destinationName) && + Objects.equals(this.dataBytes, outputStructuredPing.dataBytes) && + Objects.equals(this.packetsTransmitted, outputStructuredPing.packetsTransmitted) && + Objects.equals(this.packetsReceived, outputStructuredPing.packetsReceived) && + Objects.equals(this.packetsLossPercent, outputStructuredPing.packetsLossPercent) && + Objects.equals(this.rttMin, outputStructuredPing.rttMin) && + Objects.equals(this.rttAvg, outputStructuredPing.rttAvg) && + Objects.equals(this.rttMax, outputStructuredPing.rttMax) && + Objects.equals(this.rttStdDev, outputStructuredPing.rttStdDev) && + Objects.equals(this.responses, outputStructuredPing.responses)&& + Objects.equals(this.additionalProperties, outputStructuredPing.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(destinationIp, destinationName, dataBytes, packetsTransmitted, packetsReceived, packetsLossPercent, rttMin, rttAvg, rttMax, rttStdDev, responses, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutputStructuredPing {\n"); + sb.append(" destinationIp: ").append(toIndentedString(destinationIp)).append("\n"); + sb.append(" destinationName: ").append(toIndentedString(destinationName)).append("\n"); + sb.append(" dataBytes: ").append(toIndentedString(dataBytes)).append("\n"); + sb.append(" packetsTransmitted: ").append(toIndentedString(packetsTransmitted)).append("\n"); + sb.append(" packetsReceived: ").append(toIndentedString(packetsReceived)).append("\n"); + sb.append(" packetsLossPercent: ").append(toIndentedString(packetsLossPercent)).append("\n"); + sb.append(" rttMin: ").append(toIndentedString(rttMin)).append("\n"); + sb.append(" rttAvg: ").append(toIndentedString(rttAvg)).append("\n"); + sb.append(" rttMax: ").append(toIndentedString(rttMax)).append("\n"); + sb.append(" rttStdDev: ").append(toIndentedString(rttStdDev)).append("\n"); + sb.append(" responses: ").append(toIndentedString(responses)).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(); + openapiFields.add("destinationIp"); + openapiFields.add("destinationName"); + openapiFields.add("dataBytes"); + openapiFields.add("packetsTransmitted"); + openapiFields.add("packetsReceived"); + openapiFields.add("packetsLossPercent"); + openapiFields.add("rttMin"); + openapiFields.add("rttAvg"); + openapiFields.add("rttMax"); + openapiFields.add("rttStdDev"); + openapiFields.add("responses"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OutputStructuredPing + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OutputStructuredPing.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OutputStructuredPing is not found in the empty JSON string", OutputStructuredPing.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("destinationIp") != null && !jsonObj.get("destinationIp").isJsonNull()) && !jsonObj.get("destinationIp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `destinationIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationIp").toString())); + } + if ((jsonObj.get("destinationName") != null && !jsonObj.get("destinationName").isJsonNull()) && !jsonObj.get("destinationName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `destinationName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationName").toString())); + } + if (jsonObj.get("responses") != null && !jsonObj.get("responses").isJsonNull()) { + JsonArray jsonArrayresponses = jsonObj.getAsJsonArray("responses"); + if (jsonArrayresponses != null) { + // ensure the json data is an array + if (!jsonObj.get("responses").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `responses` to be an array in the JSON string but got `%s`", jsonObj.get("responses").toString())); + } + + // validate the optional field `responses` (array) + for (int i = 0; i < jsonArrayresponses.size(); i++) { + OutputStructuredPingResponseItem.validateJsonObject(jsonArrayresponses.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OutputStructuredPing.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OutputStructuredPing' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OutputStructuredPing.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OutputStructuredPing 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OutputStructuredPing read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + OutputStructuredPing 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("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 OutputStructuredPing given an JSON string + * + * @param jsonString JSON string + * @return An instance of OutputStructuredPing + * @throws IOException if the JSON string is invalid with respect to OutputStructuredPing + */ + public static OutputStructuredPing fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OutputStructuredPing.class); + } + + /** + * Convert an instance of OutputStructuredPing to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/OutputStructuredPingResponseItem.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/OutputStructuredPingResponseItem.java new file mode 100644 index 00000000..d1c02b02 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/OutputStructuredPingResponseItem.java @@ -0,0 +1,394 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * OutputStructuredPingResponseItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OutputStructuredPingResponseItem { + public static final String SERIALIZED_NAME_BYTES = "bytes"; + @SerializedName(SERIALIZED_NAME_BYTES) + private Integer bytes; + + public static final String SERIALIZED_NAME_IP = "ip"; + @SerializedName(SERIALIZED_NAME_IP) + private String ip; + + public static final String SERIALIZED_NAME_ICMP_SEQ = "icmpSeq"; + @SerializedName(SERIALIZED_NAME_ICMP_SEQ) + private Integer icmpSeq; + + public static final String SERIALIZED_NAME_TTL = "ttl"; + @SerializedName(SERIALIZED_NAME_TTL) + private Integer ttl; + + public static final String SERIALIZED_NAME_TIME = "time"; + @SerializedName(SERIALIZED_NAME_TIME) + private Float time; + + public OutputStructuredPingResponseItem() { + } + + public OutputStructuredPingResponseItem bytes(Integer bytes) { + + this.bytes = bytes; + return this; + } + + /** + * Get bytes + * @return bytes + **/ + @javax.annotation.Nullable + + public Integer getBytes() { + return bytes; + } + + + public void setBytes(Integer bytes) { + this.bytes = bytes; + } + + + public OutputStructuredPingResponseItem ip(String ip) { + + this.ip = ip; + return this; + } + + /** + * Get ip + * @return ip + **/ + @javax.annotation.Nullable + + public String getIp() { + return ip; + } + + + public void setIp(String ip) { + this.ip = ip; + } + + + public OutputStructuredPingResponseItem icmpSeq(Integer icmpSeq) { + + this.icmpSeq = icmpSeq; + return this; + } + + /** + * Get icmpSeq + * @return icmpSeq + **/ + @javax.annotation.Nullable + + public Integer getIcmpSeq() { + return icmpSeq; + } + + + public void setIcmpSeq(Integer icmpSeq) { + this.icmpSeq = icmpSeq; + } + + + public OutputStructuredPingResponseItem ttl(Integer ttl) { + + this.ttl = ttl; + return this; + } + + /** + * Get ttl + * @return ttl + **/ + @javax.annotation.Nullable + + public Integer getTtl() { + return ttl; + } + + + public void setTtl(Integer ttl) { + this.ttl = ttl; + } + + + public OutputStructuredPingResponseItem time(Float time) { + + this.time = time; + return this; + } + + /** + * Get time + * @return time + **/ + @javax.annotation.Nullable + + public Float getTime() { + return time; + } + + + public void setTime(Float time) { + this.time = time; + } + + /** + * 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 OutputStructuredPingResponseItem instance itself + */ + public OutputStructuredPingResponseItem 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; + } + OutputStructuredPingResponseItem outputStructuredPingResponseItem = (OutputStructuredPingResponseItem) o; + return Objects.equals(this.bytes, outputStructuredPingResponseItem.bytes) && + Objects.equals(this.ip, outputStructuredPingResponseItem.ip) && + Objects.equals(this.icmpSeq, outputStructuredPingResponseItem.icmpSeq) && + Objects.equals(this.ttl, outputStructuredPingResponseItem.ttl) && + Objects.equals(this.time, outputStructuredPingResponseItem.time)&& + Objects.equals(this.additionalProperties, outputStructuredPingResponseItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(bytes, ip, icmpSeq, ttl, time, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutputStructuredPingResponseItem {\n"); + sb.append(" bytes: ").append(toIndentedString(bytes)).append("\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" icmpSeq: ").append(toIndentedString(icmpSeq)).append("\n"); + sb.append(" ttl: ").append(toIndentedString(ttl)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).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(); + openapiFields.add("bytes"); + openapiFields.add("ip"); + openapiFields.add("icmpSeq"); + openapiFields.add("ttl"); + openapiFields.add("time"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OutputStructuredPingResponseItem + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OutputStructuredPingResponseItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OutputStructuredPingResponseItem is not found in the empty JSON string", OutputStructuredPingResponseItem.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OutputStructuredPingResponseItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OutputStructuredPingResponseItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OutputStructuredPingResponseItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OutputStructuredPingResponseItem 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OutputStructuredPingResponseItem read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + OutputStructuredPingResponseItem 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("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 OutputStructuredPingResponseItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of OutputStructuredPingResponseItem + * @throws IOException if the JSON string is invalid with respect to OutputStructuredPingResponseItem + */ + public static OutputStructuredPingResponseItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OutputStructuredPingResponseItem.class); + } + + /** + * Convert an instance of OutputStructuredPingResponseItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/Port.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/Port.java index 1274604c..9a3ab5bf 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/Port.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/Port.java @@ -18,6 +18,7 @@ import com.equinix.openapi.fabric.v4.model.ModelPackage; import com.equinix.openapi.fabric.v4.model.PhysicalPort; import com.equinix.openapi.fabric.v4.model.PortAdditionalInfo; +import com.equinix.openapi.fabric.v4.model.PortChange; import com.equinix.openapi.fabric.v4.model.PortDemarcationPoint; import com.equinix.openapi.fabric.v4.model.PortDevice; import com.equinix.openapi.fabric.v4.model.PortEncapsulation; @@ -288,6 +289,10 @@ public BmmrTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_ACCOUNT) private SimplifiedAccount account; + public static final String SERIALIZED_NAME_CHANGE = "change"; + @SerializedName(SERIALIZED_NAME_CHANGE) + private PortChange change; + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; @SerializedName(SERIALIZED_NAME_CHANGE_LOG) private Changelog changeLog; @@ -809,6 +814,28 @@ public void setAccount(SimplifiedAccount account) { } + public Port change(PortChange change) { + + this.change = change; + return this; + } + + /** + * Get change + * @return change + **/ + @javax.annotation.Nullable + + public PortChange getChange() { + return change; + } + + + public void setChange(PortChange change) { + this.change = change; + } + + public Port changeLog(Changelog changeLog) { this.changeLog = changeLog; @@ -1447,6 +1474,7 @@ public boolean equals(Object o) { Objects.equals(this.order, port.order) && Objects.equals(this.operation, port.operation) && Objects.equals(this.account, port.account) && + Objects.equals(this.change, port.change) && Objects.equals(this.changeLog, port.changeLog) && Objects.equals(this.serviceType, port.serviceType) && Objects.equals(this.bandwidth, port.bandwidth) && @@ -1476,7 +1504,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(href, type, id, uuid, name, description, physicalPortsSpeed, connectionsCount, physicalPortsType, physicalPortsCount, connectivitySourceType, bmmrType, project, state, order, operation, account, changeLog, serviceType, bandwidth, availableBandwidth, usedBandwidth, location, device, _interface, demarcationPointIbx, tetherIbx, demarcationPoint, redundancy, encapsulation, lagEnabled, lag, asn, _package, settings, physicalPortQuantity, notifications, additionalInfo, endCustomer, physicalPorts, loas, additionalProperties); + return Objects.hash(href, type, id, uuid, name, description, physicalPortsSpeed, connectionsCount, physicalPortsType, physicalPortsCount, connectivitySourceType, bmmrType, project, state, order, operation, account, change, changeLog, serviceType, bandwidth, availableBandwidth, usedBandwidth, location, device, _interface, demarcationPointIbx, tetherIbx, demarcationPoint, redundancy, encapsulation, lagEnabled, lag, asn, _package, settings, physicalPortQuantity, notifications, additionalInfo, endCustomer, physicalPorts, loas, additionalProperties); } @Override @@ -1500,6 +1528,7 @@ public String toString() { sb.append(" order: ").append(toIndentedString(order)).append("\n"); sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" change: ").append(toIndentedString(change)).append("\n"); sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); sb.append(" serviceType: ").append(toIndentedString(serviceType)).append("\n"); sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); @@ -1564,6 +1593,7 @@ private String toIndentedString(Object o) { openapiFields.add("order"); openapiFields.add("operation"); openapiFields.add("account"); + openapiFields.add("change"); openapiFields.add("changeLog"); openapiFields.add("serviceType"); openapiFields.add("bandwidth"); @@ -1642,6 +1672,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.get("account") != null && !jsonObj.get("account").isJsonNull()) { SimplifiedAccount.validateJsonObject(jsonObj.getAsJsonObject("account")); } + // validate the optional field `change` + if (jsonObj.get("change") != null && !jsonObj.get("change").isJsonNull()) { + PortChange.validateJsonObject(jsonObj.getAsJsonObject("change")); + } // validate the optional field `changeLog` if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { Changelog.validateJsonObject(jsonObj.getAsJsonObject("changeLog")); diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortChange.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortChange.java new file mode 100644 index 00000000..dc2d0d98 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortChange.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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +import com.equinix.openapi.fabric.v4.model.PortChangeOperation; +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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * Current state of latest port change + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PortChange { + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + private String uuid; + + /** + * Type of change + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + CREATION("PORT_CREATION"), + + UPDATE("PORT_UPDATE"), + + DELETION("PORT_DELETION"); + + 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_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + 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 final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public static final String SERIALIZED_NAME_INFORMATION = "information"; + @SerializedName(SERIALIZED_NAME_INFORMATION) + private String information; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private PortChangeOperation data; + + public static final String SERIALIZED_NAME_CREATED_DATE_TIME = "createdDateTime"; + @SerializedName(SERIALIZED_NAME_CREATED_DATE_TIME) + private OffsetDateTime createdDateTime; + + public static final String SERIALIZED_NAME_UPDATED_DATE_TIME = "updatedDateTime"; + @SerializedName(SERIALIZED_NAME_UPDATED_DATE_TIME) + private OffsetDateTime updatedDateTime; + + public PortChange() { + } + + public PortChange uuid(String uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Uniquely identifies a change + * @return uuid + **/ + @javax.annotation.Nullable + + public String getUuid() { + return uuid; + } + + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public PortChange type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Type of change + * @return type + **/ + @javax.annotation.Nullable + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + + public PortChange status(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(StatusEnum status) { + this.status = status; + } + + + public PortChange information(String information) { + + this.information = information; + return this; + } + + /** + * Additional information + * @return information + **/ + @javax.annotation.Nullable + + public String getInformation() { + return information; + } + + + public void setInformation(String information) { + this.information = information; + } + + + public PortChange data(PortChangeOperation data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public PortChangeOperation getData() { + return data; + } + + + public void setData(PortChangeOperation data) { + this.data = data; + } + + + public PortChange createdDateTime(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(OffsetDateTime createdDateTime) { + this.createdDateTime = createdDateTime; + } + + + public PortChange updatedDateTime(OffsetDateTime updatedDateTime) { + + this.updatedDateTime = updatedDateTime; + return this; + } + + /** + * Set when change object is updated + * @return updatedDateTime + **/ + @javax.annotation.Nullable + + public OffsetDateTime getUpdatedDateTime() { + return updatedDateTime; + } + + + public void setUpdatedDateTime(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 PortChange instance itself + */ + public PortChange 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; + } + PortChange portChange = (PortChange) o; + return Objects.equals(this.uuid, portChange.uuid) && + Objects.equals(this.type, portChange.type) && + Objects.equals(this.status, portChange.status) && + Objects.equals(this.information, portChange.information) && + Objects.equals(this.data, portChange.data) && + Objects.equals(this.createdDateTime, portChange.createdDateTime) && + Objects.equals(this.updatedDateTime, portChange.updatedDateTime)&& + Objects.equals(this.additionalProperties, portChange.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, type, status, information, data, createdDateTime, updatedDateTime, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PortChange {\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(" information: ").append(toIndentedString(information)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" createdDateTime: ").append(toIndentedString(createdDateTime)).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(); + openapiFields.add("uuid"); + openapiFields.add("type"); + openapiFields.add("status"); + openapiFields.add("information"); + openapiFields.add("data"); + openapiFields.add("createdDateTime"); + openapiFields.add("updatedDateTime"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to PortChange + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!PortChange.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PortChange is not found in the empty JSON string", PortChange.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("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("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("information") != null && !jsonObj.get("information").isJsonNull()) && !jsonObj.get("information").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `information` to be a primitive type in the JSON string but got `%s`", jsonObj.get("information").toString())); + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + PortChangeOperation.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PortChange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PortChange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PortChange.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PortChange 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PortChange read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + PortChange 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("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 PortChange given an JSON string + * + * @param jsonString JSON string + * @return An instance of PortChange + * @throws IOException if the JSON string is invalid with respect to PortChange + */ + public static PortChange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PortChange.class); + } + + /** + * Convert an instance of PortChange to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortRequest.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortRequest.java index b8bbc79a..7e2d5e04 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortRequest.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortRequest.java @@ -18,6 +18,7 @@ import com.equinix.openapi.fabric.v4.model.ModelPackage; import com.equinix.openapi.fabric.v4.model.PhysicalPort; import com.equinix.openapi.fabric.v4.model.PortAdditionalInfo; +import com.equinix.openapi.fabric.v4.model.PortChange; import com.equinix.openapi.fabric.v4.model.PortDemarcationPoint; import com.equinix.openapi.fabric.v4.model.PortDevice; import com.equinix.openapi.fabric.v4.model.PortEncapsulation; @@ -288,6 +289,10 @@ public BmmrTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_ACCOUNT) private SimplifiedAccount account; + public static final String SERIALIZED_NAME_CHANGE = "change"; + @SerializedName(SERIALIZED_NAME_CHANGE) + private PortChange change; + public static final String SERIALIZED_NAME_CHANGE_LOG = "changeLog"; @SerializedName(SERIALIZED_NAME_CHANGE_LOG) private Changelog changeLog; @@ -809,6 +814,28 @@ public void setAccount(SimplifiedAccount account) { } + public PortRequest change(PortChange change) { + + this.change = change; + return this; + } + + /** + * Get change + * @return change + **/ + @javax.annotation.Nullable + + public PortChange getChange() { + return change; + } + + + public void setChange(PortChange change) { + this.change = change; + } + + public PortRequest changeLog(Changelog changeLog) { this.changeLog = changeLog; @@ -1447,6 +1474,7 @@ public boolean equals(Object o) { Objects.equals(this.order, portRequest.order) && Objects.equals(this.operation, portRequest.operation) && Objects.equals(this.account, portRequest.account) && + Objects.equals(this.change, portRequest.change) && Objects.equals(this.changeLog, portRequest.changeLog) && Objects.equals(this.serviceType, portRequest.serviceType) && Objects.equals(this.bandwidth, portRequest.bandwidth) && @@ -1476,7 +1504,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(href, type, id, uuid, name, description, physicalPortsSpeed, connectionsCount, physicalPortsType, physicalPortsCount, connectivitySourceType, bmmrType, project, state, order, operation, account, changeLog, serviceType, bandwidth, availableBandwidth, usedBandwidth, location, device, _interface, demarcationPointIbx, tetherIbx, demarcationPoint, redundancy, encapsulation, lagEnabled, lag, asn, _package, settings, physicalPortQuantity, notifications, additionalInfo, endCustomer, physicalPorts, loas, additionalProperties); + return Objects.hash(href, type, id, uuid, name, description, physicalPortsSpeed, connectionsCount, physicalPortsType, physicalPortsCount, connectivitySourceType, bmmrType, project, state, order, operation, account, change, changeLog, serviceType, bandwidth, availableBandwidth, usedBandwidth, location, device, _interface, demarcationPointIbx, tetherIbx, demarcationPoint, redundancy, encapsulation, lagEnabled, lag, asn, _package, settings, physicalPortQuantity, notifications, additionalInfo, endCustomer, physicalPorts, loas, additionalProperties); } @Override @@ -1500,6 +1528,7 @@ public String toString() { sb.append(" order: ").append(toIndentedString(order)).append("\n"); sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); sb.append(" account: ").append(toIndentedString(account)).append("\n"); + sb.append(" change: ").append(toIndentedString(change)).append("\n"); sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); sb.append(" serviceType: ").append(toIndentedString(serviceType)).append("\n"); sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); @@ -1564,6 +1593,7 @@ private String toIndentedString(Object o) { openapiFields.add("order"); openapiFields.add("operation"); openapiFields.add("account"); + openapiFields.add("change"); openapiFields.add("changeLog"); openapiFields.add("serviceType"); openapiFields.add("bandwidth"); @@ -1655,6 +1685,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the required field `account` SimplifiedAccount.validateJsonObject(jsonObj.getAsJsonObject("account")); + // validate the optional field `change` + if (jsonObj.get("change") != null && !jsonObj.get("change").isJsonNull()) { + PortChange.validateJsonObject(jsonObj.getAsJsonObject("change")); + } // validate the optional field `changeLog` if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { Changelog.validateJsonObject(jsonObj.getAsJsonObject("changeLog")); diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortState.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortState.java index e44efde7..29b52098 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortState.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortState.java @@ -31,6 +31,8 @@ public enum PortState { PROVISIONING("PROVISIONING"), + REPROVISIONING("REPROVISIONING"), + PROVISIONED("PROVISIONED"), ACTIVE("ACTIVE"), diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortType.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortType.java index e37f83d2..4a117cac 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortType.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PortType.java @@ -29,7 +29,9 @@ public enum PortType { XF_PORT("XF_PORT"), - IX_PORT("IX_PORT"); + IX_PORT("IX_PORT"), + + IA_PORT("IA_PORT"); private String value; diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePackagePostResponse.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePackagePostResponse.java new file mode 100644 index 00000000..d6a61c48 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimePackagePostResponse.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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * PrecisionTimePackagePostResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PrecisionTimePackagePostResponse { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private URI href; + + /** + * Gets or Sets code + */ + @JsonAdapter(CodeEnum.Adapter.class) + public enum CodeEnum { + NTP_STANDARD("NTP_STANDARD"), + + NTP_ENTERPRISE("NTP_ENTERPRISE"), + + PTP_STANDARD("PTP_STANDARD"), + + PTP_ENTERPRISE("PTP_ENTERPRISE"); + + private String value; + + CodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CodeEnum fromValue(String value) { + for (CodeEnum b : CodeEnum.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 CodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CodeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private CodeEnum code; + + public PrecisionTimePackagePostResponse() { + } + + public PrecisionTimePackagePostResponse href(URI href) { + + this.href = href; + return this; + } + + /** + * Get href + * @return href + **/ + @javax.annotation.Nullable + + public URI getHref() { + return href; + } + + + public void setHref(URI href) { + this.href = href; + } + + + public PrecisionTimePackagePostResponse code(CodeEnum code) { + + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @javax.annotation.Nonnull + + public CodeEnum getCode() { + return code; + } + + + public void setCode(CodeEnum code) { + this.code = code; + } + + /** + * 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 PrecisionTimePackagePostResponse instance itself + */ + public PrecisionTimePackagePostResponse 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; + } + PrecisionTimePackagePostResponse precisionTimePackagePostResponse = (PrecisionTimePackagePostResponse) o; + return Objects.equals(this.href, precisionTimePackagePostResponse.href) && + Objects.equals(this.code, precisionTimePackagePostResponse.code)&& + Objects.equals(this.additionalProperties, precisionTimePackagePostResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, code, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrecisionTimePackagePostResponse {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).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(); + openapiFields.add("href"); + openapiFields.add("code"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to PrecisionTimePackagePostResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!PrecisionTimePackagePostResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PrecisionTimePackagePostResponse is not found in the empty JSON string", PrecisionTimePackagePostResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PrecisionTimePackagePostResponse.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrecisionTimePackagePostResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrecisionTimePackagePostResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PrecisionTimePackagePostResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PrecisionTimePackagePostResponse 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PrecisionTimePackagePostResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + PrecisionTimePackagePostResponse 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("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 PrecisionTimePackagePostResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrecisionTimePackagePostResponse + * @throws IOException if the JSON string is invalid with respect to PrecisionTimePackagePostResponse + */ + public static PrecisionTimePackagePostResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrecisionTimePackagePostResponse.class); + } + + /** + * Convert an instance of PrecisionTimePackagePostResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimeServiceResponse.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimeServiceResponse.java index 849bae53..6bf221f5 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimeServiceResponse.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/PrecisionTimeServiceResponse.java @@ -17,7 +17,7 @@ import com.equinix.openapi.fabric.v4.model.Ipv4; import com.equinix.openapi.fabric.v4.model.Md5; import com.equinix.openapi.fabric.v4.model.PrecisionTimeOrder; -import com.equinix.openapi.fabric.v4.model.PrecisionTimePackageResponse; +import com.equinix.openapi.fabric.v4.model.PrecisionTimePackagePostResponse; import com.equinix.openapi.fabric.v4.model.PrecisionTimePrice; import com.equinix.openapi.fabric.v4.model.Project; import com.equinix.openapi.fabric.v4.model.PtpAdvanceConfiguration; @@ -200,7 +200,7 @@ public StateEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_PACKAGE = "package"; @SerializedName(SERIALIZED_NAME_PACKAGE) - private PrecisionTimePackageResponse _package; + private PrecisionTimePackagePostResponse _package; public static final String SERIALIZED_NAME_CONNECTIONS = "connections"; @SerializedName(SERIALIZED_NAME_CONNECTIONS) @@ -351,7 +351,7 @@ public void setState(StateEnum state) { } - public PrecisionTimeServiceResponse _package(PrecisionTimePackageResponse _package) { + public PrecisionTimeServiceResponse _package(PrecisionTimePackagePostResponse _package) { this._package = _package; return this; @@ -363,12 +363,12 @@ public PrecisionTimeServiceResponse _package(PrecisionTimePackageResponse _packa **/ @javax.annotation.Nonnull - public PrecisionTimePackageResponse getPackage() { + public PrecisionTimePackagePostResponse getPackage() { return _package; } - public void setPackage(PrecisionTimePackageResponse _package) { + public void setPackage(PrecisionTimePackagePostResponse _package) { this._package = _package; } @@ -766,7 +766,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } // validate the required field `package` - PrecisionTimePackageResponse.validateJsonObject(jsonObj.getAsJsonObject("package")); + PrecisionTimePackagePostResponse.validateJsonObject(jsonObj.getAsJsonObject("package")); if (jsonObj.get("connections") != null && !jsonObj.get("connections").isJsonNull()) { JsonArray jsonArrayconnections = jsonObj.getAsJsonArray("connections"); if (jsonArrayconnections != null) { diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/ResourceData.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/ResourceData.java new file mode 100644 index 00000000..58794129 --- /dev/null +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/ResourceData.java @@ -0,0 +1,406 @@ +/* + * 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.openapi.fabric.v4.model; + +import java.util.Objects; +import java.util.Arrays; +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 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 java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.equinix.openapi.fabric.JSON; + +/** + * ResourceData + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceData { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private String href; + + public static final String SERIALIZED_NAME_UUID = "uuid"; + @SerializedName(SERIALIZED_NAME_UUID) + private String uuid; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public ResourceData() { + } + + public ResourceData href(String href) { + + this.href = href; + return this; + } + + /** + * Cloud Event asset href + * @return href + **/ + @javax.annotation.Nullable + + public String getHref() { + return href; + } + + + public void setHref(String href) { + this.href = href; + } + + + public ResourceData uuid(String uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Cloud Event asset uuid + * @return uuid + **/ + @javax.annotation.Nullable + + public String getUuid() { + return uuid; + } + + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public ResourceData type(String type) { + + this.type = type; + return this; + } + + /** + * Cloud Event asset type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public ResourceData name(String name) { + + this.name = name; + return this; + } + + /** + * Cloud Event asset name + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public ResourceData state(String state) { + + this.state = state; + return this; + } + + /** + * Cloud Event asset state + * @return state + **/ + @javax.annotation.Nullable + + public String getState() { + return state; + } + + + public void setState(String state) { + this.state = state; + } + + /** + * 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 ResourceData instance itself + */ + public ResourceData 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; + } + ResourceData resourceData = (ResourceData) o; + return Objects.equals(this.href, resourceData.href) && + Objects.equals(this.uuid, resourceData.uuid) && + Objects.equals(this.type, resourceData.type) && + Objects.equals(this.name, resourceData.name) && + Objects.equals(this.state, resourceData.state)&& + Objects.equals(this.additionalProperties, resourceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, uuid, type, name, state, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceData {\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(" 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(); + openapiFields.add("href"); + openapiFields.add("uuid"); + openapiFields.add("type"); + openapiFields.add("name"); + openapiFields.add("state"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResourceData + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResourceData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceData is not found in the empty JSON string", ResourceData.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("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("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("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceData 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 { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResourceData read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResourceData 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("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 ResourceData given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceData + * @throws IOException if the JSON string is invalid with respect to ResourceData + */ + public static ResourceData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceData.class); + } + + /** + * Convert an instance of ResourceData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscription.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscription.java index f4dcffea..664cd633 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscription.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscription.java @@ -14,7 +14,6 @@ import java.util.Objects; import java.util.Arrays; import com.equinix.openapi.fabric.v4.model.Changelog; -import com.equinix.openapi.fabric.v4.model.StreamSubscriptionFilter; import com.equinix.openapi.fabric.v4.model.StreamSubscriptionSelector; import com.equinix.openapi.fabric.v4.model.StreamSubscriptionSink; import com.google.gson.TypeAdapter; @@ -180,10 +179,6 @@ public StateEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_ENABLED) private Boolean enabled; - public static final String SERIALIZED_NAME_FILTERS = "filters"; - @SerializedName(SERIALIZED_NAME_FILTERS) - private StreamSubscriptionFilter filters; - public static final String SERIALIZED_NAME_METRIC_SELECTOR = "metricSelector"; @SerializedName(SERIALIZED_NAME_METRIC_SELECTOR) private StreamSubscriptionSelector metricSelector; @@ -200,6 +195,10 @@ public StateEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_CHANGE_LOG) private Changelog changeLog; + public static final String SERIALIZED_NAME_LAST_ERROR_MESSAGE = "lastErrorMessage"; + @SerializedName(SERIALIZED_NAME_LAST_ERROR_MESSAGE) + private String lastErrorMessage; + public StreamSubscription() { } @@ -356,28 +355,6 @@ public void setEnabled(Boolean enabled) { } - public StreamSubscription filters(StreamSubscriptionFilter filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * @return filters - **/ - @javax.annotation.Nullable - - public StreamSubscriptionFilter getFilters() { - return filters; - } - - - public void setFilters(StreamSubscriptionFilter filters) { - this.filters = filters; - } - - public StreamSubscription metricSelector(StreamSubscriptionSelector metricSelector) { this.metricSelector = metricSelector; @@ -465,6 +442,28 @@ public void setChangeLog(Changelog changeLog) { this.changeLog = changeLog; } + + public StreamSubscription lastErrorMessage(String lastErrorMessage) { + + this.lastErrorMessage = lastErrorMessage; + return this; + } + + /** + * HTTP response from sink type if error occurred + * @return lastErrorMessage + **/ + @javax.annotation.Nullable + + public String getLastErrorMessage() { + return lastErrorMessage; + } + + + public void setLastErrorMessage(String lastErrorMessage) { + this.lastErrorMessage = lastErrorMessage; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -527,17 +526,17 @@ public boolean equals(Object o) { Objects.equals(this.description, streamSubscription.description) && Objects.equals(this.state, streamSubscription.state) && Objects.equals(this.enabled, streamSubscription.enabled) && - Objects.equals(this.filters, streamSubscription.filters) && Objects.equals(this.metricSelector, streamSubscription.metricSelector) && Objects.equals(this.eventSelector, streamSubscription.eventSelector) && Objects.equals(this.sink, streamSubscription.sink) && - Objects.equals(this.changeLog, streamSubscription.changeLog)&& + Objects.equals(this.changeLog, streamSubscription.changeLog) && + Objects.equals(this.lastErrorMessage, streamSubscription.lastErrorMessage)&& Objects.equals(this.additionalProperties, streamSubscription.additionalProperties); } @Override public int hashCode() { - return Objects.hash(href, uuid, type, name, description, state, enabled, filters, metricSelector, eventSelector, sink, changeLog, additionalProperties); + return Objects.hash(href, uuid, type, name, description, state, enabled, metricSelector, eventSelector, sink, changeLog, lastErrorMessage, additionalProperties); } @Override @@ -551,11 +550,11 @@ public String toString() { 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(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append(" metricSelector: ").append(toIndentedString(metricSelector)).append("\n"); sb.append(" eventSelector: ").append(toIndentedString(eventSelector)).append("\n"); sb.append(" sink: ").append(toIndentedString(sink)).append("\n"); sb.append(" changeLog: ").append(toIndentedString(changeLog)).append("\n"); + sb.append(" lastErrorMessage: ").append(toIndentedString(lastErrorMessage)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -586,11 +585,11 @@ private String toIndentedString(Object o) { openapiFields.add("description"); openapiFields.add("state"); openapiFields.add("enabled"); - openapiFields.add("filters"); openapiFields.add("metricSelector"); openapiFields.add("eventSelector"); openapiFields.add("sink"); openapiFields.add("changeLog"); + openapiFields.add("lastErrorMessage"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -626,10 +625,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } - // validate the optional field `filters` - if (jsonObj.get("filters") != null && !jsonObj.get("filters").isJsonNull()) { - StreamSubscriptionFilter.validateJsonObject(jsonObj.getAsJsonObject("filters")); - } // validate the optional field `metricSelector` if (jsonObj.get("metricSelector") != null && !jsonObj.get("metricSelector").isJsonNull()) { StreamSubscriptionSelector.validateJsonObject(jsonObj.getAsJsonObject("metricSelector")); @@ -646,6 +641,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.get("changeLog") != null && !jsonObj.get("changeLog").isJsonNull()) { Changelog.validateJsonObject(jsonObj.getAsJsonObject("changeLog")); } + if ((jsonObj.get("lastErrorMessage") != null && !jsonObj.get("lastErrorMessage").isJsonNull()) && !jsonObj.get("lastErrorMessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastErrorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastErrorMessage").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscriptionPostRequest.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscriptionPostRequest.java index b2c318d5..4d2100ca 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscriptionPostRequest.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscriptionPostRequest.java @@ -13,7 +13,6 @@ import java.util.Objects; import java.util.Arrays; -import com.equinix.openapi.fabric.v4.model.StreamSubscriptionFilter; import com.equinix.openapi.fabric.v4.model.StreamSubscriptionSelector; import com.equinix.openapi.fabric.v4.model.StreamSubscriptionSink; import com.google.gson.TypeAdapter; @@ -110,10 +109,6 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_ENABLED) private Boolean enabled; - public static final String SERIALIZED_NAME_FILTERS = "filters"; - @SerializedName(SERIALIZED_NAME_FILTERS) - private StreamSubscriptionFilter filters; - public static final String SERIALIZED_NAME_METRIC_SELECTOR = "metricSelector"; @SerializedName(SERIALIZED_NAME_METRIC_SELECTOR) private StreamSubscriptionSelector metricSelector; @@ -217,28 +212,6 @@ public void setEnabled(Boolean enabled) { } - public StreamSubscriptionPostRequest filters(StreamSubscriptionFilter filters) { - - this.filters = filters; - return this; - } - - /** - * Get filters - * @return filters - **/ - @javax.annotation.Nullable - - public StreamSubscriptionFilter getFilters() { - return filters; - } - - - public void setFilters(StreamSubscriptionFilter filters) { - this.filters = filters; - } - - public StreamSubscriptionPostRequest metricSelector(StreamSubscriptionSelector metricSelector) { this.metricSelector = metricSelector; @@ -363,7 +336,6 @@ public boolean equals(Object o) { Objects.equals(this.name, streamSubscriptionPostRequest.name) && Objects.equals(this.description, streamSubscriptionPostRequest.description) && Objects.equals(this.enabled, streamSubscriptionPostRequest.enabled) && - Objects.equals(this.filters, streamSubscriptionPostRequest.filters) && Objects.equals(this.metricSelector, streamSubscriptionPostRequest.metricSelector) && Objects.equals(this.eventSelector, streamSubscriptionPostRequest.eventSelector) && Objects.equals(this.sink, streamSubscriptionPostRequest.sink)&& @@ -372,7 +344,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(type, name, description, enabled, filters, metricSelector, eventSelector, sink, additionalProperties); + return Objects.hash(type, name, description, enabled, metricSelector, eventSelector, sink, additionalProperties); } @Override @@ -383,7 +355,6 @@ public String toString() { 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(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append(" metricSelector: ").append(toIndentedString(metricSelector)).append("\n"); sb.append(" eventSelector: ").append(toIndentedString(eventSelector)).append("\n"); sb.append(" sink: ").append(toIndentedString(sink)).append("\n"); @@ -414,7 +385,6 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("description"); openapiFields.add("enabled"); - openapiFields.add("filters"); openapiFields.add("metricSelector"); openapiFields.add("eventSelector"); openapiFields.add("sink"); @@ -444,10 +414,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - // validate the optional field `filters` - if (jsonObj.get("filters") != null && !jsonObj.get("filters").isJsonNull()) { - StreamSubscriptionFilter.validateJsonObject(jsonObj.getAsJsonObject("filters")); - } // validate the optional field `metricSelector` if (jsonObj.get("metricSelector") != null && !jsonObj.get("metricSelector").isJsonNull()) { StreamSubscriptionSelector.validateJsonObject(jsonObj.getAsJsonObject("metricSelector")); diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscriptionSinkSetting.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscriptionSinkSetting.java index eb13c2f4..2b5bf56c 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscriptionSinkSetting.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/StreamSubscriptionSinkSetting.java @@ -70,10 +70,6 @@ public class StreamSubscriptionSinkSetting { @SerializedName(SERIALIZED_NAME_METRIC_URI) private String metricUri; - public static final String SERIALIZED_NAME_TRANSFORM_ALERTS = "transformAlerts"; - @SerializedName(SERIALIZED_NAME_TRANSFORM_ALERTS) - private Boolean transformAlerts; - public StreamSubscriptionSinkSetting() { } @@ -208,28 +204,6 @@ public void setMetricUri(String metricUri) { this.metricUri = metricUri; } - - public StreamSubscriptionSinkSetting transformAlerts(Boolean transformAlerts) { - - this.transformAlerts = transformAlerts; - return this; - } - - /** - * transform alerts - * @return transformAlerts - **/ - @javax.annotation.Nullable - - public Boolean getTransformAlerts() { - return transformAlerts; - } - - - public void setTransformAlerts(Boolean transformAlerts) { - this.transformAlerts = transformAlerts; - } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -290,14 +264,13 @@ public boolean equals(Object o) { Objects.equals(this.source, streamSubscriptionSinkSetting.source) && Objects.equals(this.applicationKey, streamSubscriptionSinkSetting.applicationKey) && Objects.equals(this.eventUri, streamSubscriptionSinkSetting.eventUri) && - Objects.equals(this.metricUri, streamSubscriptionSinkSetting.metricUri) && - Objects.equals(this.transformAlerts, streamSubscriptionSinkSetting.transformAlerts)&& + Objects.equals(this.metricUri, streamSubscriptionSinkSetting.metricUri)&& Objects.equals(this.additionalProperties, streamSubscriptionSinkSetting.additionalProperties); } @Override public int hashCode() { - return Objects.hash(eventIndex, metricIndex, source, applicationKey, eventUri, metricUri, transformAlerts, additionalProperties); + return Objects.hash(eventIndex, metricIndex, source, applicationKey, eventUri, metricUri, additionalProperties); } @Override @@ -310,7 +283,6 @@ public String toString() { sb.append(" applicationKey: ").append(toIndentedString(applicationKey)).append("\n"); sb.append(" eventUri: ").append(toIndentedString(eventUri)).append("\n"); sb.append(" metricUri: ").append(toIndentedString(metricUri)).append("\n"); - sb.append(" transformAlerts: ").append(toIndentedString(transformAlerts)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -340,7 +312,6 @@ private String toIndentedString(Object o) { openapiFields.add("applicationKey"); openapiFields.add("eventUri"); openapiFields.add("metricUri"); - openapiFields.add("transformAlerts"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/VirtualConnectionTimeServiceResponse.java b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/VirtualConnectionTimeServiceResponse.java index 60090595..bb6e0380 100644 --- a/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/VirtualConnectionTimeServiceResponse.java +++ b/equinix-openapi-fabric/src/main/java/com/equinix/openapi/fabric/v4/model/VirtualConnectionTimeServiceResponse.java @@ -84,7 +84,7 @@ public VirtualConnectionTimeServiceResponse( * Connection URI * @return href **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public URI getHref() { return href; @@ -103,7 +103,7 @@ public VirtualConnectionTimeServiceResponse type(String type) { * Connection Type. * @return type **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getType() { return type; @@ -125,7 +125,7 @@ public VirtualConnectionTimeServiceResponse uuid(UUID uuid) { * Connection UUID. * @return uuid **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public UUID getUuid() { return uuid; @@ -288,9 +288,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("href"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("uuid"); } /** @@ -305,20 +302,13 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field(s) %s in VirtualConnectionTimeServiceResponse is not found in the empty JSON string", VirtualConnectionTimeServiceResponse.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : VirtualConnectionTimeServiceResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); - } - } - if (!jsonObj.get("href").isJsonPrimitive()) { + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("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()) { + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("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()) { + if ((jsonObj.get("uuid") != null && !jsonObj.get("uuid").isJsonNull()) && !jsonObj.get("uuid").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uuid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uuid").toString())); } // validate the optional field `aSide` diff --git a/patches/spec.fetched.json/20250414-cloud-router-required-field-skip.patch b/patches/spec.fetched.json/20250414-cloud-router-required-field-skip.patch new file mode 100644 index 00000000..93780ce4 --- /dev/null +++ b/patches/spec.fetched.json/20250414-cloud-router-required-field-skip.patch @@ -0,0 +1,17 @@ +diff --git a/spec/oas3.fabric.fetched.json b/spec/oas3.fabric.fetched.json +index 6e71ec0..d30b7b5 100644 +--- a/spec/oas3.fabric.fetched.json ++++ b/spec/oas3.fabric.fetched.json +@@ -23669,11 +23669,7 @@ + }, + "CloudRouterPostRequest": { + "required": [ +- "location", +- "name", +- "notification", +- "package", +- "type" ++ "notification" + ], + "type": "object", + "properties": { diff --git a/spec/oas3.fabric.fetched.json b/spec/oas3.fabric.fetched.json index 54c8352c..6e71ec0f 100644 --- a/spec/oas3.fabric.fetched.json +++ b/spec/oas3.fabric.fetched.json @@ -12,7 +12,7 @@ "name": "Equinix Inc", "url": "https://developer.equinix.com/agreement" }, - "version": "4.20" + "version": "4.21" }, "externalDocs": { "description": "Find more information on Equinix Developer Portal", @@ -30,6 +30,10 @@ } ], "tags": [ + { + "name": "Cloud Events", + "description": "Cloud Events" + }, { "name": "Cloud Routers", "description": "Cloud Routers" @@ -88,18 +92,362 @@ }, { "name": "Stream Alert Rules", - "description": "Stream Subscriptions Beta" + "description": "Stream Subscriptions" }, { "name": "Stream Subscriptions", - "description": "Stream Subscriptions Beta" + "description": "Stream Subscriptions" }, { "name": "Streams", - "description": "Streams Beta" + "description": "Streams" } ], "paths": { + "/fabric/v4/{asset}/{assetId}/cloudevents": { + "get": { + "tags": [ + "Cloud Events" + ], + "summary": "Get Cloud Events by Asset Id", + "description": "This API provides capability to retrieve cloud events of an asset id", + "operationId": "getCloudEventByAssetId", + "parameters": [ + { + "name": "asset", + "in": "path", + "description": "asset", + "required": true, + "schema": { + "$ref": "#/components/schemas/CloudEventAssetType" + } + }, + { + "name": "assetId", + "in": "path", + "description": "asset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/AssetId" + } + }, + { + "name": "fromDateTime", + "in": "query", + "description": "Start date and time", + "required": false, + "schema": { + "$ref": "#/components/schemas/StartDateTime" + } + }, + { + "name": "toDateTime", + "in": "query", + "description": "End date and time", + "required": false, + "schema": { + "$ref": "#/components/schemas/EndDateTime" + } + }, + { + "name": "offset", + "in": "query", + "description": "offset", + "required": false, + "schema": { + "$ref": "#/components/schemas/Offset" + } + }, + { + "name": "limit", + "in": "query", + "description": "limit", + "required": false, + "schema": { + "$ref": "#/components/schemas/Limit" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCloudEventsByAssetResponse" + }, + "examples": { + "Example": { + "$ref": "#/components/examples/get-cloud-events-by-asset-id" + } + } + } + } + }, + "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/cloudevents/{cloudEventId}": { + "get": { + "tags": [ + "Cloud Events" + ], + "summary": "Get Cloud Event", + "description": "This API provides capability to retrieve a cloud event by uuid", + "operationId": "getCloudEvent", + "parameters": [ + { + "name": "cloudEventId", + "in": "path", + "description": "Cloud Event UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/CloudEventId" + } + } + ], + "responses": { + "200": { + "description": "Cloud Event object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudEvent" + }, + "examples": { + "CloudEventResponseExample": { + "$ref": "#/components/examples/get-cloud-event" + } + } + } + } + }, + "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/cloudevents/search": { + "post": { + "tags": [ + "Cloud Events" + ], + "summary": "Search Cloud Events", + "description": "This API provides capability to search cloud events from a filtered query", + "operationId": "searchCloudEvents", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudEventSearchRequest" + }, + "examples": { + "CloudEventSearchRequestExample": { + "$ref": "#/components/examples/search-cloud-events" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCloudEventsByAssetResponse" + }, + "examples": { + "Example": { + "$ref": "#/components/examples/get-cloud-events-by-asset-id" + } + } + } + } + }, + "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/connections": { "post": { "tags": [ @@ -418,7 +766,7 @@ }, "examples": { "Colo2Sp": { - "$ref": "#/components/examples/ConnectionExample" + "$ref": "#/components/examples/ConnectionCreateResponse" }, "Colo2Sp-Google": { "$ref": "#/components/examples/COLO2GoogleSPwithDot1q-Response" @@ -846,6 +1194,16 @@ "schema": { "$ref": "#/components/schemas/ConnectionId" } + }, + { + "name": "dryRun", + "in": "query", + "description": "option to verify that API calls will succeed", + "required": false, + "schema": { + "type": "boolean", + "default": false + } } ], "requestBody": { @@ -872,6 +1230,9 @@ }, "ConnectionMigrationAsideRequestForVirtualDevice": { "$ref": "#/components/examples/ConnectionMigrationAsideVirtualDeviceRequest" + }, + "ConnectionUpdateBandwidthRequestDryRun": { + "$ref": "#/components/examples/ConnectionUpdateBandwidthRequest" } } } @@ -879,6 +1240,21 @@ "required": true }, "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + }, + "examples": { + "connectionPatchExampleDryRun": { + "$ref": "#/components/examples/ConnectionPatchResponseDryRun" + } + } + } + } + }, "202": { "description": "Successful operation", "content": { @@ -902,6 +1278,24 @@ } } }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400" + }, + "dryRun": { + "$ref": "#/components/examples/400_dry_run" + } + } + } + } + }, "401": { "description": "Unauthorized", "content": { @@ -3532,7 +3926,7 @@ "description": "startDateTime", "required": true, "schema": { - "$ref": "#/components/schemas/startDateTime" + "$ref": "#/components/schemas/StartDateTime" }, "example": "2020-11-06T07:00:00Z" }, @@ -3542,7 +3936,7 @@ "description": "endDateTime", "required": true, "schema": { - "$ref": "#/components/schemas/endDateTime" + "$ref": "#/components/schemas/EndDateTime" }, "example": "2020-11-10T07:00:00Z" } @@ -3635,7 +4029,7 @@ "description": "startDateTime", "required": true, "schema": { - "$ref": "#/components/schemas/startDateTime" + "$ref": "#/components/schemas/StartDateTime" }, "example": "2020-11-06T07:00:00Z" }, @@ -3645,7 +4039,7 @@ "description": "endDateTime", "required": true, "schema": { - "$ref": "#/components/schemas/endDateTime" + "$ref": "#/components/schemas/EndDateTime" }, "example": "2020-11-10T07:00:00Z" }, @@ -4747,6 +5141,9 @@ }, "tokenNetworkExample": { "$ref": "#/components/examples/getServiceToken-Network" + }, + "tokenDryRunExample": { + "$ref": "#/components/examples/getServiceToken-DryRun" } } } @@ -4762,6 +5159,9 @@ "examples": { "example": { "$ref": "#/components/examples/400_UUID" + }, + "dryRunExample": { + "$ref": "#/components/examples/400_dry_run" } } } @@ -4834,6 +5234,9 @@ }, "tokenNetworkExample": { "$ref": "#/components/examples/getServiceToken-Network" + }, + "tokenDryRunExample": { + "$ref": "#/components/examples/getServiceToken-DryRun" } } } @@ -4849,6 +5252,9 @@ "examples": { "example": { "$ref": "#/components/examples/400_UUID" + }, + "dryRunExample": { + "$ref": "#/components/examples/400_dry_run" } } } @@ -4902,6 +5308,16 @@ "schema": { "$ref": "#/components/schemas/ServiceTokenUUID" } + }, + { + "name": "dryRun", + "in": "query", + "description": "option to verify that API calls will succeed", + "required": false, + "schema": { + "type": "boolean", + "default": false + } } ], "requestBody": { @@ -4928,6 +5344,12 @@ }, "UpdateZsideTokenBandwidth": { "$ref": "#/components/examples/UpdateZsideTokenBandwidth" + }, + "UpdateAsideTokenBandwidthDryRun": { + "$ref": "#/components/examples/UpdateAsideTokenBandwidth" + }, + "UpdateZsideTokenBandwidthDryRun": { + "$ref": "#/components/examples/UpdateZsideTokenBandwidth" } } } @@ -4951,6 +5373,9 @@ }, "tokenNetworkExample": { "$ref": "#/components/examples/getServiceToken-Network" + }, + "tokenDryRunExample": { + "$ref": "#/components/examples/getServiceToken-DryRun" } } } @@ -4966,6 +5391,9 @@ "examples": { "example": { "$ref": "#/components/examples/400_UUID" + }, + "dryRunExample": { + "$ref": "#/components/examples/400_dry_run" } } } @@ -13168,14 +13596,14 @@ } } }, - "/fabric/v4/routers/{routerId}/routes/search": { - "post": { + "/fabric/v4/routers/{routerId}/commands": { + "get": { "tags": [ "Cloud Routers" ], - "summary": "Search Route Table", - "description": "The API provides capability to get list of user's Fabric Cloud Router route table entries using search criteria, including optional filtering, pagination and sorting", - "operationId": "searchCloudRouterRoutes", + "summary": "Get Commands", + "description": "This API provides capability to fetch all commands", + "operationId": "getAllCloudRouterCommands", "parameters": [ { "name": "routerId", @@ -13187,40 +13615,18 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RouteTableEntrySearchRequest" - }, - "examples": { - "SearchFilterByNextHop": { - "$ref": "#/components/examples/SearchFilterByNextHop" - }, - "SearchFilterByPrefix": { - "$ref": "#/components/examples/SearchFilterByPrefix" - }, - "SearchFilterByType": { - "$ref": "#/components/examples/SearchFilterByType" - }, - "SearchFilterByStatus": { - "$ref": "#/components/examples/SearchFilterByStatus" - }, - "SearchFilterOrAnd": { - "$ref": "#/components/examples/SearchFilterOrAnd" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RouteTableEntrySearchResponse" + "$ref": "#/components/schemas/GetAllCloudRouterCommands" + }, + "examples": { + "getAllCommandsExample": { + "$ref": "#/components/examples/GetAllPingCommandResponse" + } } } } @@ -13234,7 +13640,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/400_invalid_sorting" + "$ref": "#/components/examples/400_invalid_operation_commands" } } } @@ -13264,7 +13670,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/403" + "$ref": "#/components/examples/403_commands" } } } @@ -13279,7 +13685,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/404" + "$ref": "#/components/examples/404_commands" } } } @@ -13294,7 +13700,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/415" + "$ref": "#/components/examples/415_commands" } } } @@ -13309,31 +13715,29 @@ }, "examples": { "example": { - "$ref": "#/components/examples/500" + "$ref": "#/components/examples/500_commands" } } } } } } - } - }, - "/fabric/v4/routers/{routerId}/validate": { + }, "post": { "tags": [ - "Routing Protocols" + "Cloud Routers" ], - "summary": "Validate Subnet", - "description": "This API provides capability to validate all subnets associated with any connection in the given FCR", - "operationId": "validateRoutingProtocol", + "summary": "Initiate Command", + "description": "This API provides capability to initiate Command", + "operationId": "createCloudRouterCommand", "parameters": [ { "name": "routerId", "in": "path", - "description": "Cloud Router UUID", + "description": "Router UUID", "required": true, "schema": { - "$ref": "#/components/schemas/RouterId" + "$ref": "#/components/schemas/RouterId_1" } } ], @@ -13341,14 +13745,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidateRequest" + "$ref": "#/components/schemas/CloudRouterCommandPostRequest" }, "examples": { - "ValidateDirectIpv4": { - "$ref": "#/components/examples/Request-direct-ipv4" - }, - "ValidateDirectIpv6": { - "$ref": "#/components/examples/Request-direct-ipv6" + "InitiatePingCommand": { + "$ref": "#/components/examples/PostRequestPingCommand" } } } @@ -13356,16 +13757,16 @@ "required": true }, "responses": { - "200": { + "202": { "description": "Successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidateSubnetResponse" + "$ref": "#/components/schemas/CloudRouterCommand" }, "examples": { - "ValidateSubnet": { - "$ref": "#/components/examples/Response-200" + "initiateCommandsExample": { + "$ref": "#/components/examples/PostResponsePingCommand" } } } @@ -13379,67 +13780,15 @@ "$ref": "#/components/schemas/ErrorList" }, "examples": { - "Bad Request": { - "$ref": "#/components/examples/error-400" - }, - "Subnet Overlapping": { - "$ref": "#/components/examples/error-400-overlappingSubnet" - } - } - } - } - } - } - } - }, - "/fabric/v4/routers/search": { - "post": { - "tags": [ - "Cloud Routers" - ], - "summary": "Search Routers", - "description": "The API provides capability to get list of user's Cloud Routers using search criteria, including optional filtering, pagination and sorting", - "operationId": "searchCloudRouters", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CloudRouterSearchRequest" - }, - "examples": { - "SearchFilterByStatus": { - "$ref": "#/components/examples/SearchFilterByStatus" - }, - "SearchFilterByNameAndMetroName": { - "$ref": "#/components/examples/SearchFilterByNameAndMetroName" - }, - "SearchFilterOrAnd": { - "$ref": "#/components/examples/SearchFilterOrAnd" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResponse" - }, - "examples": { - "Example": { - "$ref": "#/components/examples/search-example" + "example": { + "$ref": "#/components/examples/400_invalid_operation_commands" } } } } }, - "400": { - "description": "Bad request", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -13447,14 +13796,14 @@ }, "examples": { "example": { - "$ref": "#/components/examples/400_invalid_sorting" + "$ref": "#/components/examples/401" } } } } }, - "401": { - "description": "Unauthorized", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -13462,14 +13811,14 @@ }, "examples": { "example": { - "$ref": "#/components/examples/401" + "$ref": "#/components/examples/403_commands" } } } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -13477,14 +13826,14 @@ }, "examples": { "example": { - "$ref": "#/components/examples/403" + "$ref": "#/components/examples/404_commands" } } } } }, "415": { - "description": "Unsupported Media Type", + "description": "Internal server error", "content": { "application/json": { "schema": { @@ -13492,7 +13841,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/415" + "$ref": "#/components/examples/415_commands" } } } @@ -13507,7 +13856,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/500" + "$ref": "#/components/examples/500_commands" } } } @@ -13516,47 +13865,783 @@ } } }, - "/fabric/v4/routerPackages": { - "get": { + "/fabric/v4/routers/{routerId}/commands/search": { + "post": { "tags": [ "Cloud Routers" ], - "summary": "List Packages", - "description": "This API provides capability to retrieve user's Cloud Routers Packages", - "operationId": "getCloudRouterPackages", + "summary": "Search Commands", + "description": "This API provides capability to search commands", + "operationId": "searchCloudRouterCommands", "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, + "name": "routerId", + "in": "path", + "description": "Router UUID", + "required": true, "schema": { - "type": "integer" - }, - "example": 10 + "$ref": "#/components/schemas/RouterId_1" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudRouterCommandSearchRequest" + }, + "examples": { + "SearchByState": { + "$ref": "#/components/examples/SearchByStateRequest" + } + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Fabric Cloud Router Packages", + "description": "Successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PackageResponse" + "$ref": "#/components/schemas/CloudRouterCommandSearchResponse" }, "examples": { - "Example": { - "$ref": "#/components/examples/ListFCRPackagesResponse" + "searchCommandsExample": { + "$ref": "#/components/examples/SearchResponse" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400_invalid_sorting_commands" + } + } + } + } + }, + "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_commands" + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/404_commands" + } + } + } + } + }, + "415": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/415_commands" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/500_commands" + } + } + } + } + } + } + } + }, + "/fabric/v4/routers/{routerId}/commands/{commandId}": { + "get": { + "tags": [ + "Cloud Routers" + ], + "summary": "Get Command", + "description": "This API provides capability to fetch command using command Id", + "operationId": "getCloudRouterCommand", + "parameters": [ + { + "name": "routerId", + "in": "path", + "description": "Router UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/RouterId_1" + } + }, + { + "name": "commandId", + "in": "path", + "description": "Command UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/CommandId" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudRouterCommand" + }, + "examples": { + "getCommandExample": { + "$ref": "#/components/examples/GetResponsePingCommand" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400_invalid_operation_commands" + } + } + } + } + }, + "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_commands" + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/404_commands" + } + } + } + } + }, + "415": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/415_commands" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/500_commands" + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "Cloud Routers" + ], + "summary": "Delete Command", + "description": "This API provides capability to delete command based on command Id", + "operationId": "deleteCloudRouterCommandByUuid", + "parameters": [ + { + "name": "routerId", + "in": "path", + "description": "Router UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/RouterId_1" + } + }, + { + "name": "commandId", + "in": "path", + "description": "Command UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/CommandId" + } + } + ], + "responses": { + "204": { + "description": "Deleted command successfully" + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400_invalid_state_commands" + } + } + } + } + }, + "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_commands" + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/404_commands" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/500_commands" + } + } + } + } + } + } + } + }, + "/fabric/v4/routers/{routerId}/routes/search": { + "post": { + "tags": [ + "Cloud Routers" + ], + "summary": "Search Route Table", + "description": "The API provides capability to get list of user's Fabric Cloud Router route table entries using search criteria, including optional filtering, pagination and sorting", + "operationId": "searchCloudRouterRoutes", + "parameters": [ + { + "name": "routerId", + "in": "path", + "description": "Router UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/RouterId_1" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RouteTableEntrySearchRequest" + }, + "examples": { + "SearchFilterByNextHop": { + "$ref": "#/components/examples/SearchFilterByNextHop" + }, + "SearchFilterByPrefix": { + "$ref": "#/components/examples/SearchFilterByPrefix" + }, + "SearchFilterByType": { + "$ref": "#/components/examples/SearchFilterByType" + }, + "SearchFilterByStatus": { + "$ref": "#/components/examples/SearchFilterByStatus" + }, + "SearchFilterOrAnd": { + "$ref": "#/components/examples/SearchFilterOrAnd" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RouteTableEntrySearchResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400_invalid_sorting" + } + } + } + } + }, + "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": "Internal server error", + "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/routers/{routerId}/validate": { + "post": { + "tags": [ + "Routing Protocols" + ], + "summary": "Validate Subnet", + "description": "This API provides capability to validate all subnets associated with any connection in the given FCR", + "operationId": "validateRoutingProtocol", + "parameters": [ + { + "name": "routerId", + "in": "path", + "description": "Cloud Router UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/RouterId" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateRequest" + }, + "examples": { + "ValidateDirectIpv4": { + "$ref": "#/components/examples/Request-direct-ipv4" + }, + "ValidateDirectIpv6": { + "$ref": "#/components/examples/Request-direct-ipv6" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateSubnetResponse" + }, + "examples": { + "ValidateSubnet": { + "$ref": "#/components/examples/Response-200" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "Bad Request": { + "$ref": "#/components/examples/error-400" + }, + "Subnet Overlapping": { + "$ref": "#/components/examples/error-400-overlappingSubnet" + } + } + } + } + } + } + } + }, + "/fabric/v4/routers/search": { + "post": { + "tags": [ + "Cloud Routers" + ], + "summary": "Search Routers", + "description": "The API provides capability to get list of user's Cloud Routers using search criteria, including optional filtering, pagination and sorting", + "operationId": "searchCloudRouters", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudRouterSearchRequest" + }, + "examples": { + "SearchFilterByStatus": { + "$ref": "#/components/examples/SearchFilterByStatus" + }, + "SearchFilterByNameAndMetroName": { + "$ref": "#/components/examples/SearchFilterByNameAndMetroName" + }, + "SearchFilterOrAnd": { + "$ref": "#/components/examples/SearchFilterOrAnd" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResponse" + }, + "examples": { + "Example": { + "$ref": "#/components/examples/search-example" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400_invalid_sorting" + } + } + } + } + }, + "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/routerPackages": { + "get": { + "tags": [ + "Cloud Routers" + ], + "summary": "List Packages", + "description": "This API provides capability to retrieve user's Cloud Routers Packages", + "operationId": "getCloudRouterPackages", + "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": "Fabric Cloud Router Packages", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PackageResponse" + }, + "examples": { + "Example": { + "$ref": "#/components/examples/ListFCRPackagesResponse" } } } @@ -13912,14 +14997,41 @@ "$ref": "#/components/schemas/NetworkPostRequest" }, "examples": { - "CreateGlobalNetwork": { - "$ref": "#/components/examples/CreateGlobalNetwork" + "Create-Global-EVPLAN-Network": { + "$ref": "#/components/examples/Create-Global-EVPLAN-Network" + }, + "Create-Regional-EVPLAN-Network": { + "$ref": "#/components/examples/Create-Regional-EVPLAN-Network" + }, + "Create-Local-EVPLAN-Network": { + "$ref": "#/components/examples/Create-Local-EVPLAN-Network" + }, + "Create-Global-EPLAN-Network": { + "$ref": "#/components/examples/Create-Global-EPLAN-Network" + }, + "Create-Regional-EPLAN-Network": { + "$ref": "#/components/examples/Create-Regional-EPLAN-Network" }, - "CreateRegionalNetwork": { - "$ref": "#/components/examples/CreateRegionalNetwork" + "Create-Local-EPLAN-Network": { + "$ref": "#/components/examples/Create-Local-EPLAN-Network" }, - "CreateLocalNetwork": { - "$ref": "#/components/examples/CreateLocalNetwork" + "Create-Global-EVPTREE-Network": { + "$ref": "#/components/examples/Create-Global-EVPTREE-Network" + }, + "Create-Regional-EVPTREE-Network": { + "$ref": "#/components/examples/Create-Regional-EVPTREE-Network" + }, + "Create-Local-EVPTREE-Network": { + "$ref": "#/components/examples/Create-Local-EVPTREE-Network" + }, + "Create-Global-EPTREE-Network": { + "$ref": "#/components/examples/Create-Global-EPTREE-Network" + }, + "Create-Regional-EPTREE-Network": { + "$ref": "#/components/examples/Create-Regional-EPTREE-Network" + }, + "Create-Local-EPTREE-Network": { + "$ref": "#/components/examples/Create-Local-EPTREE-Network" }, "NetworkDryRunCreate": { "$ref": "#/components/examples/CreateNetworkDryRunResponse" @@ -13930,7 +15042,7 @@ "required": true }, "responses": { - "200": { + "201": { "description": "Successful operation", "content": { "application/json": { @@ -13938,6 +15050,42 @@ "$ref": "#/components/schemas/Network" }, "examples": { + "EVPLAN-Global-Network": { + "$ref": "#/components/examples/Create-Global-EVPLAN-Network-Response" + }, + "EVPLAN-Regional-Network": { + "$ref": "#/components/examples/Create-Regional-EVPLAN-Network-Response" + }, + "EVPLAN-Local-Network": { + "$ref": "#/components/examples/Create-Local-EVPLAN-Network-Response" + }, + "EPLAN-Global-Network": { + "$ref": "#/components/examples/Create-Global-EPLAN-Network-Response" + }, + "EPLAN-Regional-Network": { + "$ref": "#/components/examples/Create-Regional-EPLAN-Network-Response" + }, + "EPLAN-Local-Network": { + "$ref": "#/components/examples/Create-Local-EPLAN-Network-Response" + }, + "EVPTREE-Global-Network": { + "$ref": "#/components/examples/Create-Global-EVPTREE-Network-Response" + }, + "EVPTREE-Regional-Network": { + "$ref": "#/components/examples/Create-Regional-EVPTREE-Network-Response" + }, + "EVPTREE-Local-Network": { + "$ref": "#/components/examples/Create-Local-EVPTREE-Network-Response" + }, + "EPTREE-Global-Network": { + "$ref": "#/components/examples/Create-Global-EPTREE-Network-Response" + }, + "EPTREE-Regional-Network": { + "$ref": "#/components/examples/Create-Regional-EPTREE-Network-Response" + }, + "EPTREE-Local-Network": { + "$ref": "#/components/examples/Create-Local-EPTREE-Network-Response" + }, "networkDryRun": { "$ref": "#/components/examples/CreateNetworkDryRunResponse" } @@ -17005,7 +18153,7 @@ "description": "asset UUID", "required": true, "schema": { - "$ref": "#/components/schemas/AssetId" + "$ref": "#/components/schemas/AssetId_1" } }, { @@ -17129,7 +18277,7 @@ "description": "asset UUID", "required": true, "schema": { - "$ref": "#/components/schemas/AssetId" + "$ref": "#/components/schemas/AssetId_1" } }, { @@ -17283,7 +18431,7 @@ "description": "asset UUID", "required": true, "schema": { - "$ref": "#/components/schemas/AssetId" + "$ref": "#/components/schemas/AssetId_1" } }, { @@ -18647,6 +19795,191 @@ }, "components": { "schemas": { + "CloudEventAssetType": { + "type": "string", + "enum": [ + "ports", + "connections", + "routers" + ] + }, + "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" + }, + "Offset": { + "type": "integer", + "description": "Pagination offset", + "example": 0, + "default": 0 + }, + "Limit": { + "type": "integer", + "description": "Pagination limit", + "example": 20, + "default": 20 + }, + "GetCloudEventsByAssetResponse": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/Pagination" + }, + "data": { + "type": "array", + "description": "Data returned from the API call.", + "items": { + "$ref": "#/components/schemas/CloudEvent" + } + } + } + }, + "ErrorList": { + "type": "array", + "description": "List of Error Message", + "items": { + "$ref": "#/components/schemas/Error" + } + }, + "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" + }, + "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" + }, + "equinixproject": { + "type": "string", + "description": "Equinix project identifier", + "format": "uuid" + }, + "authtype": { + "type": "string", + "description": "Cloud Event auth type" + }, + "authid": { + "type": "string", + "description": "Cloud Event user identifier" + }, + "data": { + "$ref": "#/components/schemas/CloudEventData" + } + }, + "description": "Cloud Event object" + }, + "CloudEventSearchRequest": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/components/schemas/CloudEventFilters" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationRequest" + }, + "sort": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CloudEventFilters" + } + } + }, + "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:\n * `/subject` - Cloud Event subject description\n * `/type` - Cloud Event type\n * `/time` - Time of Cloud Events\n", + "example": "/subject" + }, + "operator": { + "type": "string", + "description": "Possible operators to use on filters:\n * `=` - equal\n * `>` - greater than\n * `>=` - greater than or equal to\n * `<` - less than\n * `<=` - less than or equal to\n * `BETWEEN` - between\n * `IN` - in\n", + "example": "=" + }, + "values": { + "type": "array", + "items": { + "type": "string", + "example": "equinix.fabric.port.status.*" + } + } + } + }, "ConnectionPostRequest": { "required": [ "aSide", @@ -18809,13 +20142,6 @@ }, "description": "Connection specification" }, - "ErrorList": { - "type": "array", - "description": "List of Error Message", - "items": { - "$ref": "#/components/schemas/Error" - } - }, "ConnectionId": { "type": "string", "description": "Connection UUID", @@ -19575,18 +20901,6 @@ "description": "Port UUID", "format": "uuid" }, - "startDateTime": { - "type": "string", - "description": "startDateTime", - "format": "date-time", - "example": "2020-11-06T07:00:00Z" - }, - "endDateTime": { - "type": "string", - "description": "endDateTime", - "format": "date-time", - "example": "2020-11-06T07:00:00Z" - }, "Statistics": { "type": "object", "properties": { @@ -20123,7 +21437,6 @@ "CustomField": { "required": [ "dataType", - "description", "isRequired", "label" ], @@ -20984,6 +22297,9 @@ "account": { "$ref": "#/components/schemas/SimplifiedAccount" }, + "change": { + "$ref": "#/components/schemas/PortChange" + }, "changeLog": { "$ref": "#/components/schemas/Changelog" }, @@ -22352,6 +23668,13 @@ "description": "Create Route Aggregation Rule POST request" }, "CloudRouterPostRequest": { + "required": [ + "location", + "name", + "notification", + "package", + "type" + ], "type": "object", "properties": { "type": { @@ -22659,6 +23982,219 @@ "format": "uuid", "example": "457400f8-d360-11e9-bb65-2a2ae2dbcced" }, + "GetAllCloudRouterCommands": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/Pagination" + }, + "data": { + "type": "array", + "items": { + "$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/CloudRouterCommandRequest" + } + }, + "description": "Execute Cloud Router Command Request" + }, + "CloudRouterCommand": { + "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" + }, + "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/CloudRouterCommandRequest" + }, + "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/CloudRouterCommandSearchFilters" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationRequest" + }, + "sort": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CloudRouterCommandSearchSortCriteria" + } + } + }, + "description": "Search requests containing criteria" + }, + "CloudRouterCommandSearchFilters": { + "type": "object", + "properties": { + "and": { + "maxItems": 8, + "type": "array", + "items": { + "$ref": "#/components/schemas/CloudRouterCommandSearchFilter" + } + } + } + }, + "CloudRouterCommandSearchFilter": { + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/CloudRouterCommandSearchExpression" + }, + { + "$ref": "#/components/schemas/CloudRouterCommandSearchOrFilter" + } + ] + }, + "CloudRouterCommandSearchExpression": { + "type": "object", + "properties": { + "property": { + "type": "string", + "description": "Possible field names to use on filters:\n * `/type` - type of command\n * `/name` - name of command\n * `/state` - state of command\n * `/request/destination` - destination of command request\n * `/request/sourceConnection/uuid` - source connection uuid\n * `/*` - all-category search\n", + "example": "/state" + }, + "operator": { + "type": "string", + "description": "Possible operators to use on filters:\n * `=` - equal\n * `!=` - not equal\n * `>` - greater than\n * `>=` - greater than or equal to\n * `<` - less than\n * `<=` - less than or equal to\n * `[NOT] BETWEEN` - (not) between\n * `[NOT] LIKE` - (not) like\n * `[NOT] IN` - (not) in\n * `~*` - case-insensitive like\n", + "example": "=" + }, + "values": { + "type": "array", + "items": { + "type": "string", + "example": "PING_COMMAND" + } + } + } + }, + "CloudRouterCommandSearchOrFilter": { + "type": "object", + "properties": { + "or": { + "maxItems": 3, + "type": "array", + "items": { + "$ref": "#/components/schemas/CloudRouterCommandSearchExpression" + } + } + } + }, + "CloudRouterCommandSearchSortCriteria": { + "type": "object", + "properties": { + "direction": { + "$ref": "#/components/schemas/CloudRouterCommandSearchSortDirection" + }, + "property": { + "$ref": "#/components/schemas/CloudRouterCommandSearchSortBy" + } + } + }, + "CloudRouterCommandSearchSortDirection": { + "type": "string", + "description": "Sorting direction", + "default": "DESC", + "enum": [ + "DESC", + "ASC" + ] + }, + "CloudRouterCommandSearchSortBy": { + "type": "string", + "description": "Possible field names to use on sorting", + "default": "/changeLog/updatedDateTime", + "enum": [ + "/changeLog/createdDateTime", + "/changeLog/updatedDateTime", + "/name", + "/type" + ] + }, + "CloudRouterCommandSearchResponse": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/Pagination" + }, + "data": { + "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": { @@ -23528,7 +25064,7 @@ ] }, "package": { - "$ref": "#/components/schemas/precisionTimePackageResponse" + "$ref": "#/components/schemas/precisionTimePackagePostResponse" }, "connections": { "maxItems": 2, @@ -24247,7 +25783,7 @@ } } }, - "AssetId": { + "AssetId_1": { "type": "string", "description": "Stream Asset UUID", "format": "uuid", @@ -24360,9 +25896,6 @@ "description": "Stream subscription enabled status", "example": true }, - "filters": { - "$ref": "#/components/schemas/StreamSubscriptionFilter" - }, "metricSelector": { "$ref": "#/components/schemas/StreamSubscriptionSelector" }, @@ -24375,63 +25908,6 @@ }, "description": "Create Stream Subscription" }, - "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": { - "type": "object", - "properties": { - "property": { - "type": "string", - "description": "Possible field names to use on filters:\n * `/subject` - subject\n * `/type` - type\n", - "example": "/type" - }, - "operator": { - "type": "string", - "description": "Possible operators to use on filters:\n * `=` - equal\n * `in` - in\n * `LIKE` - case-sensitive like\n * `ILIKE` - case-insensitive like\n", - "example": "=" - }, - "values": { - "type": "array", - "description": "### Supported event or metric names to use on filters with property /type:\n * `*` - all events or metrics\n * `equinix.fabric.port.*` - port events or metrics\n * `equinix.fabric.connection.*` - connection events or metrics\n * `equinix.fabric.router.*` - cloud router events\n * `equinix.fabric.metro.*` - metro metrics\n * `equinix.fabric.network.*` - network events\n * `equinix.fabric.service_token.*` - service token events\n * `equinix.network_edge.*` - network edge events\n * `equinix.network_edge.acl.*` - network edge acl events\n * `equinix.network_edge.device.*` - network edge device events\n * `equinix.access_manager.*` - identity access manager events\n * `equinix.access_manager.user.role.*` - identity access manager user role events\n### Supported event or metric names to use on filters with property /subject:\n * `*` - all events or metrics\n * `/fabric/v4/ports/` - port events or metrics\n * `/fabric/v4/connections/` - connection events or metrics\n * `/fabric/v4/routers/` - cloud router events\n * `/fabric/v4/metros/` - metro metrics\n * `/fabric/v4/networks/` - network events\n * `/fabric/v4/tokens/` - service token events\n * `/ne/v1/acl/` - network edge acl events\n * `/ne/v1/devices/` - network edge device events\n * `/am/v2/users//roleAssignments/` - identity access manager events\n", - "items": { - "type": "string" - } - } - } - }, - "StreamFilterOrFilter": { - "type": "object", - "properties": { - "or": { - "maxItems": 3, - "type": "array", - "items": { - "$ref": "#/components/schemas/StreamFilterSimpleExpression" - } - } - } - }, "StreamSubscriptionSelector": { "type": "object", "properties": { @@ -24563,11 +26039,6 @@ "metricUri": { "type": "string", "description": "metric uri" - }, - "transformAlerts": { - "type": "boolean", - "description": "transform alerts", - "example": true } }, "description": "Stream subscription sink settings" @@ -24619,9 +26090,6 @@ "type": "boolean", "description": "Stream subscription enabled status" }, - "filters": { - "$ref": "#/components/schemas/StreamSubscriptionFilter" - }, "metricSelector": { "$ref": "#/components/schemas/StreamSubscriptionSelector" }, @@ -24633,6 +26101,10 @@ }, "changeLog": { "$ref": "#/components/schemas/Changelog" + }, + "lastErrorMessage": { + "type": "string", + "description": "HTTP response from sink type if error occurred" } }, "description": "Stream Subscription object" @@ -24902,6 +26374,125 @@ }, "description": "Create Stream Alert Rules" }, + "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" + }, + "CloudEventData": { + "type": "object", + "properties": { + "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", + "description": "Cloud Event asset type" + }, + "name": { + "type": "string", + "description": "Cloud Event asset name" + }, + "state": { + "type": "string", + "description": "Cloud Event asset state" + } + } + }, + "AuthContext": { + "type": "object", + "properties": { + "authtype": { + "type": "string", + "description": "Cloud Event auth type", + "enum": [ + "system", + "user" + ] + }, + "authid": { + "type": "string", + "description": "Cloud Event auth identifier", + "enum": [ + "equinix", + "userId" + ] + }, + "name": { + "type": "string", + "description": "Cloud Event username" + }, + "email": { + "type": "string", + "description": "Cloud Event email" + } + } + }, + "PaginationRequest": { + "type": "object", + "properties": { + "offset": { + "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" + }, "ConnectionType": { "type": "string", "description": "Connection type", @@ -25332,38 +26923,6 @@ }, "description": "Change log" }, - "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" - }, "ConnectionChangeOperation": { "required": [ "op", @@ -25421,24 +26980,6 @@ }, "description": "Connection acceptance data" }, - "PaginationRequest": { - "type": "object", - "properties": { - "offset": { - "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" - }, "ConnectionRouteTableEntry": { "required": [ "changeLog", @@ -26132,7 +27673,8 @@ "description": "Type of Port", "enum": [ "XF_PORT", - "IX_PORT" + "IX_PORT", + "IA_PORT" ] }, "PortState": { @@ -26141,6 +27683,7 @@ "enum": [ "PENDING", "PROVISIONING", + "REPROVISIONING", "PROVISIONED", "ACTIVE", "DEPROVISIONING", @@ -26222,6 +27765,53 @@ }, "description": "Operational specifications for ports." }, + "PortChange": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "Uniquely identifies a change" + }, + "type": { + "type": "string", + "description": "Type of change", + "enum": [ + "PORT_CREATION", + "PORT_UPDATE", + "PORT_DELETION" + ] + }, + "status": { + "type": "string", + "description": "Current outcome of the change flow", + "enum": [ + "COMPLETED", + "FAILED", + "REQUESTED" + ] + }, + "information": { + "type": "string", + "description": "Additional information" + }, + "data": { + "$ref": "#/components/schemas/PortChangeOperation" + }, + "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" + } + }, + "description": "Current state of latest port change" + }, "PortDevice": { "type": "object", "properties": { @@ -27259,6 +28849,80 @@ }, "description": "Operation object for router actions" }, + "CloudRouterCommandType": { + "type": "string", + "description": "Fabric Cloud Router Command Type", + "example": "PING_COMMAND", + "enum": [ + "PING_COMMAND" + ] + }, + "CloudRouterCommandRequest": { + "required": [ + "destination" + ], + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "Fabric Cloud Router Ping Command Destination", + "example": "8.8.8.8" + }, + "sourceConnection": { + "$ref": "#/components/schemas/CloudRouterCommandRequestConnection" + }, + "timeout": { + "type": "integer", + "description": "Fabric Cloud Router Ping Command Timeout", + "example": 5 + }, + "dataBytes": { + "maximum": 9000, + "minimum": 16, + "type": "integer", + "description": "Fabric Cloud Router Ping Command DataBytes", + "example": 100, + "default": 64 + }, + "interval": { + "type": "integer", + "description": "Time in milliseconds between sending each packet", + "readOnly": true, + "example": 1000, + "default": 1000 + }, + "count": { + "type": "integer", + "description": "Total number of ping requests", + "readOnly": true, + "example": 5, + "default": 5 + } + }, + "description": "Fabric Cloud Router Command Request" + }, + "CloudRouterCommandState": { + "type": "string", + "description": "Fabric Cloud Router Command State", + "example": "SUCCEEDED", + "enum": [ + "PENDING", + "SUCCEEDED", + "FAILED", + "DELETED" + ] + }, + "CloudRouterCommandResponse": { + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "outputStructuredPing": { + "$ref": "#/components/schemas/OutputStructuredPing" + } + } + }, "RouteTableEntry": { "required": [ "changeLog", @@ -27387,7 +29051,9 @@ "enum": [ "EVPLAN", "EPLAN", - "IPWAN" + "IPWAN", + "EVPTREE", + "EPTREE" ] }, "NetworkScope": { @@ -27734,14 +29400,35 @@ }, "description": "Precision Time Order" }, - "virtualConnectionTimeServiceResponse": { - "title": "fabricConnectionResponse", + "precisionTimePackagePostResponse": { + "title": "precisionTimePackagePostResponse", "required": [ - "href", - "type", - "uuid" + "code" ], "type": "object", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "code": { + "type": "string", + "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", @@ -27804,6 +29491,63 @@ } } }, + "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": { + "type": "object", + "properties": { + "property": { + "type": "string", + "description": "Possible field names to use on filters:\n * `/subject` - subject\n * `/type` - type\n", + "example": "/type" + }, + "operator": { + "type": "string", + "description": "Possible operators to use on filters:\n * `=` - equal\n * `in` - in\n * `LIKE` - case-sensitive like\n * `ILIKE` - case-insensitive like\n", + "example": "=" + }, + "values": { + "type": "array", + "description": "### Supported event or metric names to use on filters with property /type:\n * `*` - all events or metrics\n * `equinix.fabric.port.*` - port events or metrics\n * `equinix.fabric.connection.*` - connection events or metrics\n * `equinix.fabric.router.*` - cloud router events\n * `equinix.fabric.metro.*` - metro metrics\n * `equinix.fabric.network.*` - network events\n * `equinix.fabric.service_token.*` - service token events\n * `equinix.network_edge.*` - network edge events\n * `equinix.network_edge.acl.*` - network edge acl events\n * `equinix.network_edge.device.*` - network edge device events\n * `equinix.access_manager.*` - identity access manager events\n * `equinix.access_manager.user.role.*` - identity access manager user role events\n### Supported event or metric names to use on filters with property /subject:\n * `*` - all events or metrics\n * `/fabric/v4/ports/` - port events or metrics\n * `/fabric/v4/connections/` - connection events or metrics\n * `/fabric/v4/routers/` - cloud router events\n * `/fabric/v4/metros/` - metro metrics\n * `/fabric/v4/networks/` - network events\n * `/fabric/v4/tokens/` - service token events\n * `/ne/v1/acl/` - network edge acl events\n * `/ne/v1/devices/` - network edge device events\n * `/am/v2/users//roleAssignments/` - identity access manager events\n", + "items": { + "type": "string" + } + } + } + }, + "StreamFilterOrFilter": { + "type": "object", + "properties": { + "or": { + "maxItems": 3, + "type": "array", + "items": { + "$ref": "#/components/schemas/StreamFilterSimpleExpression" + } + } + } + }, "ConnectionPriority": { "type": "string", "description": "Connection priority in redundancy group", @@ -28324,6 +30068,73 @@ }, "description": "Service Token details of Link Protocol" }, + "CloudRouterCommandRequestConnection": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "Connection UUID", + "example": "557400f8-d360-11e9-bb65-2a2ae2dbcce4" + } + }, + "description": "Connection object for Cloud Router Command" + }, + "OutputStructuredPing": { + "type": "object", + "properties": { + "destinationIp": { + "type": "string", + "example": "8.8.8.8" + }, + "destinationName": { + "type": "string", + "example": "8.8.8.8" + }, + "dataBytes": { + "type": "integer", + "example": 100 + }, + "packetsTransmitted": { + "type": "integer", + "example": 4 + }, + "packetsReceived": { + "type": "integer", + "example": 4 + }, + "packetsLossPercent": { + "type": "number", + "format": "float", + "example": 0 + }, + "rttMin": { + "type": "number", + "format": "float", + "example": 9.271 + }, + "rttAvg": { + "type": "number", + "format": "float", + "example": 15.483 + }, + "rttMax": { + "type": "number", + "format": "float", + "example": 26.771 + }, + "rttStdDev": { + "type": "number", + "format": "float", + "example": 7.039 + }, + "responses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OutputStructuredPingResponseItem" + } + } + } + }, "RouteTableEntryState": { "type": "string", "description": "Route table entry state", @@ -28924,6 +30735,32 @@ }, "description": "List of criteria for selecting network access points with optimal efficiency, security, compatibility, and availability." }, + "OutputStructuredPingResponseItem": { + "type": "object", + "properties": { + "bytes": { + "type": "integer", + "example": 100 + }, + "ip": { + "type": "string", + "example": "8.8.8.8" + }, + "icmpSeq": { + "type": "integer", + "example": 0 + }, + "ttl": { + "type": "integer", + "example": 117 + }, + "time": { + "type": "number", + "format": "float", + "example": 9.839 + } + } + }, "LinkProtocolType": { "type": "string", "description": "Type of Link Protocol", @@ -29688,18 +31525,20 @@ "403": { "value": [ { - "errorCode": "EQ-3142402", - "errorMessage": "Do not have create connection permission on this port", - "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec" + "errorCode": "EQ-3040047", + "errorMessage": "Operation not allowed", + "correlationId": "c82ff3bc-de07-47e5-b3ec-53a009d01515", + "details": "Operation not allowed for current user" } ] }, "404": { "value": [ { - "errorCode": "EQ-3000036", - "errorMessage": "Requested path doesn't exists", - "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec" + "errorCode": "EQ-3040020", + "errorMessage": "uuid not found", + "correlationId": "c82ff3bc-de07-47e5-b3ec-53a009d01515", + "details": "uuid not found" } ] }, @@ -29731,16 +31570,174 @@ "500": { "value": [ { - "errorCode": "EQ-3034003", - "errorMessage": "Method not supported,Please check the URL passed", + "errorCode": "EQ-3040030", + "errorMessage": "Internal Server Error", "correlationId": "c82ff3bc-de07-47e5-b3ec-53a009d01515", - "additionalInfo": [ + "details": "Internal Server Error" + } + ] + }, + "get-cloud-events-by-asset-id": { + "value": { + "pagination": { + "offset": 20, + "limit": 10, + "total": 3, + "next": null, + "previous": null + }, + "data": [ + { + "specversion": "1.0", + "source": "https://api.equinix.com/fabric/v4/events", + "id": "66c62c1a-f186-4fbd-9792-71a60705518f", + "time": "2025-03-20T13:13:12Z", + "type": "equinix.fabric.connection.bgpipv4_session_status.connect", + "subject": "/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9/routingProtocol/e92cdf09-59eb-4131-ade4-49a87dc816dc", + "dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json", + "datacontenttype": "application/json", + "severitynumber": 5, + "severitytext": "INFO", + "equinixproject": "dadd3ab6-c0af-430c-8216-43d44f08c1c5", + "authtype": "system", + "authid": "equinix", + "data": { + "message": "Neighbor 100.100.100.102 address session state changed to Connect", + "auth": { + "type": "system", + "id": "equinix" + } + } + }, + { + "specversion": "1.0", + "source": "https://api.equinix.com/fabric/v4/cloudevents", + "id": "66c62c1a-f186-4fbd-9792-71a60705518f", + "type": "equinix.fabric.connection.state.provisioning", + "subject": "/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "time": "2025-03-20T13:13:12Z", + "dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json", + "datacontenttype": "application/json", + "severitynumber": 9, + "severitytext": "INFO", + "equinixproject": "dadd3ab6-c0af-430c-8216-43d44f08c1c5", + "authtype": "user", + "authid": 123456, + "data": { + "message": "Connection named TEST-CONNECTION state changed to provisioning", + "resource": { + "href": "http://api.corp.equinix.com/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "uuid": "dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "type": "IP_VC", + "name": "TEST-CONNECTION", + "state": "PROVISIONING" + }, + "auth": { + "type": "user", + "id": 123456, + "name": "test user", + "email": "testuser@test.com" + } + } + }, + { + "specversion": "1.0", + "source": "https://api.equinix.com/fabric/v4/cloudevents", + "id": "66c62c1a-f186-4fbd-9792-71a60705518f", + "type": "equinix.fabric.connection.state.provisioned", + "subject": "/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "time": "2025-03-20T13:13:12Z", + "dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json", + "datacontenttype": "application/json", + "severitynumber": 9, + "severitytext": "INFO", + "equinixproject": "dadd3ab6-c0af-430c-8216-43d44f08c1c5", + "authtype": "system", + "authid": "equinix", + "data": { + "message": "Connection named TEST-CONNECTION state changed to provisioned", + "resource": { + "href": "http://api.corp.equinix.com/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "uuid": "dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "type": "IP_VC", + "name": "TEST-CONNECTION", + "state": "PROVISIONED" + }, + "auth": { + "type": "system", + "id": "equinix" + } + } + } + ] + } + }, + "get-cloud-event": { + "value": { + "specversion": "1.0", + "source": "https://api.equinix.com/fabric/v4/cloudevents", + "id": "66c62c1a-f186-4fbd-9792-71a60705518f", + "type": "equinix.fabric.connection.state.provisioning", + "subject": "/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "time": "2025-03-20T13:13:12Z", + "dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json", + "datacontenttype": "application/json", + "severitynumber": 9, + "severitytext": "INFO", + "equinixproject": "dadd3ab6-c0af-430c-8216-43d44f08c1c5", + "authtype": "user", + "authid": 123456, + "data": { + "message": "Connection named TEST-CONNECTION state changed to provisioning", + "resource": { + "href": "http://api.corp.equinix.com/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "uuid": "dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "type": "IP_VC", + "name": "TEST-CONNECTION", + "state": "PROVISIONING" + }, + "auth": { + "type": "user", + "id": 123456, + "name": "test user", + "email": "testuser@test.com" + } + } + } + }, + "search-cloud-events": { + "value": { + "filter": { + "and": [ + { + "property": "/type", + "operator": "IN", + "values": [ + "equinix.fabric.port.status.*" + ] + }, + { + "property": "/subject", + "operator": "IN", + "values": [ + "/fabric/v4/ports/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d*", + "/fabric/v4/ports/c8bba3be-5132-4669-bb47-7f1a8811359b*" + ] + }, { - "reason": "method:PATCH" + "property": "/time", + "operator": ">", + "values": [ + "2018-04-05T17:31:00.000Z" + ] } ] + }, + "pagination": { + "offset": 0, + "limit": 20 } - ] + } }, "COLO2COLOwithDot1q-Dot1q": { "value": { @@ -33520,7 +35517,7 @@ ] } }, - "ConnectionExample": { + "ConnectionCreateResponse": { "value": { "href": "https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62", "type": "EVPL_VC", @@ -33561,8 +35558,8 @@ } }, "operation": { - "providerStatus": "AVAILABLE", - "equinixStatus": "PROVISIONED" + "providerStatus": "PROVISIONING", + "equinixStatus": "PROVISIONING" }, "changeLog": { "createdDateTime": "2020-05-21T10:30:00Z" @@ -34245,8 +36242,8 @@ } }, "operation": { - "equinixStatus": "PROVISIONING", - "providerStatus": "PROVISIONING" + "equinixStatus": "PENDING_INTERFACE_CONFIGURATION", + "providerStatus": "NOT_AVAILABLE" }, "notifications": [ { @@ -38186,6 +40183,74 @@ } ] }, + "ConnectionPatchResponseDryRun": { + "value": { + "href": "https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62", + "type": "EVPL_VC", + "uuid": "3a58dd05-f46d-4b1d-a154-2e85c396ea62", + "name": "My-Layer2-Connection-2", + "bandwidth": 1000, + "direction": "OUTGOING", + "isRemote": true, + "redundancy": { + "group": "66c10a60-789e-4b25-b85c-7eb225a4c344", + "priority": "PRIMARY" + }, + "aSide": { + "accessPoint": { + "type": "COLO", + "port": { + "href": "https://api.equinix.com/fabric/v4/ports/a00cef6f-8e35-4794-9ff9-665e084e4e6d", + "uuid": "a00cef6f-8e35-4794-9ff9-665e084e4e6d" + }, + "linkProtocol": { + "type": "DOT1Q", + "vlanTag": 1001 + } + } + }, + "zSide": { + "accessPoint": { + "type": "SP", + "profile": { + "href": "https://api.equinix.com/fabric/v4/serviceProfiles/22d4e853-ef33-4ff0-b5b2-a2b1d5dfa50c", + "uuid": "22d4e853-ef33-4ff0-b5b2-a2b1d5dfa50c", + "type": "L2_PROFILE" + }, + "location": { + "metroHref": "https://api.equinix.com/fabric/v4/metros/MX", + "metroCode": "MX" + }, + "linkProtocol": { + "type": "DOT1Q", + "vlanTag": 1001 + } + } + }, + "operation": { + "providerStatus": "PROVISIONED", + "equinixStatus": "PROVISIONED" + }, + "change": { + "type": "CONNECTION_UPDATE", + "status": "APPROVED", + "createdDateTime": "2021-12-12T06:00:01.183Z", + "data": { + "op": "replace", + "path": "/aSide/accessPoint/port/uuid", + "value": "c791f8cb-58f9-8f90-8ce0-306a5c00a4ee" + } + }, + "changeLog": { + "createdDateTime": "2020-04-21T10:30:00Z" + }, + "account": { + "accountNumber": 270001, + "orgId": 91997, + "globalOrgId": "3453453cccc" + } + } + }, "ConnectionPatchResponse": { "value": { "href": "https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62", @@ -38608,11 +40673,11 @@ "RoutingProtocolCreateBGPResponse": { "value": { "href": "https://api.equinix.com/fabric/v4/connections/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170/routingProtocols/557400f8-d360-11e9-bb65-2a2ae2dbcce4", - "uuid": "c9b8e7a2-f3b1-4576-a4a9-1366a63df170", + "uuid": "557400f8-d360-11e9-bb65-2a2ae2dbcce4", "state": "PROVISIONING", "change": { - "uuid": "3c9b8e7a2-f3b1-4576-a4a9-1366a63df170", "href": "https://api.equinix.com/fabric/v4/connections/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170/routingProtocols/557400f8-d360-11e9-bb65-2a2ae2dbcce4/changes/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170", + "uuid": "3c9b8e7a2-f3b1-4576-a4a9-1366a63df170", "type": "ROUTING_PROTOCOL_CREATION" }, "changelog": { @@ -43453,6 +45518,55 @@ } } }, + "getServiceToken-DryRun": { + "value": { + "href": "https://api.equinix.com/fabric/v4/serviceTokens/ea40918e-9b39-4045-8be8-0beaa7eb5ce1", + "type": "VC_TOKEN", + "uuid": "ea40918e-9b39-4045-8be8-0beaa7eb5ce1", + "name": "My-Token", + "state": "INACTIVE", + "expiryDateTime": "2020-05-31T10:30:00Z", + "connection": { + "type": "EVPL_VC", + "bandwidthLimit": 100, + "allowRemoteConnection": false, + "allowCustomBandwidth": false, + "aSide": { + "accessPointSelectors": [ + { + "type": "COLO", + "port": { + "href": "http://api.equinix.com/fabric/v4/ports/b840a1db-5758-758f-97e0-328a5c00a874", + "type": "XF_PORT", + "uuid": "b840a1db-5758-758f-97e0-328a5c00a874" + }, + "linkProtocol": { + "type": "QINQ", + "vlanCTag": 1399, + "vlanSTag": 1388 + } + } + ] + } + }, + "account": { + "orgId": 111437 + }, + "notifications": [ + { + "type": "NOTIFICATION", + "emails": [ + "user1@example.com", + "user2@example.com" + ] + } + ], + "changeLog": { + "createdBy": 843577, + "createdDateTime": "2020-05-21T10:30:00Z" + } + } + }, "400_UUID": { "value": [ { @@ -48616,6 +50730,384 @@ } ] }, + "GetAllPingCommandResponse": { + "value": { + "pagination": { + "offset": 20, + "limit": 20, + "total": 100, + "next": "/search?offset=40&limit=20", + "previous": "/search?offset=0&limit=20" + }, + "data": { + "href": "https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00", + "type": "PING_COMMAND", + "uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00", + "name": "ping-test-1", + "description": "Testing FCR-SV-1", + "state": "SUCCEEDED", + "project": { + "projectId": "b11d4cb5-978a-418a-8b13-bf19abb97938" + }, + "request": { + "destination": "8.8.8.8", + "sourceConnection": { + "uuid": "1da3778c-6aa3-4e47-b2fe-83a0773dde18" + }, + "timeout": 5, + "dataBytes": 100, + "count": 5, + "interval": 1000 + }, + "response": { + "output": "PING 8.8.8.8 (8.8.8.8): 100 data bytes\n108 bytes from 8.8.8.8: icmp_seq=0 ttl=117 time=9.839 ms\n108 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=16.051 ms\n108 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=9.271 ms\n108 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=26.771 ms \n--- 8.8.8.8 ping statistics ---\n4 packets transmitted, 4 packets received, 0.0% packet loss\nround-trip min/avg/max/stddev = 9.271/15.483/26.771/7.039 ms", + "outputStructuredPing": { + "destinationIp": "8.8.8.8", + "destinationName": "8.8.8.8", + "dataBytes": 100, + "packetsTransmitted": 4, + "packetsReceived": 4, + "packetsLossPercent": 0, + "rttMin": 9.271, + "rttAvg": 15.483, + "rttMax": 26.771, + "rttStdDev": 7.039, + "responses": [ + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 0, + "ttl": 117, + "time": 9.839 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 1, + "ttl": 117, + "time": 16.051 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 2, + "ttl": 117, + "time": 9.271 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 3, + "ttl": 117, + "time": 26.771 + } + ] + } + }, + "changeLog": { + "createdBy": "testuser", + "createdDateTime": "2020-05-21T10:30:00Z" + } + } + } + }, + "400_invalid_operation_commands": { + "value": [ + { + "errorCode": "EQ-3043002", + "errorMessage": "Invalid argument passed", + "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec", + "details": "Invalid argument passed" + } + ] + }, + "403_commands": { + "value": [ + { + "errorCode": "EQ-3043006", + "errorMessage": "The system is unable to process your request.", + "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec", + "details": "The system is unable to process your request." + } + ] + }, + "404_commands": { + "value": [ + { + "errorCode": "EQ-3043022", + "errorMessage": "Cloud router command not found", + "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec", + "details": "Cloud router command not found" + } + ] + }, + "415_commands": { + "value": [ + { + "errorCode": "EQ-3043029", + "errorMessage": "Unsupported media type", + "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec", + "details": "Content type application/json not supported." + } + ] + }, + "500_commands": { + "value": [ + { + "errorCode": "EQ-3043005", + "errorMessage": "Internal server error", + "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec", + "details": "Internal server error" + } + ] + }, + "PostRequestPingCommand": { + "value": { + "type": "PING_COMMAND", + "name": "ping-test-1", + "description": "Testing FCR-SV-1", + "project": { + "projectId": "b11d4cb5-978a-418a-8b13-bf19abb97938" + }, + "request": { + "destination": "8.8.8.8", + "sourceConnection": { + "uuid": "1da3778c-6aa3-4e47-b2fe-83a0773dde18" + }, + "timeout": 2, + "dataBytes": 100 + } + } + }, + "PostResponsePingCommand": { + "value": { + "href": "https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00", + "type": "PING_COMMAND", + "uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00", + "name": "ping-test-1", + "description": "Testing FCR-SV-1", + "state": "PENDING", + "project": { + "projectId": "b11d4cb5-978a-418a-8b13-bf19abb97938" + }, + "request": { + "destination": "8.8.8.8", + "sourceConnection": { + "uuid": "1da3778c-6aa3-4e47-b2fe-83a0773dde18" + }, + "timeout": 2, + "dataBytes": 100, + "count": 5, + "interval": 1000 + }, + "changeLog": { + "createdBy": "testuser", + "createdDateTime": "2020-05-21T10:30:00Z" + } + } + }, + "SearchByStateRequest": { + "value": { + "filter": { + "and": [ + { + "property": "/state", + "operator": "=", + "values": [ + "SUCCEEDED" + ] + } + ] + }, + "pagination": { + "offset": 0, + "limit": 20 + }, + "sort": [ + { + "direction": "DESC", + "property": "/changeLog/createdDateTime" + } + ] + } + }, + "SearchResponse": { + "value": { + "pagination": { + "offset": 20, + "limit": 20, + "total": 100, + "next": "/search?offset=40&limit=20", + "previous": "/search?offset=0&limit=20" + }, + "data": { + "href": "https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00", + "type": "PING_COMMAND", + "uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00", + "name": "ping-test-1", + "description": "Testing FCR-SV-1", + "state": "SUCCEEDED", + "project": { + "projectId": "b11d4cb5-978a-418a-8b13-bf19abb97938" + }, + "request": { + "destination": "8.8.8.8", + "sourceConnection": { + "uuid": "1da3778c-6aa3-4e47-b2fe-83a0773dde18" + }, + "timeout": 2, + "dataBytes": 100, + "count": 5, + "interval": 1000 + }, + "response": { + "output": "PING 8.8.8.8 (8.8.8.8): 100 data bytes\n108 bytes from 8.8.8.8: icmp_seq=0 ttl=117 time=9.839 ms\n108 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=16.051 ms\n108 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=9.271 ms\n108 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=26.771 ms \n--- 8.8.8.8 ping statistics ---\n4 packets transmitted, 4 packets received, 0.0% packet loss\nround-trip min/avg/max/stddev = 9.271/15.483/26.771/7.039 ms", + "outputStructuredPing": { + "destinationIp": "8.8.8.8", + "destinationName": "8.8.8.8", + "dataBytes": 100, + "packetsTransmitted": 4, + "packetsReceived": 4, + "packetsLossPercent": 0, + "rttMin": 9.271, + "rttAvg": 15.483, + "rttMax": 26.771, + "rttStdDev": 7.039, + "responses": [ + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 0, + "ttl": 117, + "time": 9.839 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 1, + "ttl": 117, + "time": 16.051 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 2, + "ttl": 117, + "time": 9.271 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 3, + "ttl": 117, + "time": 26.771 + } + ] + } + }, + "changeLog": { + "createdBy": "testuser", + "createdDateTime": "2020-05-21T10:30:00Z" + } + } + } + }, + "400_invalid_sorting_commands": { + "value": [ + { + "errorCode": "EQ-3043015", + "errorMessage": "Invalid value for sorting direction.", + "correlationId": "c82ff3bc-de07-47e5-b3ec-53a009d01515", + "additionalInfo": [ + { + "reason": "Only accept DESC and ASC for sorting direction." + } + ] + } + ] + }, + "GetResponsePingCommand": { + "value": { + "href": "https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00", + "type": "PING_COMMAND", + "uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00", + "name": "ping-test-1", + "description": "Testing FCR-SV-1", + "state": "SUCCEEDED", + "project": { + "projectId": "b11d4cb5-978a-418a-8b13-bf19abb97938" + }, + "request": { + "destination": "8.8.8.8", + "sourceConnection": { + "uuid": "1da3778c-6aa3-4e47-b2fe-83a0773dde18" + }, + "timeout": 2, + "dataBytes": 100, + "count": 5, + "interval": 1000 + }, + "response": { + "output": "PING 8.8.8.8 (8.8.8.8): 100 data bytes\n108 bytes from 8.8.8.8: icmp_seq=0 ttl=117 time=9.839 ms\n108 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=16.051 ms\n108 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=9.271 ms\n108 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=26.771 ms \n--- 8.8.8.8 ping statistics ---\n4 packets transmitted, 4 packets received, 0.0% packet loss\nround-trip min/avg/max/stddev = 9.271/15.483/26.771/7.039 ms", + "outputStructuredPing": { + "destinationIp": "8.8.8.8", + "destinationName": "8.8.8.8", + "dataBytes": 100, + "packetsTransmitted": 4, + "packetsReceived": 4, + "packetsLossPercent": 0, + "rttMin": 9.271, + "rttAvg": 15.483, + "rttMax": 26.771, + "rttStdDev": 7.039, + "responses": [ + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 0, + "ttl": 117, + "time": 9.839 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 1, + "ttl": 117, + "time": 16.051 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 2, + "ttl": 117, + "time": 9.271 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 3, + "ttl": 117, + "time": 26.771 + } + ] + } + }, + "changeLog": { + "createdBy": "testuser", + "createdDateTime": "2020-05-21T10:30:00Z" + } + } + }, + "400_invalid_state_commands": { + "value": [ + { + "errorCode": "EQ-3043023", + "errorMessage": "Cannot delete Command in pending state", + "correlationId": "c82ff3bc-de07-47e5-b3ec-53a009d01515", + "details": "Cannot delete Fabric Cloud Router in transient state." + } + ] + }, "SearchFilterByNextHop": { "value": { "filter": { @@ -49921,13 +52413,13 @@ ] } }, - "CreateGlobalNetwork": { + "Create-Global-EVPLAN-Network": { "value": { "type": "EVPLAN", "name": "My-Network-1", "scope": "GLOBAL", "project": { - "projectId": "1234567" + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" }, "notifications": [ { @@ -49939,7 +52431,7 @@ ] } }, - "CreateRegionalNetwork": { + "Create-Regional-EVPLAN-Network": { "value": { "type": "EVPLAN", "name": "My-Network-1", @@ -49948,7 +52440,7 @@ "region": "EMEA" }, "project": { - "projectId": "1234567" + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" }, "notifications": [ { @@ -49960,13 +52452,184 @@ ] } }, - "CreateLocalNetwork": { + "Create-Local-EVPLAN-Network": { "value": { "type": "EVPLAN", "name": "My-Network-1", "scope": "LOCAL", "project": { - "projectId": "1234567" + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Global-EPLAN-Network": { + "value": { + "type": "EPLAN", + "name": "My-EPLAN-Network-1", + "scope": "GLOBAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Regional-EPLAN-Network": { + "value": { + "type": "EPLAN", + "name": "My-EPLAN-Network-1", + "scope": "REGIONAL", + "location": { + "region": "EMEA" + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Local-EPLAN-Network": { + "value": { + "type": "EPLAN", + "name": "My-EPLAN-Network-1", + "scope": "LOCAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Global-EVPTREE-Network": { + "value": { + "type": "EVPTREE", + "name": "My-EVPTREE-Network-1", + "scope": "GLOBAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Regional-EVPTREE-Network": { + "value": { + "type": "EVPTREE", + "name": "My-EVPTREE-Network-1", + "scope": "REGIONAL", + "location": { + "region": "AMER" + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Local-EVPTREE-Network": { + "value": { + "type": "EVPTREE", + "name": "My-EVPTREE-Network-1", + "scope": "LOCAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Global-EPTREE-Network": { + "value": { + "type": "EPTREE", + "name": "My-EPTREE-Network-1", + "scope": "GLOBAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Regional-EPTREE-Network": { + "value": { + "type": "EPTREE", + "name": "My-EPTREE-Network-1", + "scope": "REGIONAL", + "location": { + "region": "AMER" + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Local-EPTREE-Network": { + "value": { + "type": "EPTREE", + "name": "My-EPTREE-Network-1", + "scope": "LOCAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" }, "notifications": [ { @@ -49996,6 +52659,594 @@ ] } }, + "Create-Global-EVPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0633e83f-116f-481d-b86f-c472271d1a8c", + "uuid": "0633e83f-116f-481d-b86f-c472271d1a8c", + "type": "EVPLAN", + "name": "My-evplan-network-1", + "scope": "GLOBAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0633e83f-116f-481d-b86f-c472271d1a8c/changes/ce7c0bbc-7bd2-431f-903f-de796ea9e858", + "uuid": "ce7c0bbc-7bd2-431f-903f-de796ea9e858", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T19:37:29.326Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0633e83f-116f-481d-b86f-c472271d1a8c/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Regional-EVPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef", + "uuid": "884254b7-237d-44f7-af0f-84ba324350ef", + "type": "EVPLAN", + "name": "My-evplan-network-1", + "scope": "REGIONAL", + "location": { + "region": "AMER" + }, + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/changes/741c0927-d9ed-405b-a4f2-cb61d0dda2c5", + "uuid": "741c0927-d9ed-405b-a4f2-cb61d0dda2c5", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T19:21:43.145Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Local-EVPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/726af704-0b1b-46dc-9efc-00fc938084b3", + "uuid": "726af704-0b1b-46dc-9efc-00fc938084b3", + "type": "EVPLAN", + "name": "My-evplan-network-1", + "scope": "LOCAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/726af704-0b1b-46dc-9efc-00fc938084b3/changes/92e2f236-e77d-4818-bbad-cff6b716a610", + "uuid": "92e2f236-e77d-4818-bbad-cff6b716a610", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T19:43:20.145Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/726af704-0b1b-46dc-9efc-00fc938084b3/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Global-EPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0d51722e-b080-4943-92ab-9720eaab2cfa", + "uuid": "0d51722e-b080-4943-92ab-9720eaab2cfa", + "type": "EPLAN", + "name": "My-eplan-network-1", + "scope": "GLOBAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0d51722e-b080-4943-92ab-9720eaab2cfa/changes/e4f9c57f-a1d6-4520-9a31-fddbe69ed592", + "uuid": "e4f9c57f-a1d6-4520-9a31-fddbe69ed592", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T20:52:23.469Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0d51722e-b080-4943-92ab-9720eaab2cfa/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Regional-EPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef", + "uuid": "884254b7-237d-44f7-af0f-84ba324350ef", + "type": "EVPLAN", + "name": "My-evplan-network-1", + "scope": "REGIONAL", + "location": { + "region": "AMER" + }, + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/changes/741c0927-d9ed-405b-a4f2-cb61d0dda2c5", + "uuid": "741c0927-d9ed-405b-a4f2-cb61d0dda2c5", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T19:21:43.145Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Local-EPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/82402fc0-cb55-4a21-b0b3-1af89f63742b", + "uuid": "82402fc0-cb55-4a21-b0b3-1af89f63742b", + "type": "EPLAN", + "name": "My-eplan-network-1", + "scope": "LOCAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/82402fc0-cb55-4a21-b0b3-1af89f63742b/changes/1449105b-7576-4094-aa34-216f3f9ed122", + "uuid": "1449105b-7576-4094-aa34-216f3f9ed122", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T20:55:57.858Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/82402fc0-cb55-4a21-b0b3-1af89f63742b/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Global-EVPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/07659346-9489-42cf-891a-683624e801d5", + "uuid": "07659346-9489-42cf-891a-683624e801d5", + "type": "EVPTREE", + "name": "My-evptree-network-1", + "scope": "GLOBAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/07659346-9489-42cf-891a-683624e801d5/changes/1caf3efb-7427-4be1-8100-73fcff471654", + "uuid": "1caf3efb-7427-4be1-8100-73fcff471654", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.comm", + "createdDateTime": "2025-03-05T21:17:46.656Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/07659346-9489-42cf-891a-683624e801d5/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, + "Create-Regional-EVPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0ec08139-bae5-44c4-bea2-970b14d7c7c0", + "uuid": "0ec08139-bae5-44c4-bea2-970b14d7c7c0", + "type": "EVPTREE", + "name": "My-evptree-network-1", + "scope": "REGIONAL", + "location": { + "region": "AMER" + }, + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0ec08139-bae5-44c4-bea2-970b14d7c7c0/changes/0e159ddd-47d2-4fa3-97fe-502f8a70ea0e", + "uuid": "0e159ddd-47d2-4fa3-97fe-502f8a70ea0e", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.com", + "createdDateTime": "2025-03-05T20:57:07.206Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0ec08139-bae5-44c4-bea2-970b14d7c7c0/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, + "Create-Local-EVPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/4622cce8-114b-4432-94f4-060fda044ae3", + "uuid": "4622cce8-114b-4432-94f4-060fda044ae3", + "type": "EVPTREE", + "name": "My-evptree-network-1", + "scope": "LOCAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/4622cce8-114b-4432-94f4-060fda044ae3/changes/6eacff89-a363-402f-ae15-84294177a866", + "uuid": "6eacff89-a363-402f-ae15-84294177a866", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.com", + "createdDateTime": "2025-03-05T21:22:30.984Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/4622cce8-114b-4432-94f4-060fda044ae3/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, + "Create-Global-EPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/16ee541c-9e93-428b-9557-3f99907aa21c", + "uuid": "16ee541c-9e93-428b-9557-3f99907aa21c", + "type": "EPTREE", + "name": "My-eptree-network-1", + "scope": "GLOBAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/16ee541c-9e93-428b-9557-3f99907aa21c/changes/2f541dcd-c25b-43a1-97fa-8b2be6817899", + "uuid": "2f541dcd-c25b-43a1-97fa-8b2be6817899", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.com", + "createdDateTime": "2025-03-05T21:37:08.370Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/16ee541c-9e93-428b-9557-3f99907aa21c/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, + "Create-Regional-EPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/291fc758-91d3-482b-a9b3-3430685c390e", + "uuid": "291fc758-91d3-482b-a9b3-3430685c390e", + "type": "EPTREE", + "name": "My-eptree-network-1", + "scope": "REGIONAL", + "location": { + "region": "EMEA" + }, + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/291fc758-91d3-482b-a9b3-3430685c390e/changes/8345324b-97cc-4c5c-9f15-40bc82b254ad", + "uuid": "8345324b-97cc-4c5c-9f15-40bc82b254ad", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.com", + "createdDateTime": "2025-03-06T00:23:29.030Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/291fc758-91d3-482b-a9b3-3430685c390e/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, + "Create-Local-EPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/c929924e-5d87-46b2-a82f-91a145c1803d", + "uuid": "c929924e-5d87-46b2-a82f-91a145c1803d", + "type": "EPTREE", + "name": "My-eptree-network-1", + "scope": "LOCAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/c929924e-5d87-46b2-a82f-91a145c1803d/changes/1b32bacb-5898-4efd-9404-b64ec825c652", + "uuid": "1b32bacb-5898-4efd-9404-b64ec825c652", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.com", + "createdDateTime": "2025-03-06T00:30:42.972Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/c929924e-5d87-46b2-a82f-91a145c1803d/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, "NetworkPostResponseExample": { "value": { "href": "https://api.equinix.com/fabric/v4/networks/92dc376a-a932-43aa-a6a2-c806dedbd784", @@ -52582,24 +55833,6 @@ "name": "splunk", "description": "subscription 1", "state": "PROVISIONED", - "filters": { - "and": [ - { - "property": "/subject", - "operator": "LIKE", - "values": [ - "%/fabric/v4/connections/36276e58-b5a1-4864-ab5e-be10dff9eac1%" - ] - }, - { - "property": "/type", - "operator": "IN", - "values": [ - "equinix.fabric.connection.state.provisioned" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52651,17 +55884,6 @@ "name": "splunk1", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52693,17 +55915,6 @@ "name": "slack1", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52726,17 +55937,6 @@ "name": "pagerduty", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52755,7 +55955,6 @@ "integrationKey": "my-integration-key" }, "settings": { - "transformAlerts": true, "changeUri": "https://events.pagerduty.com/v2/change/enqueeue", "alertUri": "https://events.pagerduty.com/v2/enqueeue" } @@ -52768,17 +55967,6 @@ "name": "datadog", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52806,17 +55994,6 @@ "name": "teams1", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52839,17 +56016,6 @@ "name": "servicenow-1", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "eventSelector": { "include": [ "equinix.fabric.connection.*" @@ -52878,17 +56044,6 @@ "description": "stream dec 1", "state": "PROVISIONED", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52925,17 +56080,6 @@ "name": "splunk1", "description": "subscription 1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52973,17 +56117,6 @@ "description": "stream dec 1", "state": "DEPROVISIONING", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" diff --git a/spec/oas3.fabric.patched.json b/spec/oas3.fabric.patched.json index bbe2efee..7668b665 100644 --- a/spec/oas3.fabric.patched.json +++ b/spec/oas3.fabric.patched.json @@ -12,7 +12,7 @@ "name": "Equinix Inc", "url": "https://developer.equinix.com/agreement" }, - "version": "4.20" + "version": "4.21" }, "externalDocs": { "description": "Find more information on Equinix Developer Portal", @@ -30,6 +30,10 @@ } ], "tags": [ + { + "name": "Cloud Events", + "description": "Cloud Events" + }, { "name": "Cloud Routers", "description": "Cloud Routers" @@ -88,18 +92,362 @@ }, { "name": "Stream Alert Rules", - "description": "Stream Subscriptions Beta" + "description": "Stream Subscriptions" }, { "name": "Stream Subscriptions", - "description": "Stream Subscriptions Beta" + "description": "Stream Subscriptions" }, { "name": "Streams", - "description": "Streams Beta" + "description": "Streams" } ], "paths": { + "/fabric/v4/{asset}/{assetId}/cloudevents": { + "get": { + "tags": [ + "Cloud Events" + ], + "summary": "Get Cloud Events by Asset Id", + "description": "This API provides capability to retrieve cloud events of an asset id", + "operationId": "getCloudEventByAssetId", + "parameters": [ + { + "name": "asset", + "in": "path", + "description": "asset", + "required": true, + "schema": { + "$ref": "#/components/schemas/CloudEventAssetType" + } + }, + { + "name": "assetId", + "in": "path", + "description": "asset UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/AssetId" + } + }, + { + "name": "fromDateTime", + "in": "query", + "description": "Start date and time", + "required": false, + "schema": { + "$ref": "#/components/schemas/StartDateTime" + } + }, + { + "name": "toDateTime", + "in": "query", + "description": "End date and time", + "required": false, + "schema": { + "$ref": "#/components/schemas/EndDateTime" + } + }, + { + "name": "offset", + "in": "query", + "description": "offset", + "required": false, + "schema": { + "$ref": "#/components/schemas/Offset" + } + }, + { + "name": "limit", + "in": "query", + "description": "limit", + "required": false, + "schema": { + "$ref": "#/components/schemas/Limit" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCloudEventsByAssetResponse" + }, + "examples": { + "Example": { + "$ref": "#/components/examples/get-cloud-events-by-asset-id" + } + } + } + } + }, + "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/cloudevents/{cloudEventId}": { + "get": { + "tags": [ + "Cloud Events" + ], + "summary": "Get Cloud Event", + "description": "This API provides capability to retrieve a cloud event by uuid", + "operationId": "getCloudEvent", + "parameters": [ + { + "name": "cloudEventId", + "in": "path", + "description": "Cloud Event UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/CloudEventId" + } + } + ], + "responses": { + "200": { + "description": "Cloud Event object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudEvent" + }, + "examples": { + "CloudEventResponseExample": { + "$ref": "#/components/examples/get-cloud-event" + } + } + } + } + }, + "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/cloudevents/search": { + "post": { + "tags": [ + "Cloud Events" + ], + "summary": "Search Cloud Events", + "description": "This API provides capability to search cloud events from a filtered query", + "operationId": "searchCloudEvents", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudEventSearchRequest" + }, + "examples": { + "CloudEventSearchRequestExample": { + "$ref": "#/components/examples/search-cloud-events" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCloudEventsByAssetResponse" + }, + "examples": { + "Example": { + "$ref": "#/components/examples/get-cloud-events-by-asset-id" + } + } + } + } + }, + "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/connections": { "post": { "tags": [ @@ -418,7 +766,7 @@ }, "examples": { "Colo2Sp": { - "$ref": "#/components/examples/ConnectionExample" + "$ref": "#/components/examples/ConnectionCreateResponse" }, "Colo2Sp-Google": { "$ref": "#/components/examples/COLO2GoogleSPwithDot1q-Response" @@ -846,6 +1194,16 @@ "schema": { "$ref": "#/components/schemas/ConnectionId" } + }, + { + "name": "dryRun", + "in": "query", + "description": "option to verify that API calls will succeed", + "required": false, + "schema": { + "type": "boolean", + "default": false + } } ], "requestBody": { @@ -872,6 +1230,9 @@ }, "ConnectionMigrationAsideRequestForVirtualDevice": { "$ref": "#/components/examples/ConnectionMigrationAsideVirtualDeviceRequest" + }, + "ConnectionUpdateBandwidthRequestDryRun": { + "$ref": "#/components/examples/ConnectionUpdateBandwidthRequest" } } } @@ -879,6 +1240,21 @@ "required": true }, "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + }, + "examples": { + "connectionPatchExampleDryRun": { + "$ref": "#/components/examples/ConnectionPatchResponseDryRun" + } + } + } + } + }, "202": { "description": "Successful operation", "content": { @@ -902,6 +1278,24 @@ } } }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400" + }, + "dryRun": { + "$ref": "#/components/examples/400_dry_run" + } + } + } + } + }, "401": { "description": "Unauthorized", "content": { @@ -3532,7 +3926,7 @@ "description": "startDateTime", "required": true, "schema": { - "$ref": "#/components/schemas/startDateTime" + "$ref": "#/components/schemas/StartDateTime" }, "example": "2020-11-06T07:00:00Z" }, @@ -3542,7 +3936,7 @@ "description": "endDateTime", "required": true, "schema": { - "$ref": "#/components/schemas/endDateTime" + "$ref": "#/components/schemas/EndDateTime" }, "example": "2020-11-10T07:00:00Z" } @@ -3635,7 +4029,7 @@ "description": "startDateTime", "required": true, "schema": { - "$ref": "#/components/schemas/startDateTime" + "$ref": "#/components/schemas/StartDateTime" }, "example": "2020-11-06T07:00:00Z" }, @@ -3645,7 +4039,7 @@ "description": "endDateTime", "required": true, "schema": { - "$ref": "#/components/schemas/endDateTime" + "$ref": "#/components/schemas/EndDateTime" }, "example": "2020-11-10T07:00:00Z" }, @@ -4747,6 +5141,9 @@ }, "tokenNetworkExample": { "$ref": "#/components/examples/getServiceToken-Network" + }, + "tokenDryRunExample": { + "$ref": "#/components/examples/getServiceToken-DryRun" } } } @@ -4762,6 +5159,9 @@ "examples": { "example": { "$ref": "#/components/examples/400_UUID" + }, + "dryRunExample": { + "$ref": "#/components/examples/400_dry_run" } } } @@ -4834,6 +5234,9 @@ }, "tokenNetworkExample": { "$ref": "#/components/examples/getServiceToken-Network" + }, + "tokenDryRunExample": { + "$ref": "#/components/examples/getServiceToken-DryRun" } } } @@ -4849,6 +5252,9 @@ "examples": { "example": { "$ref": "#/components/examples/400_UUID" + }, + "dryRunExample": { + "$ref": "#/components/examples/400_dry_run" } } } @@ -4902,6 +5308,16 @@ "schema": { "$ref": "#/components/schemas/ServiceTokenUUID" } + }, + { + "name": "dryRun", + "in": "query", + "description": "option to verify that API calls will succeed", + "required": false, + "schema": { + "type": "boolean", + "default": false + } } ], "requestBody": { @@ -4928,6 +5344,12 @@ }, "UpdateZsideTokenBandwidth": { "$ref": "#/components/examples/UpdateZsideTokenBandwidth" + }, + "UpdateAsideTokenBandwidthDryRun": { + "$ref": "#/components/examples/UpdateAsideTokenBandwidth" + }, + "UpdateZsideTokenBandwidthDryRun": { + "$ref": "#/components/examples/UpdateZsideTokenBandwidth" } } } @@ -4951,6 +5373,9 @@ }, "tokenNetworkExample": { "$ref": "#/components/examples/getServiceToken-Network" + }, + "tokenDryRunExample": { + "$ref": "#/components/examples/getServiceToken-DryRun" } } } @@ -4966,6 +5391,9 @@ "examples": { "example": { "$ref": "#/components/examples/400_UUID" + }, + "dryRunExample": { + "$ref": "#/components/examples/400_dry_run" } } } @@ -13168,14 +13596,14 @@ } } }, - "/fabric/v4/routers/{routerId}/routes/search": { - "post": { + "/fabric/v4/routers/{routerId}/commands": { + "get": { "tags": [ "Cloud Routers" ], - "summary": "Search Route Table", - "description": "The API provides capability to get list of user's Fabric Cloud Router route table entries using search criteria, including optional filtering, pagination and sorting", - "operationId": "searchCloudRouterRoutes", + "summary": "Get Commands", + "description": "This API provides capability to fetch all commands", + "operationId": "getAllCloudRouterCommands", "parameters": [ { "name": "routerId", @@ -13187,40 +13615,18 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RouteTableEntrySearchRequest" - }, - "examples": { - "SearchFilterByNextHop": { - "$ref": "#/components/examples/SearchFilterByNextHop" - }, - "SearchFilterByPrefix": { - "$ref": "#/components/examples/SearchFilterByPrefix" - }, - "SearchFilterByType": { - "$ref": "#/components/examples/SearchFilterByType" - }, - "SearchFilterByStatus": { - "$ref": "#/components/examples/SearchFilterByStatus" - }, - "SearchFilterOrAnd": { - "$ref": "#/components/examples/SearchFilterOrAnd" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RouteTableEntrySearchResponse" + "$ref": "#/components/schemas/GetAllCloudRouterCommands" + }, + "examples": { + "getAllCommandsExample": { + "$ref": "#/components/examples/GetAllPingCommandResponse" + } } } } @@ -13234,7 +13640,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/400_invalid_sorting" + "$ref": "#/components/examples/400_invalid_operation_commands" } } } @@ -13264,7 +13670,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/403" + "$ref": "#/components/examples/403_commands" } } } @@ -13279,7 +13685,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/404" + "$ref": "#/components/examples/404_commands" } } } @@ -13294,7 +13700,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/415" + "$ref": "#/components/examples/415_commands" } } } @@ -13309,31 +13715,29 @@ }, "examples": { "example": { - "$ref": "#/components/examples/500" + "$ref": "#/components/examples/500_commands" } } } } } } - } - }, - "/fabric/v4/routers/{routerId}/validate": { + }, "post": { "tags": [ - "Routing Protocols" + "Cloud Routers" ], - "summary": "Validate Subnet", - "description": "This API provides capability to validate all subnets associated with any connection in the given FCR", - "operationId": "validateRoutingProtocol", + "summary": "Initiate Command", + "description": "This API provides capability to initiate Command", + "operationId": "createCloudRouterCommand", "parameters": [ { "name": "routerId", "in": "path", - "description": "Cloud Router UUID", + "description": "Router UUID", "required": true, "schema": { - "$ref": "#/components/schemas/RouterId" + "$ref": "#/components/schemas/RouterId_1" } } ], @@ -13341,14 +13745,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidateRequest" + "$ref": "#/components/schemas/CloudRouterCommandPostRequest" }, "examples": { - "ValidateDirectIpv4": { - "$ref": "#/components/examples/Request-direct-ipv4" - }, - "ValidateDirectIpv6": { - "$ref": "#/components/examples/Request-direct-ipv6" + "InitiatePingCommand": { + "$ref": "#/components/examples/PostRequestPingCommand" } } } @@ -13356,16 +13757,16 @@ "required": true }, "responses": { - "200": { + "202": { "description": "Successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidateSubnetResponse" + "$ref": "#/components/schemas/CloudRouterCommand" }, "examples": { - "ValidateSubnet": { - "$ref": "#/components/examples/Response-200" + "initiateCommandsExample": { + "$ref": "#/components/examples/PostResponsePingCommand" } } } @@ -13379,67 +13780,15 @@ "$ref": "#/components/schemas/ErrorList" }, "examples": { - "Bad Request": { - "$ref": "#/components/examples/error-400" - }, - "Subnet Overlapping": { - "$ref": "#/components/examples/error-400-overlappingSubnet" - } - } - } - } - } - } - } - }, - "/fabric/v4/routers/search": { - "post": { - "tags": [ - "Cloud Routers" - ], - "summary": "Search Routers", - "description": "The API provides capability to get list of user's Cloud Routers using search criteria, including optional filtering, pagination and sorting", - "operationId": "searchCloudRouters", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CloudRouterSearchRequest" - }, - "examples": { - "SearchFilterByStatus": { - "$ref": "#/components/examples/SearchFilterByStatus" - }, - "SearchFilterByNameAndMetroName": { - "$ref": "#/components/examples/SearchFilterByNameAndMetroName" - }, - "SearchFilterOrAnd": { - "$ref": "#/components/examples/SearchFilterOrAnd" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchResponse" - }, - "examples": { - "Example": { - "$ref": "#/components/examples/search-example" + "example": { + "$ref": "#/components/examples/400_invalid_operation_commands" } } } } }, - "400": { - "description": "Bad request", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -13447,14 +13796,14 @@ }, "examples": { "example": { - "$ref": "#/components/examples/400_invalid_sorting" + "$ref": "#/components/examples/401" } } } } }, - "401": { - "description": "Unauthorized", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -13462,14 +13811,14 @@ }, "examples": { "example": { - "$ref": "#/components/examples/401" + "$ref": "#/components/examples/403_commands" } } } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -13477,14 +13826,14 @@ }, "examples": { "example": { - "$ref": "#/components/examples/403" + "$ref": "#/components/examples/404_commands" } } } } }, "415": { - "description": "Unsupported Media Type", + "description": "Internal server error", "content": { "application/json": { "schema": { @@ -13492,7 +13841,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/415" + "$ref": "#/components/examples/415_commands" } } } @@ -13507,7 +13856,7 @@ }, "examples": { "example": { - "$ref": "#/components/examples/500" + "$ref": "#/components/examples/500_commands" } } } @@ -13516,47 +13865,783 @@ } } }, - "/fabric/v4/routerPackages": { - "get": { + "/fabric/v4/routers/{routerId}/commands/search": { + "post": { "tags": [ "Cloud Routers" ], - "summary": "List Packages", - "description": "This API provides capability to retrieve user's Cloud Routers Packages", - "operationId": "getCloudRouterPackages", + "summary": "Search Commands", + "description": "This API provides capability to search commands", + "operationId": "searchCloudRouterCommands", "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, + "name": "routerId", + "in": "path", + "description": "Router UUID", + "required": true, "schema": { - "type": "integer" - }, - "example": 10 + "$ref": "#/components/schemas/RouterId_1" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudRouterCommandSearchRequest" + }, + "examples": { + "SearchByState": { + "$ref": "#/components/examples/SearchByStateRequest" + } + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Fabric Cloud Router Packages", + "description": "Successful operation", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PackageResponse" + "$ref": "#/components/schemas/CloudRouterCommandSearchResponse" }, "examples": { - "Example": { - "$ref": "#/components/examples/ListFCRPackagesResponse" + "searchCommandsExample": { + "$ref": "#/components/examples/SearchResponse" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400_invalid_sorting_commands" + } + } + } + } + }, + "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_commands" + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/404_commands" + } + } + } + } + }, + "415": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/415_commands" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/500_commands" + } + } + } + } + } + } + } + }, + "/fabric/v4/routers/{routerId}/commands/{commandId}": { + "get": { + "tags": [ + "Cloud Routers" + ], + "summary": "Get Command", + "description": "This API provides capability to fetch command using command Id", + "operationId": "getCloudRouterCommand", + "parameters": [ + { + "name": "routerId", + "in": "path", + "description": "Router UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/RouterId_1" + } + }, + { + "name": "commandId", + "in": "path", + "description": "Command UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/CommandId" + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudRouterCommand" + }, + "examples": { + "getCommandExample": { + "$ref": "#/components/examples/GetResponsePingCommand" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400_invalid_operation_commands" + } + } + } + } + }, + "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_commands" + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/404_commands" + } + } + } + } + }, + "415": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/415_commands" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/500_commands" + } + } + } + } + } + } + }, + "delete": { + "tags": [ + "Cloud Routers" + ], + "summary": "Delete Command", + "description": "This API provides capability to delete command based on command Id", + "operationId": "deleteCloudRouterCommandByUuid", + "parameters": [ + { + "name": "routerId", + "in": "path", + "description": "Router UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/RouterId_1" + } + }, + { + "name": "commandId", + "in": "path", + "description": "Command UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/CommandId" + } + } + ], + "responses": { + "204": { + "description": "Deleted command successfully" + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400_invalid_state_commands" + } + } + } + } + }, + "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_commands" + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/404_commands" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/500_commands" + } + } + } + } + } + } + } + }, + "/fabric/v4/routers/{routerId}/routes/search": { + "post": { + "tags": [ + "Cloud Routers" + ], + "summary": "Search Route Table", + "description": "The API provides capability to get list of user's Fabric Cloud Router route table entries using search criteria, including optional filtering, pagination and sorting", + "operationId": "searchCloudRouterRoutes", + "parameters": [ + { + "name": "routerId", + "in": "path", + "description": "Router UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/RouterId_1" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RouteTableEntrySearchRequest" + }, + "examples": { + "SearchFilterByNextHop": { + "$ref": "#/components/examples/SearchFilterByNextHop" + }, + "SearchFilterByPrefix": { + "$ref": "#/components/examples/SearchFilterByPrefix" + }, + "SearchFilterByType": { + "$ref": "#/components/examples/SearchFilterByType" + }, + "SearchFilterByStatus": { + "$ref": "#/components/examples/SearchFilterByStatus" + }, + "SearchFilterOrAnd": { + "$ref": "#/components/examples/SearchFilterOrAnd" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RouteTableEntrySearchResponse" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400_invalid_sorting" + } + } + } + } + }, + "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": "Internal server error", + "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/routers/{routerId}/validate": { + "post": { + "tags": [ + "Routing Protocols" + ], + "summary": "Validate Subnet", + "description": "This API provides capability to validate all subnets associated with any connection in the given FCR", + "operationId": "validateRoutingProtocol", + "parameters": [ + { + "name": "routerId", + "in": "path", + "description": "Cloud Router UUID", + "required": true, + "schema": { + "$ref": "#/components/schemas/RouterId" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateRequest" + }, + "examples": { + "ValidateDirectIpv4": { + "$ref": "#/components/examples/Request-direct-ipv4" + }, + "ValidateDirectIpv6": { + "$ref": "#/components/examples/Request-direct-ipv6" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateSubnetResponse" + }, + "examples": { + "ValidateSubnet": { + "$ref": "#/components/examples/Response-200" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "Bad Request": { + "$ref": "#/components/examples/error-400" + }, + "Subnet Overlapping": { + "$ref": "#/components/examples/error-400-overlappingSubnet" + } + } + } + } + } + } + } + }, + "/fabric/v4/routers/search": { + "post": { + "tags": [ + "Cloud Routers" + ], + "summary": "Search Routers", + "description": "The API provides capability to get list of user's Cloud Routers using search criteria, including optional filtering, pagination and sorting", + "operationId": "searchCloudRouters", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudRouterSearchRequest" + }, + "examples": { + "SearchFilterByStatus": { + "$ref": "#/components/examples/SearchFilterByStatus" + }, + "SearchFilterByNameAndMetroName": { + "$ref": "#/components/examples/SearchFilterByNameAndMetroName" + }, + "SearchFilterOrAnd": { + "$ref": "#/components/examples/SearchFilterOrAnd" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResponse" + }, + "examples": { + "Example": { + "$ref": "#/components/examples/search-example" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorList" + }, + "examples": { + "example": { + "$ref": "#/components/examples/400_invalid_sorting" + } + } + } + } + }, + "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/routerPackages": { + "get": { + "tags": [ + "Cloud Routers" + ], + "summary": "List Packages", + "description": "This API provides capability to retrieve user's Cloud Routers Packages", + "operationId": "getCloudRouterPackages", + "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": "Fabric Cloud Router Packages", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PackageResponse" + }, + "examples": { + "Example": { + "$ref": "#/components/examples/ListFCRPackagesResponse" } } } @@ -13912,14 +14997,41 @@ "$ref": "#/components/schemas/NetworkPostRequest" }, "examples": { - "CreateGlobalNetwork": { - "$ref": "#/components/examples/CreateGlobalNetwork" + "Create-Global-EVPLAN-Network": { + "$ref": "#/components/examples/Create-Global-EVPLAN-Network" + }, + "Create-Regional-EVPLAN-Network": { + "$ref": "#/components/examples/Create-Regional-EVPLAN-Network" + }, + "Create-Local-EVPLAN-Network": { + "$ref": "#/components/examples/Create-Local-EVPLAN-Network" + }, + "Create-Global-EPLAN-Network": { + "$ref": "#/components/examples/Create-Global-EPLAN-Network" + }, + "Create-Regional-EPLAN-Network": { + "$ref": "#/components/examples/Create-Regional-EPLAN-Network" }, - "CreateRegionalNetwork": { - "$ref": "#/components/examples/CreateRegionalNetwork" + "Create-Local-EPLAN-Network": { + "$ref": "#/components/examples/Create-Local-EPLAN-Network" }, - "CreateLocalNetwork": { - "$ref": "#/components/examples/CreateLocalNetwork" + "Create-Global-EVPTREE-Network": { + "$ref": "#/components/examples/Create-Global-EVPTREE-Network" + }, + "Create-Regional-EVPTREE-Network": { + "$ref": "#/components/examples/Create-Regional-EVPTREE-Network" + }, + "Create-Local-EVPTREE-Network": { + "$ref": "#/components/examples/Create-Local-EVPTREE-Network" + }, + "Create-Global-EPTREE-Network": { + "$ref": "#/components/examples/Create-Global-EPTREE-Network" + }, + "Create-Regional-EPTREE-Network": { + "$ref": "#/components/examples/Create-Regional-EPTREE-Network" + }, + "Create-Local-EPTREE-Network": { + "$ref": "#/components/examples/Create-Local-EPTREE-Network" }, "NetworkDryRunCreate": { "$ref": "#/components/examples/CreateNetworkDryRunResponse" @@ -13930,7 +15042,7 @@ "required": true }, "responses": { - "200": { + "201": { "description": "Successful operation", "content": { "application/json": { @@ -13938,6 +15050,42 @@ "$ref": "#/components/schemas/Network" }, "examples": { + "EVPLAN-Global-Network": { + "$ref": "#/components/examples/Create-Global-EVPLAN-Network-Response" + }, + "EVPLAN-Regional-Network": { + "$ref": "#/components/examples/Create-Regional-EVPLAN-Network-Response" + }, + "EVPLAN-Local-Network": { + "$ref": "#/components/examples/Create-Local-EVPLAN-Network-Response" + }, + "EPLAN-Global-Network": { + "$ref": "#/components/examples/Create-Global-EPLAN-Network-Response" + }, + "EPLAN-Regional-Network": { + "$ref": "#/components/examples/Create-Regional-EPLAN-Network-Response" + }, + "EPLAN-Local-Network": { + "$ref": "#/components/examples/Create-Local-EPLAN-Network-Response" + }, + "EVPTREE-Global-Network": { + "$ref": "#/components/examples/Create-Global-EVPTREE-Network-Response" + }, + "EVPTREE-Regional-Network": { + "$ref": "#/components/examples/Create-Regional-EVPTREE-Network-Response" + }, + "EVPTREE-Local-Network": { + "$ref": "#/components/examples/Create-Local-EVPTREE-Network-Response" + }, + "EPTREE-Global-Network": { + "$ref": "#/components/examples/Create-Global-EPTREE-Network-Response" + }, + "EPTREE-Regional-Network": { + "$ref": "#/components/examples/Create-Regional-EPTREE-Network-Response" + }, + "EPTREE-Local-Network": { + "$ref": "#/components/examples/Create-Local-EPTREE-Network-Response" + }, "networkDryRun": { "$ref": "#/components/examples/CreateNetworkDryRunResponse" } @@ -17005,7 +18153,7 @@ "description": "asset UUID", "required": true, "schema": { - "$ref": "#/components/schemas/AssetId" + "$ref": "#/components/schemas/AssetId_1" } }, { @@ -17129,7 +18277,7 @@ "description": "asset UUID", "required": true, "schema": { - "$ref": "#/components/schemas/AssetId" + "$ref": "#/components/schemas/AssetId_1" } }, { @@ -17283,7 +18431,7 @@ "description": "asset UUID", "required": true, "schema": { - "$ref": "#/components/schemas/AssetId" + "$ref": "#/components/schemas/AssetId_1" } }, { @@ -18647,6 +19795,191 @@ }, "components": { "schemas": { + "CloudEventAssetType": { + "type": "string", + "enum": [ + "ports", + "connections", + "routers" + ] + }, + "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" + }, + "Offset": { + "type": "integer", + "description": "Pagination offset", + "example": 0, + "default": 0 + }, + "Limit": { + "type": "integer", + "description": "Pagination limit", + "example": 20, + "default": 20 + }, + "GetCloudEventsByAssetResponse": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/Pagination" + }, + "data": { + "type": "array", + "description": "Data returned from the API call.", + "items": { + "$ref": "#/components/schemas/CloudEvent" + } + } + } + }, + "ErrorList": { + "type": "array", + "description": "List of Error Message", + "items": { + "$ref": "#/components/schemas/Error" + } + }, + "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" + }, + "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" + }, + "equinixproject": { + "type": "string", + "description": "Equinix project identifier", + "format": "uuid" + }, + "authtype": { + "type": "string", + "description": "Cloud Event auth type" + }, + "authid": { + "type": "string", + "description": "Cloud Event user identifier" + }, + "data": { + "$ref": "#/components/schemas/CloudEventData" + } + }, + "description": "Cloud Event object" + }, + "CloudEventSearchRequest": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/components/schemas/CloudEventFilters" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationRequest" + }, + "sort": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CloudEventFilters" + } + } + }, + "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:\n * `/subject` - Cloud Event subject description\n * `/type` - Cloud Event type\n * `/time` - Time of Cloud Events\n", + "example": "/subject" + }, + "operator": { + "type": "string", + "description": "Possible operators to use on filters:\n * `=` - equal\n * `>` - greater than\n * `>=` - greater than or equal to\n * `<` - less than\n * `<=` - less than or equal to\n * `BETWEEN` - between\n * `IN` - in\n", + "example": "=" + }, + "values": { + "type": "array", + "items": { + "type": "string", + "example": "equinix.fabric.port.status.*" + } + } + } + }, "ConnectionPostRequest": { "required": [ "aSide", @@ -18809,13 +20142,6 @@ }, "description": "Connection specification" }, - "ErrorList": { - "type": "array", - "description": "List of Error Message", - "items": { - "$ref": "#/components/schemas/Error" - } - }, "ConnectionId": { "type": "string", "description": "Connection UUID", @@ -19574,18 +20900,6 @@ "description": "Port UUID", "format": "uuid" }, - "startDateTime": { - "type": "string", - "description": "startDateTime", - "format": "date-time", - "example": "2020-11-06T07:00:00Z" - }, - "endDateTime": { - "type": "string", - "description": "endDateTime", - "format": "date-time", - "example": "2020-11-06T07:00:00Z" - }, "Statistics": { "type": "object", "properties": { @@ -20982,6 +22296,9 @@ "account": { "$ref": "#/components/schemas/SimplifiedAccount" }, + "change": { + "$ref": "#/components/schemas/PortChange" + }, "changeLog": { "$ref": "#/components/schemas/Changelog" }, @@ -22350,6 +23667,13 @@ "description": "Create Route Aggregation Rule POST request" }, "CloudRouterPostRequest": { + "required": [ + "location", + "name", + "notification", + "package", + "type" + ], "type": "object", "properties": { "type": { @@ -22657,6 +23981,219 @@ "format": "uuid", "example": "457400f8-d360-11e9-bb65-2a2ae2dbcced" }, + "GetAllCloudRouterCommands": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/Pagination" + }, + "data": { + "type": "array", + "items": { + "$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/CloudRouterCommandRequest" + } + }, + "description": "Execute Cloud Router Command Request" + }, + "CloudRouterCommand": { + "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" + }, + "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/CloudRouterCommandRequest" + }, + "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/CloudRouterCommandSearchFilters" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationRequest" + }, + "sort": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CloudRouterCommandSearchSortCriteria" + } + } + }, + "description": "Search requests containing criteria" + }, + "CloudRouterCommandSearchFilters": { + "type": "object", + "properties": { + "and": { + "maxItems": 8, + "type": "array", + "items": { + "$ref": "#/components/schemas/CloudRouterCommandSearchFilter" + } + } + } + }, + "CloudRouterCommandSearchFilter": { + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/CloudRouterCommandSearchExpression" + }, + { + "$ref": "#/components/schemas/CloudRouterCommandSearchOrFilter" + } + ] + }, + "CloudRouterCommandSearchExpression": { + "type": "object", + "properties": { + "property": { + "type": "string", + "description": "Possible field names to use on filters:\n * `/type` - type of command\n * `/name` - name of command\n * `/state` - state of command\n * `/request/destination` - destination of command request\n * `/request/sourceConnection/uuid` - source connection uuid\n * `/*` - all-category search\n", + "example": "/state" + }, + "operator": { + "type": "string", + "description": "Possible operators to use on filters:\n * `=` - equal\n * `!=` - not equal\n * `>` - greater than\n * `>=` - greater than or equal to\n * `<` - less than\n * `<=` - less than or equal to\n * `[NOT] BETWEEN` - (not) between\n * `[NOT] LIKE` - (not) like\n * `[NOT] IN` - (not) in\n * `~*` - case-insensitive like\n", + "example": "=" + }, + "values": { + "type": "array", + "items": { + "type": "string", + "example": "PING_COMMAND" + } + } + } + }, + "CloudRouterCommandSearchOrFilter": { + "type": "object", + "properties": { + "or": { + "maxItems": 3, + "type": "array", + "items": { + "$ref": "#/components/schemas/CloudRouterCommandSearchExpression" + } + } + } + }, + "CloudRouterCommandSearchSortCriteria": { + "type": "object", + "properties": { + "direction": { + "$ref": "#/components/schemas/CloudRouterCommandSearchSortDirection" + }, + "property": { + "$ref": "#/components/schemas/CloudRouterCommandSearchSortBy" + } + } + }, + "CloudRouterCommandSearchSortDirection": { + "type": "string", + "description": "Sorting direction", + "default": "DESC", + "enum": [ + "DESC", + "ASC" + ] + }, + "CloudRouterCommandSearchSortBy": { + "type": "string", + "description": "Possible field names to use on sorting", + "default": "/changeLog/updatedDateTime", + "enum": [ + "/changeLog/createdDateTime", + "/changeLog/updatedDateTime", + "/name", + "/type" + ] + }, + "CloudRouterCommandSearchResponse": { + "type": "object", + "properties": { + "pagination": { + "$ref": "#/components/schemas/Pagination" + }, + "data": { + "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": { @@ -23526,7 +25063,7 @@ ] }, "package": { - "$ref": "#/components/schemas/precisionTimePackageResponse" + "$ref": "#/components/schemas/precisionTimePackagePostResponse" }, "connections": { "maxItems": 2, @@ -24245,7 +25782,7 @@ } } }, - "AssetId": { + "AssetId_1": { "type": "string", "description": "Stream Asset UUID", "format": "uuid", @@ -24358,9 +25895,6 @@ "description": "Stream subscription enabled status", "example": true }, - "filters": { - "$ref": "#/components/schemas/StreamSubscriptionFilter" - }, "metricSelector": { "$ref": "#/components/schemas/StreamSubscriptionSelector" }, @@ -24373,63 +25907,6 @@ }, "description": "Create Stream Subscription" }, - "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": { - "type": "object", - "properties": { - "property": { - "type": "string", - "description": "Possible field names to use on filters:\n * `/subject` - subject\n * `/type` - type\n", - "example": "/type" - }, - "operator": { - "type": "string", - "description": "Possible operators to use on filters:\n * `=` - equal\n * `in` - in\n * `LIKE` - case-sensitive like\n * `ILIKE` - case-insensitive like\n", - "example": "=" - }, - "values": { - "type": "array", - "description": "### Supported event or metric names to use on filters with property /type:\n * `*` - all events or metrics\n * `equinix.fabric.port.*` - port events or metrics\n * `equinix.fabric.connection.*` - connection events or metrics\n * `equinix.fabric.router.*` - cloud router events\n * `equinix.fabric.metro.*` - metro metrics\n * `equinix.fabric.network.*` - network events\n * `equinix.fabric.service_token.*` - service token events\n * `equinix.network_edge.*` - network edge events\n * `equinix.network_edge.acl.*` - network edge acl events\n * `equinix.network_edge.device.*` - network edge device events\n * `equinix.access_manager.*` - identity access manager events\n * `equinix.access_manager.user.role.*` - identity access manager user role events\n### Supported event or metric names to use on filters with property /subject:\n * `*` - all events or metrics\n * `/fabric/v4/ports/` - port events or metrics\n * `/fabric/v4/connections/` - connection events or metrics\n * `/fabric/v4/routers/` - cloud router events\n * `/fabric/v4/metros/` - metro metrics\n * `/fabric/v4/networks/` - network events\n * `/fabric/v4/tokens/` - service token events\n * `/ne/v1/acl/` - network edge acl events\n * `/ne/v1/devices/` - network edge device events\n * `/am/v2/users//roleAssignments/` - identity access manager events\n", - "items": { - "type": "string" - } - } - } - }, - "StreamFilterOrFilter": { - "type": "object", - "properties": { - "or": { - "maxItems": 3, - "type": "array", - "items": { - "$ref": "#/components/schemas/StreamFilterSimpleExpression" - } - } - } - }, "StreamSubscriptionSelector": { "type": "object", "properties": { @@ -24561,11 +26038,6 @@ "metricUri": { "type": "string", "description": "metric uri" - }, - "transformAlerts": { - "type": "boolean", - "description": "transform alerts", - "example": true } }, "description": "Stream subscription sink settings" @@ -24617,9 +26089,6 @@ "type": "boolean", "description": "Stream subscription enabled status" }, - "filters": { - "$ref": "#/components/schemas/StreamSubscriptionFilter" - }, "metricSelector": { "$ref": "#/components/schemas/StreamSubscriptionSelector" }, @@ -24631,6 +26100,10 @@ }, "changeLog": { "$ref": "#/components/schemas/Changelog" + }, + "lastErrorMessage": { + "type": "string", + "description": "HTTP response from sink type if error occurred" } }, "description": "Stream Subscription object" @@ -24900,6 +26373,125 @@ }, "description": "Create Stream Alert Rules" }, + "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" + }, + "CloudEventData": { + "type": "object", + "properties": { + "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", + "description": "Cloud Event asset type" + }, + "name": { + "type": "string", + "description": "Cloud Event asset name" + }, + "state": { + "type": "string", + "description": "Cloud Event asset state" + } + } + }, + "AuthContext": { + "type": "object", + "properties": { + "authtype": { + "type": "string", + "description": "Cloud Event auth type", + "enum": [ + "system", + "user" + ] + }, + "authid": { + "type": "string", + "description": "Cloud Event auth identifier", + "enum": [ + "equinix", + "userId" + ] + }, + "name": { + "type": "string", + "description": "Cloud Event username" + }, + "email": { + "type": "string", + "description": "Cloud Event email" + } + } + }, + "PaginationRequest": { + "type": "object", + "properties": { + "offset": { + "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" + }, "ConnectionType": { "type": "string", "description": "Connection type", @@ -25330,38 +26922,6 @@ }, "description": "Change log" }, - "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" - }, "ConnectionChangeOperation": { "required": [ "op", @@ -25419,24 +26979,6 @@ }, "description": "Connection acceptance data" }, - "PaginationRequest": { - "type": "object", - "properties": { - "offset": { - "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" - }, "ConnectionRouteTableEntry": { "required": [ "changeLog", @@ -26130,7 +27672,8 @@ "description": "Type of Port", "enum": [ "XF_PORT", - "IX_PORT" + "IX_PORT", + "IA_PORT" ] }, "PortState": { @@ -26139,6 +27682,7 @@ "enum": [ "PENDING", "PROVISIONING", + "REPROVISIONING", "PROVISIONED", "ACTIVE", "DEPROVISIONING", @@ -26220,6 +27764,53 @@ }, "description": "Operational specifications for ports." }, + "PortChange": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "Uniquely identifies a change" + }, + "type": { + "type": "string", + "description": "Type of change", + "enum": [ + "PORT_CREATION", + "PORT_UPDATE", + "PORT_DELETION" + ] + }, + "status": { + "type": "string", + "description": "Current outcome of the change flow", + "enum": [ + "COMPLETED", + "FAILED", + "REQUESTED" + ] + }, + "information": { + "type": "string", + "description": "Additional information" + }, + "data": { + "$ref": "#/components/schemas/PortChangeOperation" + }, + "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" + } + }, + "description": "Current state of latest port change" + }, "PortDevice": { "type": "object", "properties": { @@ -27257,6 +28848,80 @@ }, "description": "Operation object for router actions" }, + "CloudRouterCommandType": { + "type": "string", + "description": "Fabric Cloud Router Command Type", + "example": "PING_COMMAND", + "enum": [ + "PING_COMMAND" + ] + }, + "CloudRouterCommandRequest": { + "required": [ + "destination" + ], + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "Fabric Cloud Router Ping Command Destination", + "example": "8.8.8.8" + }, + "sourceConnection": { + "$ref": "#/components/schemas/CloudRouterCommandRequestConnection" + }, + "timeout": { + "type": "integer", + "description": "Fabric Cloud Router Ping Command Timeout", + "example": 5 + }, + "dataBytes": { + "maximum": 9000, + "minimum": 16, + "type": "integer", + "description": "Fabric Cloud Router Ping Command DataBytes", + "example": 100, + "default": 64 + }, + "interval": { + "type": "integer", + "description": "Time in milliseconds between sending each packet", + "readOnly": true, + "example": 1000, + "default": 1000 + }, + "count": { + "type": "integer", + "description": "Total number of ping requests", + "readOnly": true, + "example": 5, + "default": 5 + } + }, + "description": "Fabric Cloud Router Command Request" + }, + "CloudRouterCommandState": { + "type": "string", + "description": "Fabric Cloud Router Command State", + "example": "SUCCEEDED", + "enum": [ + "PENDING", + "SUCCEEDED", + "FAILED", + "DELETED" + ] + }, + "CloudRouterCommandResponse": { + "type": "object", + "properties": { + "output": { + "type": "string" + }, + "outputStructuredPing": { + "$ref": "#/components/schemas/OutputStructuredPing" + } + } + }, "RouteTableEntry": { "required": [ "changeLog", @@ -27385,7 +29050,9 @@ "enum": [ "EVPLAN", "EPLAN", - "IPWAN" + "IPWAN", + "EVPTREE", + "EPTREE" ] }, "NetworkScope": { @@ -27732,14 +29399,35 @@ }, "description": "Precision Time Order" }, - "virtualConnectionTimeServiceResponse": { - "title": "fabricConnectionResponse", + "precisionTimePackagePostResponse": { + "title": "precisionTimePackagePostResponse", "required": [ - "href", - "type", - "uuid" + "code" ], "type": "object", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "code": { + "type": "string", + "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", @@ -27802,6 +29490,63 @@ } } }, + "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": { + "type": "object", + "properties": { + "property": { + "type": "string", + "description": "Possible field names to use on filters:\n * `/subject` - subject\n * `/type` - type\n", + "example": "/type" + }, + "operator": { + "type": "string", + "description": "Possible operators to use on filters:\n * `=` - equal\n * `in` - in\n * `LIKE` - case-sensitive like\n * `ILIKE` - case-insensitive like\n", + "example": "=" + }, + "values": { + "type": "array", + "description": "### Supported event or metric names to use on filters with property /type:\n * `*` - all events or metrics\n * `equinix.fabric.port.*` - port events or metrics\n * `equinix.fabric.connection.*` - connection events or metrics\n * `equinix.fabric.router.*` - cloud router events\n * `equinix.fabric.metro.*` - metro metrics\n * `equinix.fabric.network.*` - network events\n * `equinix.fabric.service_token.*` - service token events\n * `equinix.network_edge.*` - network edge events\n * `equinix.network_edge.acl.*` - network edge acl events\n * `equinix.network_edge.device.*` - network edge device events\n * `equinix.access_manager.*` - identity access manager events\n * `equinix.access_manager.user.role.*` - identity access manager user role events\n### Supported event or metric names to use on filters with property /subject:\n * `*` - all events or metrics\n * `/fabric/v4/ports/` - port events or metrics\n * `/fabric/v4/connections/` - connection events or metrics\n * `/fabric/v4/routers/` - cloud router events\n * `/fabric/v4/metros/` - metro metrics\n * `/fabric/v4/networks/` - network events\n * `/fabric/v4/tokens/` - service token events\n * `/ne/v1/acl/` - network edge acl events\n * `/ne/v1/devices/` - network edge device events\n * `/am/v2/users//roleAssignments/` - identity access manager events\n", + "items": { + "type": "string" + } + } + } + }, + "StreamFilterOrFilter": { + "type": "object", + "properties": { + "or": { + "maxItems": 3, + "type": "array", + "items": { + "$ref": "#/components/schemas/StreamFilterSimpleExpression" + } + } + } + }, "ConnectionPriority": { "type": "string", "description": "Connection priority in redundancy group", @@ -28322,6 +30067,73 @@ }, "description": "Service Token details of Link Protocol" }, + "CloudRouterCommandRequestConnection": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "Connection UUID", + "example": "557400f8-d360-11e9-bb65-2a2ae2dbcce4" + } + }, + "description": "Connection object for Cloud Router Command" + }, + "OutputStructuredPing": { + "type": "object", + "properties": { + "destinationIp": { + "type": "string", + "example": "8.8.8.8" + }, + "destinationName": { + "type": "string", + "example": "8.8.8.8" + }, + "dataBytes": { + "type": "integer", + "example": 100 + }, + "packetsTransmitted": { + "type": "integer", + "example": 4 + }, + "packetsReceived": { + "type": "integer", + "example": 4 + }, + "packetsLossPercent": { + "type": "number", + "format": "float", + "example": 0 + }, + "rttMin": { + "type": "number", + "format": "float", + "example": 9.271 + }, + "rttAvg": { + "type": "number", + "format": "float", + "example": 15.483 + }, + "rttMax": { + "type": "number", + "format": "float", + "example": 26.771 + }, + "rttStdDev": { + "type": "number", + "format": "float", + "example": 7.039 + }, + "responses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OutputStructuredPingResponseItem" + } + } + } + }, "RouteTableEntryState": { "type": "string", "description": "Route table entry state", @@ -28922,6 +30734,32 @@ }, "description": "List of criteria for selecting network access points with optimal efficiency, security, compatibility, and availability." }, + "OutputStructuredPingResponseItem": { + "type": "object", + "properties": { + "bytes": { + "type": "integer", + "example": 100 + }, + "ip": { + "type": "string", + "example": "8.8.8.8" + }, + "icmpSeq": { + "type": "integer", + "example": 0 + }, + "ttl": { + "type": "integer", + "example": 117 + }, + "time": { + "type": "number", + "format": "float", + "example": 9.839 + } + } + }, "LinkProtocolType": { "type": "string", "description": "Type of Link Protocol", @@ -29686,18 +31524,20 @@ "403": { "value": [ { - "errorCode": "EQ-3142402", - "errorMessage": "Do not have create connection permission on this port", - "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec" + "errorCode": "EQ-3040047", + "errorMessage": "Operation not allowed", + "correlationId": "c82ff3bc-de07-47e5-b3ec-53a009d01515", + "details": "Operation not allowed for current user" } ] }, "404": { "value": [ { - "errorCode": "EQ-3000036", - "errorMessage": "Requested path doesn't exists", - "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec" + "errorCode": "EQ-3040020", + "errorMessage": "uuid not found", + "correlationId": "c82ff3bc-de07-47e5-b3ec-53a009d01515", + "details": "uuid not found" } ] }, @@ -29729,16 +31569,174 @@ "500": { "value": [ { - "errorCode": "EQ-3034003", - "errorMessage": "Method not supported,Please check the URL passed", + "errorCode": "EQ-3040030", + "errorMessage": "Internal Server Error", "correlationId": "c82ff3bc-de07-47e5-b3ec-53a009d01515", - "additionalInfo": [ + "details": "Internal Server Error" + } + ] + }, + "get-cloud-events-by-asset-id": { + "value": { + "pagination": { + "offset": 20, + "limit": 10, + "total": 3, + "next": null, + "previous": null + }, + "data": [ + { + "specversion": "1.0", + "source": "https://api.equinix.com/fabric/v4/events", + "id": "66c62c1a-f186-4fbd-9792-71a60705518f", + "time": "2025-03-20T13:13:12Z", + "type": "equinix.fabric.connection.bgpipv4_session_status.connect", + "subject": "/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9/routingProtocol/e92cdf09-59eb-4131-ade4-49a87dc816dc", + "dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json", + "datacontenttype": "application/json", + "severitynumber": 5, + "severitytext": "INFO", + "equinixproject": "dadd3ab6-c0af-430c-8216-43d44f08c1c5", + "authtype": "system", + "authid": "equinix", + "data": { + "message": "Neighbor 100.100.100.102 address session state changed to Connect", + "auth": { + "type": "system", + "id": "equinix" + } + } + }, + { + "specversion": "1.0", + "source": "https://api.equinix.com/fabric/v4/cloudevents", + "id": "66c62c1a-f186-4fbd-9792-71a60705518f", + "type": "equinix.fabric.connection.state.provisioning", + "subject": "/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "time": "2025-03-20T13:13:12Z", + "dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json", + "datacontenttype": "application/json", + "severitynumber": 9, + "severitytext": "INFO", + "equinixproject": "dadd3ab6-c0af-430c-8216-43d44f08c1c5", + "authtype": "user", + "authid": 123456, + "data": { + "message": "Connection named TEST-CONNECTION state changed to provisioning", + "resource": { + "href": "http://api.corp.equinix.com/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "uuid": "dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "type": "IP_VC", + "name": "TEST-CONNECTION", + "state": "PROVISIONING" + }, + "auth": { + "type": "user", + "id": 123456, + "name": "test user", + "email": "testuser@test.com" + } + } + }, + { + "specversion": "1.0", + "source": "https://api.equinix.com/fabric/v4/cloudevents", + "id": "66c62c1a-f186-4fbd-9792-71a60705518f", + "type": "equinix.fabric.connection.state.provisioned", + "subject": "/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "time": "2025-03-20T13:13:12Z", + "dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json", + "datacontenttype": "application/json", + "severitynumber": 9, + "severitytext": "INFO", + "equinixproject": "dadd3ab6-c0af-430c-8216-43d44f08c1c5", + "authtype": "system", + "authid": "equinix", + "data": { + "message": "Connection named TEST-CONNECTION state changed to provisioned", + "resource": { + "href": "http://api.corp.equinix.com/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "uuid": "dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "type": "IP_VC", + "name": "TEST-CONNECTION", + "state": "PROVISIONED" + }, + "auth": { + "type": "system", + "id": "equinix" + } + } + } + ] + } + }, + "get-cloud-event": { + "value": { + "specversion": "1.0", + "source": "https://api.equinix.com/fabric/v4/cloudevents", + "id": "66c62c1a-f186-4fbd-9792-71a60705518f", + "type": "equinix.fabric.connection.state.provisioning", + "subject": "/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "time": "2025-03-20T13:13:12Z", + "dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json", + "datacontenttype": "application/json", + "severitynumber": 9, + "severitytext": "INFO", + "equinixproject": "dadd3ab6-c0af-430c-8216-43d44f08c1c5", + "authtype": "user", + "authid": 123456, + "data": { + "message": "Connection named TEST-CONNECTION state changed to provisioning", + "resource": { + "href": "http://api.corp.equinix.com/fabric/v4/connections/dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "uuid": "dab9fc84-cc95-4cb4-abe3-ca39361285a9", + "type": "IP_VC", + "name": "TEST-CONNECTION", + "state": "PROVISIONING" + }, + "auth": { + "type": "user", + "id": 123456, + "name": "test user", + "email": "testuser@test.com" + } + } + } + }, + "search-cloud-events": { + "value": { + "filter": { + "and": [ + { + "property": "/type", + "operator": "IN", + "values": [ + "equinix.fabric.port.status.*" + ] + }, + { + "property": "/subject", + "operator": "IN", + "values": [ + "/fabric/v4/ports/8ac8ecfe-c7cb-4def-9f77-5ce93c19d83d*", + "/fabric/v4/ports/c8bba3be-5132-4669-bb47-7f1a8811359b*" + ] + }, { - "reason": "method:PATCH" + "property": "/time", + "operator": ">", + "values": [ + "2018-04-05T17:31:00.000Z" + ] } ] + }, + "pagination": { + "offset": 0, + "limit": 20 } - ] + } }, "COLO2COLOwithDot1q-Dot1q": { "value": { @@ -33518,7 +35516,7 @@ ] } }, - "ConnectionExample": { + "ConnectionCreateResponse": { "value": { "href": "https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62", "type": "EVPL_VC", @@ -33559,8 +35557,8 @@ } }, "operation": { - "providerStatus": "AVAILABLE", - "equinixStatus": "PROVISIONED" + "providerStatus": "PROVISIONING", + "equinixStatus": "PROVISIONING" }, "changeLog": { "createdDateTime": "2020-05-21T10:30:00Z" @@ -34243,8 +36241,8 @@ } }, "operation": { - "equinixStatus": "PROVISIONING", - "providerStatus": "PROVISIONING" + "equinixStatus": "PENDING_INTERFACE_CONFIGURATION", + "providerStatus": "NOT_AVAILABLE" }, "notifications": [ { @@ -38184,6 +40182,74 @@ } ] }, + "ConnectionPatchResponseDryRun": { + "value": { + "href": "https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62", + "type": "EVPL_VC", + "uuid": "3a58dd05-f46d-4b1d-a154-2e85c396ea62", + "name": "My-Layer2-Connection-2", + "bandwidth": 1000, + "direction": "OUTGOING", + "isRemote": true, + "redundancy": { + "group": "66c10a60-789e-4b25-b85c-7eb225a4c344", + "priority": "PRIMARY" + }, + "aSide": { + "accessPoint": { + "type": "COLO", + "port": { + "href": "https://api.equinix.com/fabric/v4/ports/a00cef6f-8e35-4794-9ff9-665e084e4e6d", + "uuid": "a00cef6f-8e35-4794-9ff9-665e084e4e6d" + }, + "linkProtocol": { + "type": "DOT1Q", + "vlanTag": 1001 + } + } + }, + "zSide": { + "accessPoint": { + "type": "SP", + "profile": { + "href": "https://api.equinix.com/fabric/v4/serviceProfiles/22d4e853-ef33-4ff0-b5b2-a2b1d5dfa50c", + "uuid": "22d4e853-ef33-4ff0-b5b2-a2b1d5dfa50c", + "type": "L2_PROFILE" + }, + "location": { + "metroHref": "https://api.equinix.com/fabric/v4/metros/MX", + "metroCode": "MX" + }, + "linkProtocol": { + "type": "DOT1Q", + "vlanTag": 1001 + } + } + }, + "operation": { + "providerStatus": "PROVISIONED", + "equinixStatus": "PROVISIONED" + }, + "change": { + "type": "CONNECTION_UPDATE", + "status": "APPROVED", + "createdDateTime": "2021-12-12T06:00:01.183Z", + "data": { + "op": "replace", + "path": "/aSide/accessPoint/port/uuid", + "value": "c791f8cb-58f9-8f90-8ce0-306a5c00a4ee" + } + }, + "changeLog": { + "createdDateTime": "2020-04-21T10:30:00Z" + }, + "account": { + "accountNumber": 270001, + "orgId": 91997, + "globalOrgId": "3453453cccc" + } + } + }, "ConnectionPatchResponse": { "value": { "href": "https://api.equinix.com/fabric/v4/connections/3a58dd05-f46d-4b1d-a154-2e85c396ea62", @@ -38606,11 +40672,11 @@ "RoutingProtocolCreateBGPResponse": { "value": { "href": "https://api.equinix.com/fabric/v4/connections/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170/routingProtocols/557400f8-d360-11e9-bb65-2a2ae2dbcce4", - "uuid": "c9b8e7a2-f3b1-4576-a4a9-1366a63df170", + "uuid": "557400f8-d360-11e9-bb65-2a2ae2dbcce4", "state": "PROVISIONING", "change": { - "uuid": "3c9b8e7a2-f3b1-4576-a4a9-1366a63df170", "href": "https://api.equinix.com/fabric/v4/connections/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170/routingProtocols/557400f8-d360-11e9-bb65-2a2ae2dbcce4/changes/3c9b8e7a2-f3b1-4576-a4a9-1366a63df170", + "uuid": "3c9b8e7a2-f3b1-4576-a4a9-1366a63df170", "type": "ROUTING_PROTOCOL_CREATION" }, "changelog": { @@ -43451,6 +45517,55 @@ } } }, + "getServiceToken-DryRun": { + "value": { + "href": "https://api.equinix.com/fabric/v4/serviceTokens/ea40918e-9b39-4045-8be8-0beaa7eb5ce1", + "type": "VC_TOKEN", + "uuid": "ea40918e-9b39-4045-8be8-0beaa7eb5ce1", + "name": "My-Token", + "state": "INACTIVE", + "expiryDateTime": "2020-05-31T10:30:00Z", + "connection": { + "type": "EVPL_VC", + "bandwidthLimit": 100, + "allowRemoteConnection": false, + "allowCustomBandwidth": false, + "aSide": { + "accessPointSelectors": [ + { + "type": "COLO", + "port": { + "href": "http://api.equinix.com/fabric/v4/ports/b840a1db-5758-758f-97e0-328a5c00a874", + "type": "XF_PORT", + "uuid": "b840a1db-5758-758f-97e0-328a5c00a874" + }, + "linkProtocol": { + "type": "QINQ", + "vlanCTag": 1399, + "vlanSTag": 1388 + } + } + ] + } + }, + "account": { + "orgId": 111437 + }, + "notifications": [ + { + "type": "NOTIFICATION", + "emails": [ + "user1@example.com", + "user2@example.com" + ] + } + ], + "changeLog": { + "createdBy": 843577, + "createdDateTime": "2020-05-21T10:30:00Z" + } + } + }, "400_UUID": { "value": [ { @@ -48614,6 +50729,384 @@ } ] }, + "GetAllPingCommandResponse": { + "value": { + "pagination": { + "offset": 20, + "limit": 20, + "total": 100, + "next": "/search?offset=40&limit=20", + "previous": "/search?offset=0&limit=20" + }, + "data": { + "href": "https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00", + "type": "PING_COMMAND", + "uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00", + "name": "ping-test-1", + "description": "Testing FCR-SV-1", + "state": "SUCCEEDED", + "project": { + "projectId": "b11d4cb5-978a-418a-8b13-bf19abb97938" + }, + "request": { + "destination": "8.8.8.8", + "sourceConnection": { + "uuid": "1da3778c-6aa3-4e47-b2fe-83a0773dde18" + }, + "timeout": 5, + "dataBytes": 100, + "count": 5, + "interval": 1000 + }, + "response": { + "output": "PING 8.8.8.8 (8.8.8.8): 100 data bytes\n108 bytes from 8.8.8.8: icmp_seq=0 ttl=117 time=9.839 ms\n108 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=16.051 ms\n108 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=9.271 ms\n108 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=26.771 ms \n--- 8.8.8.8 ping statistics ---\n4 packets transmitted, 4 packets received, 0.0% packet loss\nround-trip min/avg/max/stddev = 9.271/15.483/26.771/7.039 ms", + "outputStructuredPing": { + "destinationIp": "8.8.8.8", + "destinationName": "8.8.8.8", + "dataBytes": 100, + "packetsTransmitted": 4, + "packetsReceived": 4, + "packetsLossPercent": 0, + "rttMin": 9.271, + "rttAvg": 15.483, + "rttMax": 26.771, + "rttStdDev": 7.039, + "responses": [ + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 0, + "ttl": 117, + "time": 9.839 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 1, + "ttl": 117, + "time": 16.051 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 2, + "ttl": 117, + "time": 9.271 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 3, + "ttl": 117, + "time": 26.771 + } + ] + } + }, + "changeLog": { + "createdBy": "testuser", + "createdDateTime": "2020-05-21T10:30:00Z" + } + } + } + }, + "400_invalid_operation_commands": { + "value": [ + { + "errorCode": "EQ-3043002", + "errorMessage": "Invalid argument passed", + "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec", + "details": "Invalid argument passed" + } + ] + }, + "403_commands": { + "value": [ + { + "errorCode": "EQ-3043006", + "errorMessage": "The system is unable to process your request.", + "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec", + "details": "The system is unable to process your request." + } + ] + }, + "404_commands": { + "value": [ + { + "errorCode": "EQ-3043022", + "errorMessage": "Cloud router command not found", + "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec", + "details": "Cloud router command not found" + } + ] + }, + "415_commands": { + "value": [ + { + "errorCode": "EQ-3043029", + "errorMessage": "Unsupported media type", + "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec", + "details": "Content type application/json not supported." + } + ] + }, + "500_commands": { + "value": [ + { + "errorCode": "EQ-3043005", + "errorMessage": "Internal server error", + "correlationId": "cebc3d33-9037-4a2b-a7af-0ad65602cdec", + "details": "Internal server error" + } + ] + }, + "PostRequestPingCommand": { + "value": { + "type": "PING_COMMAND", + "name": "ping-test-1", + "description": "Testing FCR-SV-1", + "project": { + "projectId": "b11d4cb5-978a-418a-8b13-bf19abb97938" + }, + "request": { + "destination": "8.8.8.8", + "sourceConnection": { + "uuid": "1da3778c-6aa3-4e47-b2fe-83a0773dde18" + }, + "timeout": 2, + "dataBytes": 100 + } + } + }, + "PostResponsePingCommand": { + "value": { + "href": "https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00", + "type": "PING_COMMAND", + "uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00", + "name": "ping-test-1", + "description": "Testing FCR-SV-1", + "state": "PENDING", + "project": { + "projectId": "b11d4cb5-978a-418a-8b13-bf19abb97938" + }, + "request": { + "destination": "8.8.8.8", + "sourceConnection": { + "uuid": "1da3778c-6aa3-4e47-b2fe-83a0773dde18" + }, + "timeout": 2, + "dataBytes": 100, + "count": 5, + "interval": 1000 + }, + "changeLog": { + "createdBy": "testuser", + "createdDateTime": "2020-05-21T10:30:00Z" + } + } + }, + "SearchByStateRequest": { + "value": { + "filter": { + "and": [ + { + "property": "/state", + "operator": "=", + "values": [ + "SUCCEEDED" + ] + } + ] + }, + "pagination": { + "offset": 0, + "limit": 20 + }, + "sort": [ + { + "direction": "DESC", + "property": "/changeLog/createdDateTime" + } + ] + } + }, + "SearchResponse": { + "value": { + "pagination": { + "offset": 20, + "limit": 20, + "total": 100, + "next": "/search?offset=40&limit=20", + "previous": "/search?offset=0&limit=20" + }, + "data": { + "href": "https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00", + "type": "PING_COMMAND", + "uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00", + "name": "ping-test-1", + "description": "Testing FCR-SV-1", + "state": "SUCCEEDED", + "project": { + "projectId": "b11d4cb5-978a-418a-8b13-bf19abb97938" + }, + "request": { + "destination": "8.8.8.8", + "sourceConnection": { + "uuid": "1da3778c-6aa3-4e47-b2fe-83a0773dde18" + }, + "timeout": 2, + "dataBytes": 100, + "count": 5, + "interval": 1000 + }, + "response": { + "output": "PING 8.8.8.8 (8.8.8.8): 100 data bytes\n108 bytes from 8.8.8.8: icmp_seq=0 ttl=117 time=9.839 ms\n108 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=16.051 ms\n108 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=9.271 ms\n108 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=26.771 ms \n--- 8.8.8.8 ping statistics ---\n4 packets transmitted, 4 packets received, 0.0% packet loss\nround-trip min/avg/max/stddev = 9.271/15.483/26.771/7.039 ms", + "outputStructuredPing": { + "destinationIp": "8.8.8.8", + "destinationName": "8.8.8.8", + "dataBytes": 100, + "packetsTransmitted": 4, + "packetsReceived": 4, + "packetsLossPercent": 0, + "rttMin": 9.271, + "rttAvg": 15.483, + "rttMax": 26.771, + "rttStdDev": 7.039, + "responses": [ + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 0, + "ttl": 117, + "time": 9.839 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 1, + "ttl": 117, + "time": 16.051 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 2, + "ttl": 117, + "time": 9.271 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 3, + "ttl": 117, + "time": 26.771 + } + ] + } + }, + "changeLog": { + "createdBy": "testuser", + "createdDateTime": "2020-05-21T10:30:00Z" + } + } + } + }, + "400_invalid_sorting_commands": { + "value": [ + { + "errorCode": "EQ-3043015", + "errorMessage": "Invalid value for sorting direction.", + "correlationId": "c82ff3bc-de07-47e5-b3ec-53a009d01515", + "additionalInfo": [ + { + "reason": "Only accept DESC and ASC for sorting direction." + } + ] + } + ] + }, + "GetResponsePingCommand": { + "value": { + "href": "https://api.equinix.com/fabric/v4/routers/9b8c5042-b553-4d5e-a2ac-c73bf6d4fd81/commands/37c10edc-ba2e-4240-a850-8a48f9c47d00", + "type": "PING_COMMAND", + "uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00", + "name": "ping-test-1", + "description": "Testing FCR-SV-1", + "state": "SUCCEEDED", + "project": { + "projectId": "b11d4cb5-978a-418a-8b13-bf19abb97938" + }, + "request": { + "destination": "8.8.8.8", + "sourceConnection": { + "uuid": "1da3778c-6aa3-4e47-b2fe-83a0773dde18" + }, + "timeout": 2, + "dataBytes": 100, + "count": 5, + "interval": 1000 + }, + "response": { + "output": "PING 8.8.8.8 (8.8.8.8): 100 data bytes\n108 bytes from 8.8.8.8: icmp_seq=0 ttl=117 time=9.839 ms\n108 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=16.051 ms\n108 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=9.271 ms\n108 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=26.771 ms \n--- 8.8.8.8 ping statistics ---\n4 packets transmitted, 4 packets received, 0.0% packet loss\nround-trip min/avg/max/stddev = 9.271/15.483/26.771/7.039 ms", + "outputStructuredPing": { + "destinationIp": "8.8.8.8", + "destinationName": "8.8.8.8", + "dataBytes": 100, + "packetsTransmitted": 4, + "packetsReceived": 4, + "packetsLossPercent": 0, + "rttMin": 9.271, + "rttAvg": 15.483, + "rttMax": 26.771, + "rttStdDev": 7.039, + "responses": [ + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 0, + "ttl": 117, + "time": 9.839 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 1, + "ttl": 117, + "time": 16.051 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 2, + "ttl": 117, + "time": 9.271 + }, + { + "bytes": 100, + "ip": "8.8.8.8", + "icmpSeq": 3, + "ttl": 117, + "time": 26.771 + } + ] + } + }, + "changeLog": { + "createdBy": "testuser", + "createdDateTime": "2020-05-21T10:30:00Z" + } + } + }, + "400_invalid_state_commands": { + "value": [ + { + "errorCode": "EQ-3043023", + "errorMessage": "Cannot delete Command in pending state", + "correlationId": "c82ff3bc-de07-47e5-b3ec-53a009d01515", + "details": "Cannot delete Fabric Cloud Router in transient state." + } + ] + }, "SearchFilterByNextHop": { "value": { "filter": { @@ -49919,13 +52412,13 @@ ] } }, - "CreateGlobalNetwork": { + "Create-Global-EVPLAN-Network": { "value": { "type": "EVPLAN", "name": "My-Network-1", "scope": "GLOBAL", "project": { - "projectId": "1234567" + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" }, "notifications": [ { @@ -49937,7 +52430,7 @@ ] } }, - "CreateRegionalNetwork": { + "Create-Regional-EVPLAN-Network": { "value": { "type": "EVPLAN", "name": "My-Network-1", @@ -49946,7 +52439,7 @@ "region": "EMEA" }, "project": { - "projectId": "1234567" + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" }, "notifications": [ { @@ -49958,13 +52451,184 @@ ] } }, - "CreateLocalNetwork": { + "Create-Local-EVPLAN-Network": { "value": { "type": "EVPLAN", "name": "My-Network-1", "scope": "LOCAL", "project": { - "projectId": "1234567" + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Global-EPLAN-Network": { + "value": { + "type": "EPLAN", + "name": "My-EPLAN-Network-1", + "scope": "GLOBAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Regional-EPLAN-Network": { + "value": { + "type": "EPLAN", + "name": "My-EPLAN-Network-1", + "scope": "REGIONAL", + "location": { + "region": "EMEA" + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Local-EPLAN-Network": { + "value": { + "type": "EPLAN", + "name": "My-EPLAN-Network-1", + "scope": "LOCAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Global-EVPTREE-Network": { + "value": { + "type": "EVPTREE", + "name": "My-EVPTREE-Network-1", + "scope": "GLOBAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Regional-EVPTREE-Network": { + "value": { + "type": "EVPTREE", + "name": "My-EVPTREE-Network-1", + "scope": "REGIONAL", + "location": { + "region": "AMER" + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Local-EVPTREE-Network": { + "value": { + "type": "EVPTREE", + "name": "My-EVPTREE-Network-1", + "scope": "LOCAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Global-EPTREE-Network": { + "value": { + "type": "EPTREE", + "name": "My-EPTREE-Network-1", + "scope": "GLOBAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Regional-EPTREE-Network": { + "value": { + "type": "EPTREE", + "name": "My-EPTREE-Network-1", + "scope": "REGIONAL", + "location": { + "region": "AMER" + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "test@equinix.com" + ] + } + ] + } + }, + "Create-Local-EPTREE-Network": { + "value": { + "type": "EPTREE", + "name": "My-EPTREE-Network-1", + "scope": "LOCAL", + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" }, "notifications": [ { @@ -49994,6 +52658,594 @@ ] } }, + "Create-Global-EVPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0633e83f-116f-481d-b86f-c472271d1a8c", + "uuid": "0633e83f-116f-481d-b86f-c472271d1a8c", + "type": "EVPLAN", + "name": "My-evplan-network-1", + "scope": "GLOBAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0633e83f-116f-481d-b86f-c472271d1a8c/changes/ce7c0bbc-7bd2-431f-903f-de796ea9e858", + "uuid": "ce7c0bbc-7bd2-431f-903f-de796ea9e858", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T19:37:29.326Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0633e83f-116f-481d-b86f-c472271d1a8c/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Regional-EVPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef", + "uuid": "884254b7-237d-44f7-af0f-84ba324350ef", + "type": "EVPLAN", + "name": "My-evplan-network-1", + "scope": "REGIONAL", + "location": { + "region": "AMER" + }, + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/changes/741c0927-d9ed-405b-a4f2-cb61d0dda2c5", + "uuid": "741c0927-d9ed-405b-a4f2-cb61d0dda2c5", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T19:21:43.145Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Local-EVPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/726af704-0b1b-46dc-9efc-00fc938084b3", + "uuid": "726af704-0b1b-46dc-9efc-00fc938084b3", + "type": "EVPLAN", + "name": "My-evplan-network-1", + "scope": "LOCAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/726af704-0b1b-46dc-9efc-00fc938084b3/changes/92e2f236-e77d-4818-bbad-cff6b716a610", + "uuid": "92e2f236-e77d-4818-bbad-cff6b716a610", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T19:43:20.145Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/726af704-0b1b-46dc-9efc-00fc938084b3/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Global-EPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0d51722e-b080-4943-92ab-9720eaab2cfa", + "uuid": "0d51722e-b080-4943-92ab-9720eaab2cfa", + "type": "EPLAN", + "name": "My-eplan-network-1", + "scope": "GLOBAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0d51722e-b080-4943-92ab-9720eaab2cfa/changes/e4f9c57f-a1d6-4520-9a31-fddbe69ed592", + "uuid": "e4f9c57f-a1d6-4520-9a31-fddbe69ed592", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T20:52:23.469Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0d51722e-b080-4943-92ab-9720eaab2cfa/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Regional-EPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef", + "uuid": "884254b7-237d-44f7-af0f-84ba324350ef", + "type": "EVPLAN", + "name": "My-evplan-network-1", + "scope": "REGIONAL", + "location": { + "region": "AMER" + }, + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/changes/741c0927-d9ed-405b-a4f2-cb61d0dda2c5", + "uuid": "741c0927-d9ed-405b-a4f2-cb61d0dda2c5", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T19:21:43.145Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/884254b7-237d-44f7-af0f-84ba324350ef/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Local-EPLAN-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/82402fc0-cb55-4a21-b0b3-1af89f63742b", + "uuid": "82402fc0-cb55-4a21-b0b3-1af89f63742b", + "type": "EPLAN", + "name": "My-eplan-network-1", + "scope": "LOCAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/82402fc0-cb55-4a21-b0b3-1af89f63742b/changes/1449105b-7576-4094-aa34-216f3f9ed122", + "uuid": "1449105b-7576-4094-aa34-216f3f9ed122", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@gmail.com", + "createdDateTime": "2025-03-03T20:55:57.858Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/82402fc0-cb55-4a21-b0b3-1af89f63742b/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@gmail.com" + ] + } + ] + } + }, + "Create-Global-EVPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/07659346-9489-42cf-891a-683624e801d5", + "uuid": "07659346-9489-42cf-891a-683624e801d5", + "type": "EVPTREE", + "name": "My-evptree-network-1", + "scope": "GLOBAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/07659346-9489-42cf-891a-683624e801d5/changes/1caf3efb-7427-4be1-8100-73fcff471654", + "uuid": "1caf3efb-7427-4be1-8100-73fcff471654", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.comm", + "createdDateTime": "2025-03-05T21:17:46.656Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/07659346-9489-42cf-891a-683624e801d5/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, + "Create-Regional-EVPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0ec08139-bae5-44c4-bea2-970b14d7c7c0", + "uuid": "0ec08139-bae5-44c4-bea2-970b14d7c7c0", + "type": "EVPTREE", + "name": "My-evptree-network-1", + "scope": "REGIONAL", + "location": { + "region": "AMER" + }, + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0ec08139-bae5-44c4-bea2-970b14d7c7c0/changes/0e159ddd-47d2-4fa3-97fe-502f8a70ea0e", + "uuid": "0e159ddd-47d2-4fa3-97fe-502f8a70ea0e", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.com", + "createdDateTime": "2025-03-05T20:57:07.206Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/0ec08139-bae5-44c4-bea2-970b14d7c7c0/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, + "Create-Local-EVPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/4622cce8-114b-4432-94f4-060fda044ae3", + "uuid": "4622cce8-114b-4432-94f4-060fda044ae3", + "type": "EVPTREE", + "name": "My-evptree-network-1", + "scope": "LOCAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/4622cce8-114b-4432-94f4-060fda044ae3/changes/6eacff89-a363-402f-ae15-84294177a866", + "uuid": "6eacff89-a363-402f-ae15-84294177a866", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.com", + "createdDateTime": "2025-03-05T21:22:30.984Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/4622cce8-114b-4432-94f4-060fda044ae3/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, + "Create-Global-EPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/16ee541c-9e93-428b-9557-3f99907aa21c", + "uuid": "16ee541c-9e93-428b-9557-3f99907aa21c", + "type": "EPTREE", + "name": "My-eptree-network-1", + "scope": "GLOBAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/16ee541c-9e93-428b-9557-3f99907aa21c/changes/2f541dcd-c25b-43a1-97fa-8b2be6817899", + "uuid": "2f541dcd-c25b-43a1-97fa-8b2be6817899", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.com", + "createdDateTime": "2025-03-05T21:37:08.370Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/16ee541c-9e93-428b-9557-3f99907aa21c/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, + "Create-Regional-EPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/291fc758-91d3-482b-a9b3-3430685c390e", + "uuid": "291fc758-91d3-482b-a9b3-3430685c390e", + "type": "EPTREE", + "name": "My-eptree-network-1", + "scope": "REGIONAL", + "location": { + "region": "EMEA" + }, + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/291fc758-91d3-482b-a9b3-3430685c390e/changes/8345324b-97cc-4c5c-9f15-40bc82b254ad", + "uuid": "8345324b-97cc-4c5c-9f15-40bc82b254ad", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.com", + "createdDateTime": "2025-03-06T00:23:29.030Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/291fc758-91d3-482b-a9b3-3430685c390e/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, + "Create-Local-EPTREE-Network-Response": { + "value": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/c929924e-5d87-46b2-a82f-91a145c1803d", + "uuid": "c929924e-5d87-46b2-a82f-91a145c1803d", + "type": "EPTREE", + "name": "My-eptree-network-1", + "scope": "LOCAL", + "state": "INACTIVE", + "connectionsCount": 0, + "account": { + "orgId": 14510, + "organizationName": "fabric", + "globalCustId": "0026u00000595sBAAM" + }, + "change": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/c929924e-5d87-46b2-a82f-91a145c1803d/changes/1b32bacb-5898-4efd-9404-b64ec825c652", + "uuid": "1b32bacb-5898-4efd-9404-b64ec825c652", + "type": "NETWORK_CREATION" + }, + "operation": { + "equinixStatus": "PROVISIONING" + }, + "changeLog": { + "createdBy": "fabric", + "createdByFullName": "fabric fabric", + "createdByEmail": "fabric@equinix.com", + "createdDateTime": "2025-03-06T00:30:42.972Z" + }, + "links": { + "href": "http://api.corp.equinix.com/fabric/v4/networks/c929924e-5d87-46b2-a82f-91a145c1803d/connections", + "rel": "getConnectionsByNetworkUuid", + "method": "GET", + "contentType": "application/json", + "authenticate": true + }, + "project": { + "projectId": "d64fa54a-cfcb-4fb0-82ee-86cf47007fa2" + }, + "notifications": [ + { + "type": "ALL", + "emails": [ + "fabric@equinix.com" + ] + } + ] + } + }, "NetworkPostResponseExample": { "value": { "href": "https://api.equinix.com/fabric/v4/networks/92dc376a-a932-43aa-a6a2-c806dedbd784", @@ -52580,24 +55832,6 @@ "name": "splunk", "description": "subscription 1", "state": "PROVISIONED", - "filters": { - "and": [ - { - "property": "/subject", - "operator": "LIKE", - "values": [ - "%/fabric/v4/connections/36276e58-b5a1-4864-ab5e-be10dff9eac1%" - ] - }, - { - "property": "/type", - "operator": "IN", - "values": [ - "equinix.fabric.connection.state.provisioned" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52649,17 +55883,6 @@ "name": "splunk1", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52691,17 +55914,6 @@ "name": "slack1", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52724,17 +55936,6 @@ "name": "pagerduty", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52753,7 +55954,6 @@ "integrationKey": "my-integration-key" }, "settings": { - "transformAlerts": true, "changeUri": "https://events.pagerduty.com/v2/change/enqueeue", "alertUri": "https://events.pagerduty.com/v2/enqueeue" } @@ -52766,17 +55966,6 @@ "name": "datadog", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52804,17 +55993,6 @@ "name": "teams1", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52837,17 +56015,6 @@ "name": "servicenow-1", "description": "subscription-1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "eventSelector": { "include": [ "equinix.fabric.connection.*" @@ -52876,17 +56043,6 @@ "description": "stream dec 1", "state": "PROVISIONED", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52923,17 +56079,6 @@ "name": "splunk1", "description": "subscription 1", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" @@ -52971,17 +56116,6 @@ "description": "stream dec 1", "state": "DEPROVISIONING", "enabled": true, - "filters": { - "and": [ - { - "property": "/type", - "operator": "LIKE", - "values": [ - "equinix.fabric.connection%" - ] - } - ] - }, "metricSelector": { "include": [ "equinix.fabric.connection.*" diff --git a/spec/oas3.fabric.patched.json.rej b/spec/oas3.fabric.patched.json.rej new file mode 100644 index 00000000..f58c9bb8 --- /dev/null +++ b/spec/oas3.fabric.patched.json.rej @@ -0,0 +1,10 @@ +--- oas3.fabric.fetched.json ++++ oas3.fabric.fetched.json +@@ -13768,7 +13768,6 @@ + "CustomField": { + "required": [ + "dataType", +- "description", + "isRequired", + "label" + ],