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

com.google.cloud.certificatemanager.v1.stub.HttpJsonCertificateManagerStub Maven / Gradle / Ivy

Go to download

Certificate Manager lets you acquire and manage TLS (SSL) certificates for use with Cloud Load Balancing.

The 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.certificatemanager.v1.stub;

import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateIssuanceConfigsPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapEntriesPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificateMapsPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListLocationsPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListTrustConfigsPagedResponse;

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.certificatemanager.v1.Certificate;
import com.google.cloud.certificatemanager.v1.CertificateIssuanceConfig;
import com.google.cloud.certificatemanager.v1.CertificateMap;
import com.google.cloud.certificatemanager.v1.CertificateMapEntry;
import com.google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.CreateCertificateRequest;
import com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest;
import com.google.cloud.certificatemanager.v1.CreateTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateRequest;
import com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest;
import com.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.DnsAuthorization;
import com.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateRequest;
import com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest;
import com.google.cloud.certificatemanager.v1.GetTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse;
import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse;
import com.google.cloud.certificatemanager.v1.ListCertificateMapsRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateMapsResponse;
import com.google.cloud.certificatemanager.v1.ListCertificatesRequest;
import com.google.cloud.certificatemanager.v1.ListCertificatesResponse;
import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest;
import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse;
import com.google.cloud.certificatemanager.v1.ListTrustConfigsRequest;
import com.google.cloud.certificatemanager.v1.ListTrustConfigsResponse;
import com.google.cloud.certificatemanager.v1.OperationMetadata;
import com.google.cloud.certificatemanager.v1.TrustConfig;
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.UpdateCertificateRequest;
import com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest;
import com.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest;
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.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 CertificateManager service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class HttpJsonCertificateManagerStub extends CertificateManagerStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(Empty.getDescriptor()) .add(CertificateMap.getDescriptor()) .add(Certificate.getDescriptor()) .add(TrustConfig.getDescriptor()) .add(CertificateMapEntry.getDescriptor()) .add(OperationMetadata.getDescriptor()) .add(CertificateIssuanceConfig.getDescriptor()) .add(DnsAuthorization.getDescriptor()) .build(); private static final ApiMethodDescriptor listCertificatesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/ListCertificates") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/certificates", 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(ListCertificatesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getCertificateMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/GetCertificate") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/certificates/*}", 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(Certificate.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createCertificateMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/CreateCertificate") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/certificates", 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, "certificateId", request.getCertificateId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("certificate", request.getCertificate(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateCertificateRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateCertificateMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/UpdateCertificate") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{certificate.name=projects/*/locations/*/certificates/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "certificate.name", request.getCertificate().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("certificate", request.getCertificate(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateCertificateRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteCertificateMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/DeleteCertificate") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/certificates/*}", 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(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteCertificateRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listCertificateMapsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/ListCertificateMaps") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/certificateMaps", 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(ListCertificateMapsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getCertificateMapMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/GetCertificateMap") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/certificateMaps/*}", 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(CertificateMap.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createCertificateMapMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/CreateCertificateMap") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/certificateMaps", 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, "certificateMapId", request.getCertificateMapId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("certificateMap", request.getCertificateMap(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateCertificateMapRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateCertificateMapMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/UpdateCertificateMap") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{certificateMap.name=projects/*/locations/*/certificateMaps/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "certificateMap.name", request.getCertificateMap().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("certificateMap", request.getCertificateMap(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateCertificateMapRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteCertificateMapMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/DeleteCertificateMap") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/certificateMaps/*}", 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(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteCertificateMapRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor< ListCertificateMapEntriesRequest, ListCertificateMapEntriesResponse> listCertificateMapEntriesMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/ListCertificateMapEntries") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries", 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(ListCertificateMapEntriesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getCertificateMapEntryMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/GetCertificateMapEntry") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}", 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(CertificateMapEntry.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createCertificateMapEntryMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/CreateCertificateMapEntry") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries", 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, "certificateMapEntryId", request.getCertificateMapEntryId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody( "certificateMapEntry", request.getCertificateMapEntry(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateCertificateMapEntryRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateCertificateMapEntryMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/UpdateCertificateMapEntry") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{certificateMapEntry.name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "certificateMapEntry.name", request.getCertificateMapEntry().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( "certificateMapEntry", request.getCertificateMapEntry(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateCertificateMapEntryRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteCertificateMapEntryMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/DeleteCertificateMapEntry") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}", 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(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteCertificateMapEntryRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor< ListDnsAuthorizationsRequest, ListDnsAuthorizationsResponse> listDnsAuthorizationsMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/ListDnsAuthorizations") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/dnsAuthorizations", 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(ListDnsAuthorizationsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getDnsAuthorizationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/GetDnsAuthorization") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/dnsAuthorizations/*}", 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(DnsAuthorization.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createDnsAuthorizationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/CreateDnsAuthorization") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/dnsAuthorizations", 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, "dnsAuthorizationId", request.getDnsAuthorizationId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("dnsAuthorization", request.getDnsAuthorization(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateDnsAuthorizationRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateDnsAuthorizationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/UpdateDnsAuthorization") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{dnsAuthorization.name=projects/*/locations/*/dnsAuthorizations/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "dnsAuthorization.name", request.getDnsAuthorization().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("dnsAuthorization", request.getDnsAuthorization(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateDnsAuthorizationRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteDnsAuthorizationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/DeleteDnsAuthorization") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/dnsAuthorizations/*}", 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(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteDnsAuthorizationRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor< ListCertificateIssuanceConfigsRequest, ListCertificateIssuanceConfigsResponse> listCertificateIssuanceConfigsMethodDescriptor = ApiMethodDescriptor . newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/ListCertificateIssuanceConfigs") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/certificateIssuanceConfigs", 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( ListCertificateIssuanceConfigsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< GetCertificateIssuanceConfigRequest, CertificateIssuanceConfig> getCertificateIssuanceConfigMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/GetCertificateIssuanceConfig") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/certificateIssuanceConfigs/*}", 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(CertificateIssuanceConfig.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createCertificateIssuanceConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/CreateCertificateIssuanceConfig") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/certificateIssuanceConfigs", 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, "certificateIssuanceConfigId", request.getCertificateIssuanceConfigId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody( "certificateIssuanceConfig", request.getCertificateIssuanceConfig(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateCertificateIssuanceConfigRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteCertificateIssuanceConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/DeleteCertificateIssuanceConfig") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/certificateIssuanceConfigs/*}", 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(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteCertificateIssuanceConfigRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listTrustConfigsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/ListTrustConfigs") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/trustConfigs", 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(ListTrustConfigsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getTrustConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/GetTrustConfig") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/trustConfigs/*}", 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(TrustConfig.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createTrustConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/CreateTrustConfig") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/trustConfigs", 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, "trustConfigId", request.getTrustConfigId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("trustConfig", request.getTrustConfig(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateTrustConfigRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateTrustConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/UpdateTrustConfig") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{trustConfig.name=projects/*/locations/*/trustConfigs/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "trustConfig.name", request.getTrustConfig().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("trustConfig", request.getTrustConfig(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateTrustConfigRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteTrustConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.certificatemanager.v1.CertificateManager/DeleteTrustConfig") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/trustConfigs/*}", 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, "etag", request.getEtag()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteTrustConfigRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .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 listCertificatesCallable; private final UnaryCallable listCertificatesPagedCallable; private final UnaryCallable getCertificateCallable; private final UnaryCallable createCertificateCallable; private final OperationCallable createCertificateOperationCallable; private final UnaryCallable updateCertificateCallable; private final OperationCallable updateCertificateOperationCallable; private final UnaryCallable deleteCertificateCallable; private final OperationCallable deleteCertificateOperationCallable; private final UnaryCallable listCertificateMapsCallable; private final UnaryCallable listCertificateMapsPagedCallable; private final UnaryCallable getCertificateMapCallable; private final UnaryCallable createCertificateMapCallable; private final OperationCallable createCertificateMapOperationCallable; private final UnaryCallable updateCertificateMapCallable; private final OperationCallable updateCertificateMapOperationCallable; private final UnaryCallable deleteCertificateMapCallable; private final OperationCallable deleteCertificateMapOperationCallable; private final UnaryCallable listCertificateMapEntriesCallable; private final UnaryCallable< ListCertificateMapEntriesRequest, ListCertificateMapEntriesPagedResponse> listCertificateMapEntriesPagedCallable; private final UnaryCallable getCertificateMapEntryCallable; private final UnaryCallable createCertificateMapEntryCallable; private final OperationCallable< CreateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> createCertificateMapEntryOperationCallable; private final UnaryCallable updateCertificateMapEntryCallable; private final OperationCallable< UpdateCertificateMapEntryRequest, CertificateMapEntry, OperationMetadata> updateCertificateMapEntryOperationCallable; private final UnaryCallable deleteCertificateMapEntryCallable; private final OperationCallable deleteCertificateMapEntryOperationCallable; private final UnaryCallable listDnsAuthorizationsCallable; private final UnaryCallable listDnsAuthorizationsPagedCallable; private final UnaryCallable getDnsAuthorizationCallable; private final UnaryCallable createDnsAuthorizationCallable; private final OperationCallable< CreateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> createDnsAuthorizationOperationCallable; private final UnaryCallable updateDnsAuthorizationCallable; private final OperationCallable< UpdateDnsAuthorizationRequest, DnsAuthorization, OperationMetadata> updateDnsAuthorizationOperationCallable; private final UnaryCallable deleteDnsAuthorizationCallable; private final OperationCallable deleteDnsAuthorizationOperationCallable; private final UnaryCallable< ListCertificateIssuanceConfigsRequest, ListCertificateIssuanceConfigsResponse> listCertificateIssuanceConfigsCallable; private final UnaryCallable< ListCertificateIssuanceConfigsRequest, ListCertificateIssuanceConfigsPagedResponse> listCertificateIssuanceConfigsPagedCallable; private final UnaryCallable getCertificateIssuanceConfigCallable; private final UnaryCallable createCertificateIssuanceConfigCallable; private final OperationCallable< CreateCertificateIssuanceConfigRequest, CertificateIssuanceConfig, OperationMetadata> createCertificateIssuanceConfigOperationCallable; private final UnaryCallable deleteCertificateIssuanceConfigCallable; private final OperationCallable deleteCertificateIssuanceConfigOperationCallable; private final UnaryCallable listTrustConfigsCallable; private final UnaryCallable listTrustConfigsPagedCallable; private final UnaryCallable getTrustConfigCallable; private final UnaryCallable createTrustConfigCallable; private final OperationCallable createTrustConfigOperationCallable; private final UnaryCallable updateTrustConfigCallable; private final OperationCallable updateTrustConfigOperationCallable; private final UnaryCallable deleteTrustConfigCallable; private final OperationCallable deleteTrustConfigOperationCallable; 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 HttpJsonCertificateManagerStub create(CertificateManagerStubSettings settings) throws IOException { return new HttpJsonCertificateManagerStub(settings, ClientContext.create(settings)); } public static final HttpJsonCertificateManagerStub create(ClientContext clientContext) throws IOException { return new HttpJsonCertificateManagerStub( CertificateManagerStubSettings.newHttpJsonBuilder().build(), clientContext); } public static final HttpJsonCertificateManagerStub create( ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { return new HttpJsonCertificateManagerStub( CertificateManagerStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of HttpJsonCertificateManagerStub, 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 HttpJsonCertificateManagerStub( CertificateManagerStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new HttpJsonCertificateManagerCallableFactory()); } /** * Constructs an instance of HttpJsonCertificateManagerStub, 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 HttpJsonCertificateManagerStub( CertificateManagerStubSettings 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 listCertificatesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listCertificatesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getCertificateTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getCertificateMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createCertificateTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createCertificateMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateCertificateTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateCertificateMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "certificate.name", String.valueOf(request.getCertificate().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteCertificateTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteCertificateMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listCertificateMapsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listCertificateMapsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getCertificateMapTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getCertificateMapMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createCertificateMapTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createCertificateMapMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateCertificateMapTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateCertificateMapMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "certificate_map.name", String.valueOf(request.getCertificateMap().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteCertificateMapTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteCertificateMapMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listCertificateMapEntriesTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listCertificateMapEntriesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getCertificateMapEntryTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getCertificateMapEntryMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createCertificateMapEntryTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createCertificateMapEntryMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateCertificateMapEntryTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateCertificateMapEntryMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "certificate_map_entry.name", String.valueOf(request.getCertificateMapEntry().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteCertificateMapEntryTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteCertificateMapEntryMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listDnsAuthorizationsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listDnsAuthorizationsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getDnsAuthorizationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getDnsAuthorizationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createDnsAuthorizationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createDnsAuthorizationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateDnsAuthorizationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateDnsAuthorizationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "dns_authorization.name", String.valueOf(request.getDnsAuthorization().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteDnsAuthorizationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteDnsAuthorizationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings< ListCertificateIssuanceConfigsRequest, ListCertificateIssuanceConfigsResponse> listCertificateIssuanceConfigsTransportSettings = HttpJsonCallSettings . newBuilder() .setMethodDescriptor(listCertificateIssuanceConfigsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getCertificateIssuanceConfigTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(getCertificateIssuanceConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createCertificateIssuanceConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createCertificateIssuanceConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteCertificateIssuanceConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteCertificateIssuanceConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listTrustConfigsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listTrustConfigsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getTrustConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getTrustConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createTrustConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createTrustConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateTrustConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateTrustConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "trust_config.name", String.valueOf(request.getTrustConfig().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteTrustConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteTrustConfigMethodDescriptor) .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.listCertificatesCallable = callableFactory.createUnaryCallable( listCertificatesTransportSettings, settings.listCertificatesSettings(), clientContext); this.listCertificatesPagedCallable = callableFactory.createPagedCallable( listCertificatesTransportSettings, settings.listCertificatesSettings(), clientContext); this.getCertificateCallable = callableFactory.createUnaryCallable( getCertificateTransportSettings, settings.getCertificateSettings(), clientContext); this.createCertificateCallable = callableFactory.createUnaryCallable( createCertificateTransportSettings, settings.createCertificateSettings(), clientContext); this.createCertificateOperationCallable = callableFactory.createOperationCallable( createCertificateTransportSettings, settings.createCertificateOperationSettings(), clientContext, httpJsonOperationsStub); this.updateCertificateCallable = callableFactory.createUnaryCallable( updateCertificateTransportSettings, settings.updateCertificateSettings(), clientContext); this.updateCertificateOperationCallable = callableFactory.createOperationCallable( updateCertificateTransportSettings, settings.updateCertificateOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteCertificateCallable = callableFactory.createUnaryCallable( deleteCertificateTransportSettings, settings.deleteCertificateSettings(), clientContext); this.deleteCertificateOperationCallable = callableFactory.createOperationCallable( deleteCertificateTransportSettings, settings.deleteCertificateOperationSettings(), clientContext, httpJsonOperationsStub); this.listCertificateMapsCallable = callableFactory.createUnaryCallable( listCertificateMapsTransportSettings, settings.listCertificateMapsSettings(), clientContext); this.listCertificateMapsPagedCallable = callableFactory.createPagedCallable( listCertificateMapsTransportSettings, settings.listCertificateMapsSettings(), clientContext); this.getCertificateMapCallable = callableFactory.createUnaryCallable( getCertificateMapTransportSettings, settings.getCertificateMapSettings(), clientContext); this.createCertificateMapCallable = callableFactory.createUnaryCallable( createCertificateMapTransportSettings, settings.createCertificateMapSettings(), clientContext); this.createCertificateMapOperationCallable = callableFactory.createOperationCallable( createCertificateMapTransportSettings, settings.createCertificateMapOperationSettings(), clientContext, httpJsonOperationsStub); this.updateCertificateMapCallable = callableFactory.createUnaryCallable( updateCertificateMapTransportSettings, settings.updateCertificateMapSettings(), clientContext); this.updateCertificateMapOperationCallable = callableFactory.createOperationCallable( updateCertificateMapTransportSettings, settings.updateCertificateMapOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteCertificateMapCallable = callableFactory.createUnaryCallable( deleteCertificateMapTransportSettings, settings.deleteCertificateMapSettings(), clientContext); this.deleteCertificateMapOperationCallable = callableFactory.createOperationCallable( deleteCertificateMapTransportSettings, settings.deleteCertificateMapOperationSettings(), clientContext, httpJsonOperationsStub); this.listCertificateMapEntriesCallable = callableFactory.createUnaryCallable( listCertificateMapEntriesTransportSettings, settings.listCertificateMapEntriesSettings(), clientContext); this.listCertificateMapEntriesPagedCallable = callableFactory.createPagedCallable( listCertificateMapEntriesTransportSettings, settings.listCertificateMapEntriesSettings(), clientContext); this.getCertificateMapEntryCallable = callableFactory.createUnaryCallable( getCertificateMapEntryTransportSettings, settings.getCertificateMapEntrySettings(), clientContext); this.createCertificateMapEntryCallable = callableFactory.createUnaryCallable( createCertificateMapEntryTransportSettings, settings.createCertificateMapEntrySettings(), clientContext); this.createCertificateMapEntryOperationCallable = callableFactory.createOperationCallable( createCertificateMapEntryTransportSettings, settings.createCertificateMapEntryOperationSettings(), clientContext, httpJsonOperationsStub); this.updateCertificateMapEntryCallable = callableFactory.createUnaryCallable( updateCertificateMapEntryTransportSettings, settings.updateCertificateMapEntrySettings(), clientContext); this.updateCertificateMapEntryOperationCallable = callableFactory.createOperationCallable( updateCertificateMapEntryTransportSettings, settings.updateCertificateMapEntryOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteCertificateMapEntryCallable = callableFactory.createUnaryCallable( deleteCertificateMapEntryTransportSettings, settings.deleteCertificateMapEntrySettings(), clientContext); this.deleteCertificateMapEntryOperationCallable = callableFactory.createOperationCallable( deleteCertificateMapEntryTransportSettings, settings.deleteCertificateMapEntryOperationSettings(), clientContext, httpJsonOperationsStub); this.listDnsAuthorizationsCallable = callableFactory.createUnaryCallable( listDnsAuthorizationsTransportSettings, settings.listDnsAuthorizationsSettings(), clientContext); this.listDnsAuthorizationsPagedCallable = callableFactory.createPagedCallable( listDnsAuthorizationsTransportSettings, settings.listDnsAuthorizationsSettings(), clientContext); this.getDnsAuthorizationCallable = callableFactory.createUnaryCallable( getDnsAuthorizationTransportSettings, settings.getDnsAuthorizationSettings(), clientContext); this.createDnsAuthorizationCallable = callableFactory.createUnaryCallable( createDnsAuthorizationTransportSettings, settings.createDnsAuthorizationSettings(), clientContext); this.createDnsAuthorizationOperationCallable = callableFactory.createOperationCallable( createDnsAuthorizationTransportSettings, settings.createDnsAuthorizationOperationSettings(), clientContext, httpJsonOperationsStub); this.updateDnsAuthorizationCallable = callableFactory.createUnaryCallable( updateDnsAuthorizationTransportSettings, settings.updateDnsAuthorizationSettings(), clientContext); this.updateDnsAuthorizationOperationCallable = callableFactory.createOperationCallable( updateDnsAuthorizationTransportSettings, settings.updateDnsAuthorizationOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteDnsAuthorizationCallable = callableFactory.createUnaryCallable( deleteDnsAuthorizationTransportSettings, settings.deleteDnsAuthorizationSettings(), clientContext); this.deleteDnsAuthorizationOperationCallable = callableFactory.createOperationCallable( deleteDnsAuthorizationTransportSettings, settings.deleteDnsAuthorizationOperationSettings(), clientContext, httpJsonOperationsStub); this.listCertificateIssuanceConfigsCallable = callableFactory.createUnaryCallable( listCertificateIssuanceConfigsTransportSettings, settings.listCertificateIssuanceConfigsSettings(), clientContext); this.listCertificateIssuanceConfigsPagedCallable = callableFactory.createPagedCallable( listCertificateIssuanceConfigsTransportSettings, settings.listCertificateIssuanceConfigsSettings(), clientContext); this.getCertificateIssuanceConfigCallable = callableFactory.createUnaryCallable( getCertificateIssuanceConfigTransportSettings, settings.getCertificateIssuanceConfigSettings(), clientContext); this.createCertificateIssuanceConfigCallable = callableFactory.createUnaryCallable( createCertificateIssuanceConfigTransportSettings, settings.createCertificateIssuanceConfigSettings(), clientContext); this.createCertificateIssuanceConfigOperationCallable = callableFactory.createOperationCallable( createCertificateIssuanceConfigTransportSettings, settings.createCertificateIssuanceConfigOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteCertificateIssuanceConfigCallable = callableFactory.createUnaryCallable( deleteCertificateIssuanceConfigTransportSettings, settings.deleteCertificateIssuanceConfigSettings(), clientContext); this.deleteCertificateIssuanceConfigOperationCallable = callableFactory.createOperationCallable( deleteCertificateIssuanceConfigTransportSettings, settings.deleteCertificateIssuanceConfigOperationSettings(), clientContext, httpJsonOperationsStub); this.listTrustConfigsCallable = callableFactory.createUnaryCallable( listTrustConfigsTransportSettings, settings.listTrustConfigsSettings(), clientContext); this.listTrustConfigsPagedCallable = callableFactory.createPagedCallable( listTrustConfigsTransportSettings, settings.listTrustConfigsSettings(), clientContext); this.getTrustConfigCallable = callableFactory.createUnaryCallable( getTrustConfigTransportSettings, settings.getTrustConfigSettings(), clientContext); this.createTrustConfigCallable = callableFactory.createUnaryCallable( createTrustConfigTransportSettings, settings.createTrustConfigSettings(), clientContext); this.createTrustConfigOperationCallable = callableFactory.createOperationCallable( createTrustConfigTransportSettings, settings.createTrustConfigOperationSettings(), clientContext, httpJsonOperationsStub); this.updateTrustConfigCallable = callableFactory.createUnaryCallable( updateTrustConfigTransportSettings, settings.updateTrustConfigSettings(), clientContext); this.updateTrustConfigOperationCallable = callableFactory.createOperationCallable( updateTrustConfigTransportSettings, settings.updateTrustConfigOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteTrustConfigCallable = callableFactory.createUnaryCallable( deleteTrustConfigTransportSettings, settings.deleteTrustConfigSettings(), clientContext); this.deleteTrustConfigOperationCallable = callableFactory.createOperationCallable( deleteTrustConfigTransportSettings, settings.deleteTrustConfigOperationSettings(), clientContext, httpJsonOperationsStub); 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(listCertificatesMethodDescriptor); methodDescriptors.add(getCertificateMethodDescriptor); methodDescriptors.add(createCertificateMethodDescriptor); methodDescriptors.add(updateCertificateMethodDescriptor); methodDescriptors.add(deleteCertificateMethodDescriptor); methodDescriptors.add(listCertificateMapsMethodDescriptor); methodDescriptors.add(getCertificateMapMethodDescriptor); methodDescriptors.add(createCertificateMapMethodDescriptor); methodDescriptors.add(updateCertificateMapMethodDescriptor); methodDescriptors.add(deleteCertificateMapMethodDescriptor); methodDescriptors.add(listCertificateMapEntriesMethodDescriptor); methodDescriptors.add(getCertificateMapEntryMethodDescriptor); methodDescriptors.add(createCertificateMapEntryMethodDescriptor); methodDescriptors.add(updateCertificateMapEntryMethodDescriptor); methodDescriptors.add(deleteCertificateMapEntryMethodDescriptor); methodDescriptors.add(listDnsAuthorizationsMethodDescriptor); methodDescriptors.add(getDnsAuthorizationMethodDescriptor); methodDescriptors.add(createDnsAuthorizationMethodDescriptor); methodDescriptors.add(updateDnsAuthorizationMethodDescriptor); methodDescriptors.add(deleteDnsAuthorizationMethodDescriptor); methodDescriptors.add(listCertificateIssuanceConfigsMethodDescriptor); methodDescriptors.add(getCertificateIssuanceConfigMethodDescriptor); methodDescriptors.add(createCertificateIssuanceConfigMethodDescriptor); methodDescriptors.add(deleteCertificateIssuanceConfigMethodDescriptor); methodDescriptors.add(listTrustConfigsMethodDescriptor); methodDescriptors.add(getTrustConfigMethodDescriptor); methodDescriptors.add(createTrustConfigMethodDescriptor); methodDescriptors.add(updateTrustConfigMethodDescriptor); methodDescriptors.add(deleteTrustConfigMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } public HttpJsonOperationsStub getHttpJsonOperationsStub() { return httpJsonOperationsStub; } @Override public UnaryCallable listCertificatesCallable() { return listCertificatesCallable; } @Override public UnaryCallable listCertificatesPagedCallable() { return listCertificatesPagedCallable; } @Override public UnaryCallable getCertificateCallable() { return getCertificateCallable; } @Override public UnaryCallable createCertificateCallable() { return createCertificateCallable; } @Override public OperationCallable createCertificateOperationCallable() { return createCertificateOperationCallable; } @Override public UnaryCallable updateCertificateCallable() { return updateCertificateCallable; } @Override public OperationCallable updateCertificateOperationCallable() { return updateCertificateOperationCallable; } @Override public UnaryCallable deleteCertificateCallable() { return deleteCertificateCallable; } @Override public OperationCallable deleteCertificateOperationCallable() { return deleteCertificateOperationCallable; } @Override public UnaryCallable listCertificateMapsCallable() { return listCertificateMapsCallable; } @Override public UnaryCallable listCertificateMapsPagedCallable() { return listCertificateMapsPagedCallable; } @Override public UnaryCallable getCertificateMapCallable() { return getCertificateMapCallable; } @Override public UnaryCallable createCertificateMapCallable() { return createCertificateMapCallable; } @Override public OperationCallable createCertificateMapOperationCallable() { return createCertificateMapOperationCallable; } @Override public UnaryCallable updateCertificateMapCallable() { return updateCertificateMapCallable; } @Override public OperationCallable updateCertificateMapOperationCallable() { return updateCertificateMapOperationCallable; } @Override public UnaryCallable deleteCertificateMapCallable() { return deleteCertificateMapCallable; } @Override public OperationCallable deleteCertificateMapOperationCallable() { return deleteCertificateMapOperationCallable; } @Override public UnaryCallable listCertificateMapEntriesCallable() { return listCertificateMapEntriesCallable; } @Override public UnaryCallable listCertificateMapEntriesPagedCallable() { return listCertificateMapEntriesPagedCallable; } @Override public UnaryCallable getCertificateMapEntryCallable() { return getCertificateMapEntryCallable; } @Override public UnaryCallable createCertificateMapEntryCallable() { return createCertificateMapEntryCallable; } @Override public OperationCallable createCertificateMapEntryOperationCallable() { return createCertificateMapEntryOperationCallable; } @Override public UnaryCallable updateCertificateMapEntryCallable() { return updateCertificateMapEntryCallable; } @Override public OperationCallable updateCertificateMapEntryOperationCallable() { return updateCertificateMapEntryOperationCallable; } @Override public UnaryCallable deleteCertificateMapEntryCallable() { return deleteCertificateMapEntryCallable; } @Override public OperationCallable deleteCertificateMapEntryOperationCallable() { return deleteCertificateMapEntryOperationCallable; } @Override public UnaryCallable listDnsAuthorizationsCallable() { return listDnsAuthorizationsCallable; } @Override public UnaryCallable listDnsAuthorizationsPagedCallable() { return listDnsAuthorizationsPagedCallable; } @Override public UnaryCallable getDnsAuthorizationCallable() { return getDnsAuthorizationCallable; } @Override public UnaryCallable createDnsAuthorizationCallable() { return createDnsAuthorizationCallable; } @Override public OperationCallable createDnsAuthorizationOperationCallable() { return createDnsAuthorizationOperationCallable; } @Override public UnaryCallable updateDnsAuthorizationCallable() { return updateDnsAuthorizationCallable; } @Override public OperationCallable updateDnsAuthorizationOperationCallable() { return updateDnsAuthorizationOperationCallable; } @Override public UnaryCallable deleteDnsAuthorizationCallable() { return deleteDnsAuthorizationCallable; } @Override public OperationCallable deleteDnsAuthorizationOperationCallable() { return deleteDnsAuthorizationOperationCallable; } @Override public UnaryCallable< ListCertificateIssuanceConfigsRequest, ListCertificateIssuanceConfigsResponse> listCertificateIssuanceConfigsCallable() { return listCertificateIssuanceConfigsCallable; } @Override public UnaryCallable< ListCertificateIssuanceConfigsRequest, ListCertificateIssuanceConfigsPagedResponse> listCertificateIssuanceConfigsPagedCallable() { return listCertificateIssuanceConfigsPagedCallable; } @Override public UnaryCallable getCertificateIssuanceConfigCallable() { return getCertificateIssuanceConfigCallable; } @Override public UnaryCallable createCertificateIssuanceConfigCallable() { return createCertificateIssuanceConfigCallable; } @Override public OperationCallable< CreateCertificateIssuanceConfigRequest, CertificateIssuanceConfig, OperationMetadata> createCertificateIssuanceConfigOperationCallable() { return createCertificateIssuanceConfigOperationCallable; } @Override public UnaryCallable deleteCertificateIssuanceConfigCallable() { return deleteCertificateIssuanceConfigCallable; } @Override public OperationCallable deleteCertificateIssuanceConfigOperationCallable() { return deleteCertificateIssuanceConfigOperationCallable; } @Override public UnaryCallable listTrustConfigsCallable() { return listTrustConfigsCallable; } @Override public UnaryCallable listTrustConfigsPagedCallable() { return listTrustConfigsPagedCallable; } @Override public UnaryCallable getTrustConfigCallable() { return getTrustConfigCallable; } @Override public UnaryCallable createTrustConfigCallable() { return createTrustConfigCallable; } @Override public OperationCallable createTrustConfigOperationCallable() { return createTrustConfigOperationCallable; } @Override public UnaryCallable updateTrustConfigCallable() { return updateTrustConfigCallable; } @Override public OperationCallable updateTrustConfigOperationCallable() { return updateTrustConfigOperationCallable; } @Override public UnaryCallable deleteTrustConfigCallable() { return deleteTrustConfigCallable; } @Override public OperationCallable deleteTrustConfigOperationCallable() { return deleteTrustConfigOperationCallable; } @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