All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.telcoautomation.v1.stub.HttpJsonTelcoAutomationStub Maven / Gradle / Ivy

Go to download

Telco Automation API APIs to automate 5G deployment and management of cloud infrastructure and network functions.

There is a newer version: 0.25.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.telcoautomation.v1.stub;

import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.ListBlueprintRevisionsPagedResponse;
import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.ListBlueprintsPagedResponse;
import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.ListDeploymentRevisionsPagedResponse;
import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.ListDeploymentsPagedResponse;
import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.ListEdgeSlmsPagedResponse;
import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.ListHydratedDeploymentsPagedResponse;
import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.ListLocationsPagedResponse;
import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.ListOrchestrationClustersPagedResponse;
import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.ListPublicBlueprintsPagedResponse;
import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.SearchBlueprintRevisionsPagedResponse;
import static com.google.cloud.telcoautomation.v1.TelcoAutomationClient.SearchDeploymentRevisionsPagedResponse;

import com.google.api.HttpRule;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
import com.google.api.gax.httpjson.ApiMethodDescriptor;
import com.google.api.gax.httpjson.HttpJsonCallSettings;
import com.google.api.gax.httpjson.HttpJsonOperationSnapshot;
import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
import com.google.api.gax.httpjson.ProtoMessageResponseParser;
import com.google.api.gax.httpjson.ProtoRestSerializer;
import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.telcoautomation.v1.ApplyDeploymentRequest;
import com.google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest;
import com.google.cloud.telcoautomation.v1.ApproveBlueprintRequest;
import com.google.cloud.telcoautomation.v1.Blueprint;
import com.google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest;
import com.google.cloud.telcoautomation.v1.ComputeDeploymentStatusResponse;
import com.google.cloud.telcoautomation.v1.CreateBlueprintRequest;
import com.google.cloud.telcoautomation.v1.CreateDeploymentRequest;
import com.google.cloud.telcoautomation.v1.CreateEdgeSlmRequest;
import com.google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest;
import com.google.cloud.telcoautomation.v1.DeleteBlueprintRequest;
import com.google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest;
import com.google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest;
import com.google.cloud.telcoautomation.v1.Deployment;
import com.google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest;
import com.google.cloud.telcoautomation.v1.DiscardBlueprintChangesResponse;
import com.google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest;
import com.google.cloud.telcoautomation.v1.DiscardDeploymentChangesResponse;
import com.google.cloud.telcoautomation.v1.EdgeSlm;
import com.google.cloud.telcoautomation.v1.GetBlueprintRequest;
import com.google.cloud.telcoautomation.v1.GetDeploymentRequest;
import com.google.cloud.telcoautomation.v1.GetEdgeSlmRequest;
import com.google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest;
import com.google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest;
import com.google.cloud.telcoautomation.v1.GetPublicBlueprintRequest;
import com.google.cloud.telcoautomation.v1.HydratedDeployment;
import com.google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest;
import com.google.cloud.telcoautomation.v1.ListBlueprintRevisionsResponse;
import com.google.cloud.telcoautomation.v1.ListBlueprintsRequest;
import com.google.cloud.telcoautomation.v1.ListBlueprintsResponse;
import com.google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest;
import com.google.cloud.telcoautomation.v1.ListDeploymentRevisionsResponse;
import com.google.cloud.telcoautomation.v1.ListDeploymentsRequest;
import com.google.cloud.telcoautomation.v1.ListDeploymentsResponse;
import com.google.cloud.telcoautomation.v1.ListEdgeSlmsRequest;
import com.google.cloud.telcoautomation.v1.ListEdgeSlmsResponse;
import com.google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest;
import com.google.cloud.telcoautomation.v1.ListHydratedDeploymentsResponse;
import com.google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest;
import com.google.cloud.telcoautomation.v1.ListOrchestrationClustersResponse;
import com.google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest;
import com.google.cloud.telcoautomation.v1.ListPublicBlueprintsResponse;
import com.google.cloud.telcoautomation.v1.OperationMetadata;
import com.google.cloud.telcoautomation.v1.OrchestrationCluster;
import com.google.cloud.telcoautomation.v1.ProposeBlueprintRequest;
import com.google.cloud.telcoautomation.v1.PublicBlueprint;
import com.google.cloud.telcoautomation.v1.RejectBlueprintRequest;
import com.google.cloud.telcoautomation.v1.RemoveDeploymentRequest;
import com.google.cloud.telcoautomation.v1.RollbackDeploymentRequest;
import com.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest;
import com.google.cloud.telcoautomation.v1.SearchBlueprintRevisionsResponse;
import com.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest;
import com.google.cloud.telcoautomation.v1.SearchDeploymentRevisionsResponse;
import com.google.cloud.telcoautomation.v1.UpdateBlueprintRequest;
import com.google.cloud.telcoautomation.v1.UpdateDeploymentRequest;
import com.google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest;
import com.google.common.collect.ImmutableMap;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.TypeRegistry;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * REST stub implementation for the TelcoAutomation service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class HttpJsonTelcoAutomationStub extends TelcoAutomationStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(Empty.getDescriptor()) .add(OperationMetadata.getDescriptor()) .add(EdgeSlm.getDescriptor()) .add(OrchestrationCluster.getDescriptor()) .build(); private static final ApiMethodDescriptor< ListOrchestrationClustersRequest, ListOrchestrationClustersResponse> listOrchestrationClustersMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/ListOrchestrationClusters") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/orchestrationClusters", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListOrchestrationClustersResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getOrchestrationClusterMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/GetOrchestrationCluster") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(OrchestrationCluster.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createOrchestrationClusterMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/CreateOrchestrationCluster") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/orchestrationClusters", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam( fields, "orchestrationClusterId", request.getOrchestrationClusterId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody( "orchestrationCluster", request.getOrchestrationCluster(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateOrchestrationClusterRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteOrchestrationClusterMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/DeleteOrchestrationCluster") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteOrchestrationClusterRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listEdgeSlmsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/ListEdgeSlms") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/edgeSlms", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListEdgeSlmsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getEdgeSlmMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/GetEdgeSlm") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/edgeSlms/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(EdgeSlm.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createEdgeSlmMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/CreateEdgeSlm") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/edgeSlms", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "edgeSlmId", request.getEdgeSlmId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("edgeSlm", request.getEdgeSlm(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateEdgeSlmRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteEdgeSlmMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/DeleteEdgeSlm") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/edgeSlms/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteEdgeSlmRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createBlueprintMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/CreateBlueprint") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam( fields, "blueprintId", request.getBlueprintId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("blueprint", request.getBlueprint(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Blueprint.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateBlueprintMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/UpdateBlueprint") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{blueprint.name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "blueprint.name", request.getBlueprint().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("blueprint", request.getBlueprint(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Blueprint.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getBlueprintMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/GetBlueprint") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "view", request.getViewValue()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Blueprint.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteBlueprintMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/DeleteBlueprint") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listBlueprintsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/ListBlueprints") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListBlueprintsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor approveBlueprintMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/ApproveBlueprint") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:approve", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Blueprint.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor proposeBlueprintMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/ProposeBlueprint") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:propose", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Blueprint.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor rejectBlueprintMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/RejectBlueprint") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:reject", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Blueprint.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< ListBlueprintRevisionsRequest, ListBlueprintRevisionsResponse> listBlueprintRevisionsMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/ListBlueprintRevisions") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:listRevisions", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListBlueprintRevisionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< SearchBlueprintRevisionsRequest, SearchBlueprintRevisionsResponse> searchBlueprintRevisionsMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/SearchBlueprintRevisions") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints:searchRevisions", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "query", request.getQuery()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(SearchBlueprintRevisionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< SearchDeploymentRevisionsRequest, SearchDeploymentRevisionsResponse> searchDeploymentRevisionsMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/SearchDeploymentRevisions") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments:searchRevisions", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "query", request.getQuery()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(SearchDeploymentRevisionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< DiscardBlueprintChangesRequest, DiscardBlueprintChangesResponse> discardBlueprintChangesMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/DiscardBlueprintChanges") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:discard", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(DiscardBlueprintChangesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< ListPublicBlueprintsRequest, ListPublicBlueprintsResponse> listPublicBlueprintsMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/ListPublicBlueprints") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/publicBlueprints", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListPublicBlueprintsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getPublicBlueprintMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/GetPublicBlueprint") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/publicBlueprints/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(PublicBlueprint.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createDeploymentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/CreateDeployment") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam( fields, "deploymentId", request.getDeploymentId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("deployment", request.getDeployment(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Deployment.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateDeploymentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/UpdateDeployment") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "deployment.name", request.getDeployment().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("deployment", request.getDeployment(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Deployment.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getDeploymentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/GetDeployment") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "view", request.getViewValue()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Deployment.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor removeDeploymentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/RemoveDeployment") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:remove", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listDeploymentsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/ListDeployments") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListDeploymentsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< ListDeploymentRevisionsRequest, ListDeploymentRevisionsResponse> listDeploymentRevisionsMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/ListDeploymentRevisions") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:listRevisions", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListDeploymentRevisionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< DiscardDeploymentChangesRequest, DiscardDeploymentChangesResponse> discardDeploymentChangesMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/DiscardDeploymentChanges") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:discard", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(DiscardDeploymentChangesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor applyDeploymentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.telcoautomation.v1.TelcoAutomation/ApplyDeployment") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:apply", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Deployment.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< ComputeDeploymentStatusRequest, ComputeDeploymentStatusResponse> computeDeploymentStatusMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/ComputeDeploymentStatus") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:computeDeploymentStatus", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ComputeDeploymentStatusResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor rollbackDeploymentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/RollbackDeployment") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:rollback", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Deployment.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getHydratedDeploymentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/GetHydratedDeployment") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(HydratedDeployment.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< ListHydratedDeploymentsRequest, ListHydratedDeploymentsResponse> listHydratedDeploymentsMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/ListHydratedDeployments") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/orchestrationClusters/*/deployments/*}/hydratedDeployments", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListHydratedDeploymentsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateHydratedDeploymentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/UpdateHydratedDeployment") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{hydratedDeployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "hydratedDeployment.name", request.getHydratedDeployment().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody( "hydratedDeployment", request.getHydratedDeployment(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(HydratedDeployment.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor applyHydratedDeploymentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.telcoautomation.v1.TelcoAutomation/ApplyHydratedDeployment") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}:apply", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(HydratedDeployment.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.location.Locations/ListLocations") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getLocationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.location.Locations/GetLocation") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Location.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private final UnaryCallable listOrchestrationClustersCallable; private final UnaryCallable< ListOrchestrationClustersRequest, ListOrchestrationClustersPagedResponse> listOrchestrationClustersPagedCallable; private final UnaryCallable getOrchestrationClusterCallable; private final UnaryCallable createOrchestrationClusterCallable; private final OperationCallable< CreateOrchestrationClusterRequest, OrchestrationCluster, OperationMetadata> createOrchestrationClusterOperationCallable; private final UnaryCallable deleteOrchestrationClusterCallable; private final OperationCallable deleteOrchestrationClusterOperationCallable; private final UnaryCallable listEdgeSlmsCallable; private final UnaryCallable listEdgeSlmsPagedCallable; private final UnaryCallable getEdgeSlmCallable; private final UnaryCallable createEdgeSlmCallable; private final OperationCallable createEdgeSlmOperationCallable; private final UnaryCallable deleteEdgeSlmCallable; private final OperationCallable deleteEdgeSlmOperationCallable; private final UnaryCallable createBlueprintCallable; private final UnaryCallable updateBlueprintCallable; private final UnaryCallable getBlueprintCallable; private final UnaryCallable deleteBlueprintCallable; private final UnaryCallable listBlueprintsCallable; private final UnaryCallable listBlueprintsPagedCallable; private final UnaryCallable approveBlueprintCallable; private final UnaryCallable proposeBlueprintCallable; private final UnaryCallable rejectBlueprintCallable; private final UnaryCallable listBlueprintRevisionsCallable; private final UnaryCallable listBlueprintRevisionsPagedCallable; private final UnaryCallable searchBlueprintRevisionsCallable; private final UnaryCallable< SearchBlueprintRevisionsRequest, SearchBlueprintRevisionsPagedResponse> searchBlueprintRevisionsPagedCallable; private final UnaryCallable searchDeploymentRevisionsCallable; private final UnaryCallable< SearchDeploymentRevisionsRequest, SearchDeploymentRevisionsPagedResponse> searchDeploymentRevisionsPagedCallable; private final UnaryCallable discardBlueprintChangesCallable; private final UnaryCallable listPublicBlueprintsCallable; private final UnaryCallable listPublicBlueprintsPagedCallable; private final UnaryCallable getPublicBlueprintCallable; private final UnaryCallable createDeploymentCallable; private final UnaryCallable updateDeploymentCallable; private final UnaryCallable getDeploymentCallable; private final UnaryCallable removeDeploymentCallable; private final UnaryCallable listDeploymentsCallable; private final UnaryCallable listDeploymentsPagedCallable; private final UnaryCallable listDeploymentRevisionsCallable; private final UnaryCallable listDeploymentRevisionsPagedCallable; private final UnaryCallable discardDeploymentChangesCallable; private final UnaryCallable applyDeploymentCallable; private final UnaryCallable computeDeploymentStatusCallable; private final UnaryCallable rollbackDeploymentCallable; private final UnaryCallable getHydratedDeploymentCallable; private final UnaryCallable listHydratedDeploymentsCallable; private final UnaryCallable listHydratedDeploymentsPagedCallable; private final UnaryCallable updateHydratedDeploymentCallable; private final UnaryCallable applyHydratedDeploymentCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; private final HttpJsonStubCallableFactory callableFactory; public static final HttpJsonTelcoAutomationStub create(TelcoAutomationStubSettings settings) throws IOException { return new HttpJsonTelcoAutomationStub(settings, ClientContext.create(settings)); } public static final HttpJsonTelcoAutomationStub create(ClientContext clientContext) throws IOException { return new HttpJsonTelcoAutomationStub( TelcoAutomationStubSettings.newHttpJsonBuilder().build(), clientContext); } public static final HttpJsonTelcoAutomationStub create( ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { return new HttpJsonTelcoAutomationStub( TelcoAutomationStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of HttpJsonTelcoAutomationStub, using the given settings. This is * protected so that it is easy to make a subclass, but otherwise, the static factory methods * should be preferred. */ protected HttpJsonTelcoAutomationStub( TelcoAutomationStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new HttpJsonTelcoAutomationCallableFactory()); } /** * Constructs an instance of HttpJsonTelcoAutomationStub, using the given settings. This is * protected so that it is easy to make a subclass, but otherwise, the static factory methods * should be preferred. */ protected HttpJsonTelcoAutomationStub( TelcoAutomationStubSettings settings, ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; this.httpJsonOperationsStub = HttpJsonOperationsStub.create( clientContext, callableFactory, typeRegistry, ImmutableMap.builder() .put( "google.longrunning.Operations.CancelOperation", HttpRule.newBuilder() .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") .build()) .put( "google.longrunning.Operations.DeleteOperation", HttpRule.newBuilder() .setDelete("/v1/{name=projects/*/locations/*/operations/*}") .build()) .put( "google.longrunning.Operations.GetOperation", HttpRule.newBuilder() .setGet("/v1/{name=projects/*/locations/*/operations/*}") .build()) .put( "google.longrunning.Operations.ListOperations", HttpRule.newBuilder() .setGet("/v1/{name=projects/*/locations/*/operations}") .build()) .build()); HttpJsonCallSettings listOrchestrationClustersTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listOrchestrationClustersMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getOrchestrationClusterTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getOrchestrationClusterMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createOrchestrationClusterTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createOrchestrationClusterMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteOrchestrationClusterTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteOrchestrationClusterMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listEdgeSlmsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listEdgeSlmsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getEdgeSlmTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getEdgeSlmMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createEdgeSlmTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createEdgeSlmMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteEdgeSlmTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteEdgeSlmMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createBlueprintTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createBlueprintMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateBlueprintTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateBlueprintMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("blueprint.name", String.valueOf(request.getBlueprint().getName())); return builder.build(); }) .build(); HttpJsonCallSettings getBlueprintTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getBlueprintMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteBlueprintTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteBlueprintMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listBlueprintsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listBlueprintsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings approveBlueprintTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(approveBlueprintMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings proposeBlueprintTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(proposeBlueprintMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings rejectBlueprintTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(rejectBlueprintMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listBlueprintRevisionsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listBlueprintRevisionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings searchBlueprintRevisionsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(searchBlueprintRevisionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings searchDeploymentRevisionsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(searchDeploymentRevisionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings discardBlueprintChangesTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(discardBlueprintChangesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listPublicBlueprintsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listPublicBlueprintsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getPublicBlueprintTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getPublicBlueprintMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createDeploymentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createDeploymentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateDeploymentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateDeploymentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("deployment.name", String.valueOf(request.getDeployment().getName())); return builder.build(); }) .build(); HttpJsonCallSettings getDeploymentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getDeploymentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings removeDeploymentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(removeDeploymentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listDeploymentsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listDeploymentsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listDeploymentRevisionsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listDeploymentRevisionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings discardDeploymentChangesTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(discardDeploymentChangesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings applyDeploymentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(applyDeploymentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings computeDeploymentStatusTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(computeDeploymentStatusMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings rollbackDeploymentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(rollbackDeploymentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings getHydratedDeploymentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getHydratedDeploymentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listHydratedDeploymentsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listHydratedDeploymentsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateHydratedDeploymentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateHydratedDeploymentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "hydrated_deployment.name", String.valueOf(request.getHydratedDeployment().getName())); return builder.build(); }) .build(); HttpJsonCallSettings applyHydratedDeploymentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(applyHydratedDeploymentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings getLocationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getLocationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); this.listOrchestrationClustersCallable = callableFactory.createUnaryCallable( listOrchestrationClustersTransportSettings, settings.listOrchestrationClustersSettings(), clientContext); this.listOrchestrationClustersPagedCallable = callableFactory.createPagedCallable( listOrchestrationClustersTransportSettings, settings.listOrchestrationClustersSettings(), clientContext); this.getOrchestrationClusterCallable = callableFactory.createUnaryCallable( getOrchestrationClusterTransportSettings, settings.getOrchestrationClusterSettings(), clientContext); this.createOrchestrationClusterCallable = callableFactory.createUnaryCallable( createOrchestrationClusterTransportSettings, settings.createOrchestrationClusterSettings(), clientContext); this.createOrchestrationClusterOperationCallable = callableFactory.createOperationCallable( createOrchestrationClusterTransportSettings, settings.createOrchestrationClusterOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteOrchestrationClusterCallable = callableFactory.createUnaryCallable( deleteOrchestrationClusterTransportSettings, settings.deleteOrchestrationClusterSettings(), clientContext); this.deleteOrchestrationClusterOperationCallable = callableFactory.createOperationCallable( deleteOrchestrationClusterTransportSettings, settings.deleteOrchestrationClusterOperationSettings(), clientContext, httpJsonOperationsStub); this.listEdgeSlmsCallable = callableFactory.createUnaryCallable( listEdgeSlmsTransportSettings, settings.listEdgeSlmsSettings(), clientContext); this.listEdgeSlmsPagedCallable = callableFactory.createPagedCallable( listEdgeSlmsTransportSettings, settings.listEdgeSlmsSettings(), clientContext); this.getEdgeSlmCallable = callableFactory.createUnaryCallable( getEdgeSlmTransportSettings, settings.getEdgeSlmSettings(), clientContext); this.createEdgeSlmCallable = callableFactory.createUnaryCallable( createEdgeSlmTransportSettings, settings.createEdgeSlmSettings(), clientContext); this.createEdgeSlmOperationCallable = callableFactory.createOperationCallable( createEdgeSlmTransportSettings, settings.createEdgeSlmOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteEdgeSlmCallable = callableFactory.createUnaryCallable( deleteEdgeSlmTransportSettings, settings.deleteEdgeSlmSettings(), clientContext); this.deleteEdgeSlmOperationCallable = callableFactory.createOperationCallable( deleteEdgeSlmTransportSettings, settings.deleteEdgeSlmOperationSettings(), clientContext, httpJsonOperationsStub); this.createBlueprintCallable = callableFactory.createUnaryCallable( createBlueprintTransportSettings, settings.createBlueprintSettings(), clientContext); this.updateBlueprintCallable = callableFactory.createUnaryCallable( updateBlueprintTransportSettings, settings.updateBlueprintSettings(), clientContext); this.getBlueprintCallable = callableFactory.createUnaryCallable( getBlueprintTransportSettings, settings.getBlueprintSettings(), clientContext); this.deleteBlueprintCallable = callableFactory.createUnaryCallable( deleteBlueprintTransportSettings, settings.deleteBlueprintSettings(), clientContext); this.listBlueprintsCallable = callableFactory.createUnaryCallable( listBlueprintsTransportSettings, settings.listBlueprintsSettings(), clientContext); this.listBlueprintsPagedCallable = callableFactory.createPagedCallable( listBlueprintsTransportSettings, settings.listBlueprintsSettings(), clientContext); this.approveBlueprintCallable = callableFactory.createUnaryCallable( approveBlueprintTransportSettings, settings.approveBlueprintSettings(), clientContext); this.proposeBlueprintCallable = callableFactory.createUnaryCallable( proposeBlueprintTransportSettings, settings.proposeBlueprintSettings(), clientContext); this.rejectBlueprintCallable = callableFactory.createUnaryCallable( rejectBlueprintTransportSettings, settings.rejectBlueprintSettings(), clientContext); this.listBlueprintRevisionsCallable = callableFactory.createUnaryCallable( listBlueprintRevisionsTransportSettings, settings.listBlueprintRevisionsSettings(), clientContext); this.listBlueprintRevisionsPagedCallable = callableFactory.createPagedCallable( listBlueprintRevisionsTransportSettings, settings.listBlueprintRevisionsSettings(), clientContext); this.searchBlueprintRevisionsCallable = callableFactory.createUnaryCallable( searchBlueprintRevisionsTransportSettings, settings.searchBlueprintRevisionsSettings(), clientContext); this.searchBlueprintRevisionsPagedCallable = callableFactory.createPagedCallable( searchBlueprintRevisionsTransportSettings, settings.searchBlueprintRevisionsSettings(), clientContext); this.searchDeploymentRevisionsCallable = callableFactory.createUnaryCallable( searchDeploymentRevisionsTransportSettings, settings.searchDeploymentRevisionsSettings(), clientContext); this.searchDeploymentRevisionsPagedCallable = callableFactory.createPagedCallable( searchDeploymentRevisionsTransportSettings, settings.searchDeploymentRevisionsSettings(), clientContext); this.discardBlueprintChangesCallable = callableFactory.createUnaryCallable( discardBlueprintChangesTransportSettings, settings.discardBlueprintChangesSettings(), clientContext); this.listPublicBlueprintsCallable = callableFactory.createUnaryCallable( listPublicBlueprintsTransportSettings, settings.listPublicBlueprintsSettings(), clientContext); this.listPublicBlueprintsPagedCallable = callableFactory.createPagedCallable( listPublicBlueprintsTransportSettings, settings.listPublicBlueprintsSettings(), clientContext); this.getPublicBlueprintCallable = callableFactory.createUnaryCallable( getPublicBlueprintTransportSettings, settings.getPublicBlueprintSettings(), clientContext); this.createDeploymentCallable = callableFactory.createUnaryCallable( createDeploymentTransportSettings, settings.createDeploymentSettings(), clientContext); this.updateDeploymentCallable = callableFactory.createUnaryCallable( updateDeploymentTransportSettings, settings.updateDeploymentSettings(), clientContext); this.getDeploymentCallable = callableFactory.createUnaryCallable( getDeploymentTransportSettings, settings.getDeploymentSettings(), clientContext); this.removeDeploymentCallable = callableFactory.createUnaryCallable( removeDeploymentTransportSettings, settings.removeDeploymentSettings(), clientContext); this.listDeploymentsCallable = callableFactory.createUnaryCallable( listDeploymentsTransportSettings, settings.listDeploymentsSettings(), clientContext); this.listDeploymentsPagedCallable = callableFactory.createPagedCallable( listDeploymentsTransportSettings, settings.listDeploymentsSettings(), clientContext); this.listDeploymentRevisionsCallable = callableFactory.createUnaryCallable( listDeploymentRevisionsTransportSettings, settings.listDeploymentRevisionsSettings(), clientContext); this.listDeploymentRevisionsPagedCallable = callableFactory.createPagedCallable( listDeploymentRevisionsTransportSettings, settings.listDeploymentRevisionsSettings(), clientContext); this.discardDeploymentChangesCallable = callableFactory.createUnaryCallable( discardDeploymentChangesTransportSettings, settings.discardDeploymentChangesSettings(), clientContext); this.applyDeploymentCallable = callableFactory.createUnaryCallable( applyDeploymentTransportSettings, settings.applyDeploymentSettings(), clientContext); this.computeDeploymentStatusCallable = callableFactory.createUnaryCallable( computeDeploymentStatusTransportSettings, settings.computeDeploymentStatusSettings(), clientContext); this.rollbackDeploymentCallable = callableFactory.createUnaryCallable( rollbackDeploymentTransportSettings, settings.rollbackDeploymentSettings(), clientContext); this.getHydratedDeploymentCallable = callableFactory.createUnaryCallable( getHydratedDeploymentTransportSettings, settings.getHydratedDeploymentSettings(), clientContext); this.listHydratedDeploymentsCallable = callableFactory.createUnaryCallable( listHydratedDeploymentsTransportSettings, settings.listHydratedDeploymentsSettings(), clientContext); this.listHydratedDeploymentsPagedCallable = callableFactory.createPagedCallable( listHydratedDeploymentsTransportSettings, settings.listHydratedDeploymentsSettings(), clientContext); this.updateHydratedDeploymentCallable = callableFactory.createUnaryCallable( updateHydratedDeploymentTransportSettings, settings.updateHydratedDeploymentSettings(), clientContext); this.applyHydratedDeploymentCallable = callableFactory.createUnaryCallable( applyHydratedDeploymentTransportSettings, settings.applyHydratedDeploymentSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); this.listLocationsPagedCallable = callableFactory.createPagedCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); this.getLocationCallable = callableFactory.createUnaryCallable( getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @InternalApi public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(listOrchestrationClustersMethodDescriptor); methodDescriptors.add(getOrchestrationClusterMethodDescriptor); methodDescriptors.add(createOrchestrationClusterMethodDescriptor); methodDescriptors.add(deleteOrchestrationClusterMethodDescriptor); methodDescriptors.add(listEdgeSlmsMethodDescriptor); methodDescriptors.add(getEdgeSlmMethodDescriptor); methodDescriptors.add(createEdgeSlmMethodDescriptor); methodDescriptors.add(deleteEdgeSlmMethodDescriptor); methodDescriptors.add(createBlueprintMethodDescriptor); methodDescriptors.add(updateBlueprintMethodDescriptor); methodDescriptors.add(getBlueprintMethodDescriptor); methodDescriptors.add(deleteBlueprintMethodDescriptor); methodDescriptors.add(listBlueprintsMethodDescriptor); methodDescriptors.add(approveBlueprintMethodDescriptor); methodDescriptors.add(proposeBlueprintMethodDescriptor); methodDescriptors.add(rejectBlueprintMethodDescriptor); methodDescriptors.add(listBlueprintRevisionsMethodDescriptor); methodDescriptors.add(searchBlueprintRevisionsMethodDescriptor); methodDescriptors.add(searchDeploymentRevisionsMethodDescriptor); methodDescriptors.add(discardBlueprintChangesMethodDescriptor); methodDescriptors.add(listPublicBlueprintsMethodDescriptor); methodDescriptors.add(getPublicBlueprintMethodDescriptor); methodDescriptors.add(createDeploymentMethodDescriptor); methodDescriptors.add(updateDeploymentMethodDescriptor); methodDescriptors.add(getDeploymentMethodDescriptor); methodDescriptors.add(removeDeploymentMethodDescriptor); methodDescriptors.add(listDeploymentsMethodDescriptor); methodDescriptors.add(listDeploymentRevisionsMethodDescriptor); methodDescriptors.add(discardDeploymentChangesMethodDescriptor); methodDescriptors.add(applyDeploymentMethodDescriptor); methodDescriptors.add(computeDeploymentStatusMethodDescriptor); methodDescriptors.add(rollbackDeploymentMethodDescriptor); methodDescriptors.add(getHydratedDeploymentMethodDescriptor); methodDescriptors.add(listHydratedDeploymentsMethodDescriptor); methodDescriptors.add(updateHydratedDeploymentMethodDescriptor); methodDescriptors.add(applyHydratedDeploymentMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } public HttpJsonOperationsStub getHttpJsonOperationsStub() { return httpJsonOperationsStub; } @Override public UnaryCallable listOrchestrationClustersCallable() { return listOrchestrationClustersCallable; } @Override public UnaryCallable listOrchestrationClustersPagedCallable() { return listOrchestrationClustersPagedCallable; } @Override public UnaryCallable getOrchestrationClusterCallable() { return getOrchestrationClusterCallable; } @Override public UnaryCallable createOrchestrationClusterCallable() { return createOrchestrationClusterCallable; } @Override public OperationCallable< CreateOrchestrationClusterRequest, OrchestrationCluster, OperationMetadata> createOrchestrationClusterOperationCallable() { return createOrchestrationClusterOperationCallable; } @Override public UnaryCallable deleteOrchestrationClusterCallable() { return deleteOrchestrationClusterCallable; } @Override public OperationCallable deleteOrchestrationClusterOperationCallable() { return deleteOrchestrationClusterOperationCallable; } @Override public UnaryCallable listEdgeSlmsCallable() { return listEdgeSlmsCallable; } @Override public UnaryCallable listEdgeSlmsPagedCallable() { return listEdgeSlmsPagedCallable; } @Override public UnaryCallable getEdgeSlmCallable() { return getEdgeSlmCallable; } @Override public UnaryCallable createEdgeSlmCallable() { return createEdgeSlmCallable; } @Override public OperationCallable createEdgeSlmOperationCallable() { return createEdgeSlmOperationCallable; } @Override public UnaryCallable deleteEdgeSlmCallable() { return deleteEdgeSlmCallable; } @Override public OperationCallable deleteEdgeSlmOperationCallable() { return deleteEdgeSlmOperationCallable; } @Override public UnaryCallable createBlueprintCallable() { return createBlueprintCallable; } @Override public UnaryCallable updateBlueprintCallable() { return updateBlueprintCallable; } @Override public UnaryCallable getBlueprintCallable() { return getBlueprintCallable; } @Override public UnaryCallable deleteBlueprintCallable() { return deleteBlueprintCallable; } @Override public UnaryCallable listBlueprintsCallable() { return listBlueprintsCallable; } @Override public UnaryCallable listBlueprintsPagedCallable() { return listBlueprintsPagedCallable; } @Override public UnaryCallable approveBlueprintCallable() { return approveBlueprintCallable; } @Override public UnaryCallable proposeBlueprintCallable() { return proposeBlueprintCallable; } @Override public UnaryCallable rejectBlueprintCallable() { return rejectBlueprintCallable; } @Override public UnaryCallable listBlueprintRevisionsCallable() { return listBlueprintRevisionsCallable; } @Override public UnaryCallable listBlueprintRevisionsPagedCallable() { return listBlueprintRevisionsPagedCallable; } @Override public UnaryCallable searchBlueprintRevisionsCallable() { return searchBlueprintRevisionsCallable; } @Override public UnaryCallable searchBlueprintRevisionsPagedCallable() { return searchBlueprintRevisionsPagedCallable; } @Override public UnaryCallable searchDeploymentRevisionsCallable() { return searchDeploymentRevisionsCallable; } @Override public UnaryCallable searchDeploymentRevisionsPagedCallable() { return searchDeploymentRevisionsPagedCallable; } @Override public UnaryCallable discardBlueprintChangesCallable() { return discardBlueprintChangesCallable; } @Override public UnaryCallable listPublicBlueprintsCallable() { return listPublicBlueprintsCallable; } @Override public UnaryCallable listPublicBlueprintsPagedCallable() { return listPublicBlueprintsPagedCallable; } @Override public UnaryCallable getPublicBlueprintCallable() { return getPublicBlueprintCallable; } @Override public UnaryCallable createDeploymentCallable() { return createDeploymentCallable; } @Override public UnaryCallable updateDeploymentCallable() { return updateDeploymentCallable; } @Override public UnaryCallable getDeploymentCallable() { return getDeploymentCallable; } @Override public UnaryCallable removeDeploymentCallable() { return removeDeploymentCallable; } @Override public UnaryCallable listDeploymentsCallable() { return listDeploymentsCallable; } @Override public UnaryCallable listDeploymentsPagedCallable() { return listDeploymentsPagedCallable; } @Override public UnaryCallable listDeploymentRevisionsCallable() { return listDeploymentRevisionsCallable; } @Override public UnaryCallable listDeploymentRevisionsPagedCallable() { return listDeploymentRevisionsPagedCallable; } @Override public UnaryCallable discardDeploymentChangesCallable() { return discardDeploymentChangesCallable; } @Override public UnaryCallable applyDeploymentCallable() { return applyDeploymentCallable; } @Override public UnaryCallable computeDeploymentStatusCallable() { return computeDeploymentStatusCallable; } @Override public UnaryCallable rollbackDeploymentCallable() { return rollbackDeploymentCallable; } @Override public UnaryCallable getHydratedDeploymentCallable() { return getHydratedDeploymentCallable; } @Override public UnaryCallable listHydratedDeploymentsCallable() { return listHydratedDeploymentsCallable; } @Override public UnaryCallable listHydratedDeploymentsPagedCallable() { return listHydratedDeploymentsPagedCallable; } @Override public UnaryCallable updateHydratedDeploymentCallable() { return updateHydratedDeploymentCallable; } @Override public UnaryCallable applyHydratedDeploymentCallable() { return applyHydratedDeploymentCallable; } @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; } @Override public UnaryCallable listLocationsPagedCallable() { return listLocationsPagedCallable; } @Override public UnaryCallable getLocationCallable() { return getLocationCallable; } @Override public final void close() { try { backgroundResources.close(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new IllegalStateException("Failed to close resource", e); } } @Override public void shutdown() { backgroundResources.shutdown(); } @Override public boolean isShutdown() { return backgroundResources.isShutdown(); } @Override public boolean isTerminated() { return backgroundResources.isTerminated(); } @Override public void shutdownNow() { backgroundResources.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return backgroundResources.awaitTermination(duration, unit); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy