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

com.google.cloud.gkebackup.v1.stub.HttpJsonBackupForGKEStub Maven / Gradle / Ivy

There is a newer version: 0.53.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.gkebackup.v1.stub;

import static com.google.cloud.gkebackup.v1.BackupForGKEClient.ListBackupPlansPagedResponse;
import static com.google.cloud.gkebackup.v1.BackupForGKEClient.ListBackupsPagedResponse;
import static com.google.cloud.gkebackup.v1.BackupForGKEClient.ListLocationsPagedResponse;
import static com.google.cloud.gkebackup.v1.BackupForGKEClient.ListRestorePlansPagedResponse;
import static com.google.cloud.gkebackup.v1.BackupForGKEClient.ListRestoresPagedResponse;
import static com.google.cloud.gkebackup.v1.BackupForGKEClient.ListVolumeBackupsPagedResponse;
import static com.google.cloud.gkebackup.v1.BackupForGKEClient.ListVolumeRestoresPagedResponse;

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.gkebackup.v1.Backup;
import com.google.cloud.gkebackup.v1.BackupPlan;
import com.google.cloud.gkebackup.v1.CreateBackupPlanRequest;
import com.google.cloud.gkebackup.v1.CreateBackupRequest;
import com.google.cloud.gkebackup.v1.CreateRestorePlanRequest;
import com.google.cloud.gkebackup.v1.CreateRestoreRequest;
import com.google.cloud.gkebackup.v1.DeleteBackupPlanRequest;
import com.google.cloud.gkebackup.v1.DeleteBackupRequest;
import com.google.cloud.gkebackup.v1.DeleteRestorePlanRequest;
import com.google.cloud.gkebackup.v1.DeleteRestoreRequest;
import com.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest;
import com.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlResponse;
import com.google.cloud.gkebackup.v1.GetBackupPlanRequest;
import com.google.cloud.gkebackup.v1.GetBackupRequest;
import com.google.cloud.gkebackup.v1.GetRestorePlanRequest;
import com.google.cloud.gkebackup.v1.GetRestoreRequest;
import com.google.cloud.gkebackup.v1.GetVolumeBackupRequest;
import com.google.cloud.gkebackup.v1.GetVolumeRestoreRequest;
import com.google.cloud.gkebackup.v1.ListBackupPlansRequest;
import com.google.cloud.gkebackup.v1.ListBackupPlansResponse;
import com.google.cloud.gkebackup.v1.ListBackupsRequest;
import com.google.cloud.gkebackup.v1.ListBackupsResponse;
import com.google.cloud.gkebackup.v1.ListRestorePlansRequest;
import com.google.cloud.gkebackup.v1.ListRestorePlansResponse;
import com.google.cloud.gkebackup.v1.ListRestoresRequest;
import com.google.cloud.gkebackup.v1.ListRestoresResponse;
import com.google.cloud.gkebackup.v1.ListVolumeBackupsRequest;
import com.google.cloud.gkebackup.v1.ListVolumeBackupsResponse;
import com.google.cloud.gkebackup.v1.ListVolumeRestoresRequest;
import com.google.cloud.gkebackup.v1.ListVolumeRestoresResponse;
import com.google.cloud.gkebackup.v1.OperationMetadata;
import com.google.cloud.gkebackup.v1.Restore;
import com.google.cloud.gkebackup.v1.RestorePlan;
import com.google.cloud.gkebackup.v1.UpdateBackupPlanRequest;
import com.google.cloud.gkebackup.v1.UpdateBackupRequest;
import com.google.cloud.gkebackup.v1.UpdateRestorePlanRequest;
import com.google.cloud.gkebackup.v1.UpdateRestoreRequest;
import com.google.cloud.gkebackup.v1.VolumeBackup;
import com.google.cloud.gkebackup.v1.VolumeRestore;
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.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
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 BackupForGKE service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class HttpJsonBackupForGKEStub extends BackupForGKEStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(BackupPlan.getDescriptor()) .add(Empty.getDescriptor()) .add(Restore.getDescriptor()) .add(RestorePlan.getDescriptor()) .add(Backup.getDescriptor()) .add(OperationMetadata.getDescriptor()) .build(); private static final ApiMethodDescriptor createBackupPlanMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/CreateBackupPlan") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/backupPlans", 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, "backupPlanId", request.getBackupPlanId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("backupPlan", request.getBackupPlan(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateBackupPlanRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listBackupPlansMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/ListBackupPlans") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/backupPlans", 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(ListBackupPlansResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getBackupPlanMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/GetBackupPlan") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupPlans/*}", 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(BackupPlan.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateBackupPlanMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/UpdateBackupPlan") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{backupPlan.name=projects/*/locations/*/backupPlans/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "backupPlan.name", request.getBackupPlan().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("backupPlan", request.getBackupPlan(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateBackupPlanRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteBackupPlanMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/DeleteBackupPlan") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupPlans/*}", 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( (DeleteBackupPlanRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createBackupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/CreateBackup") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/backupPlans/*}/backups", 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, "backupId", request.getBackupId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("backup", request.getBackup(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateBackupRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listBackupsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/ListBackups") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/backupPlans/*}/backups", 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(ListBackupsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getBackupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/GetBackup") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}", 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(Backup.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateBackupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/UpdateBackup") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "backup.name", request.getBackup().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("backup", request.getBackup(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateBackupRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteBackupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/DeleteBackup") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}", 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, "force", request.getForce()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteBackupRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listVolumeBackupsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/ListVolumeBackups") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackups", 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(ListVolumeBackupsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getVolumeBackupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/GetVolumeBackup") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}", 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(VolumeBackup.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createRestorePlanMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/CreateRestorePlan") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/restorePlans", 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, "restorePlanId", request.getRestorePlanId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("restorePlan", request.getRestorePlan(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateRestorePlanRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listRestorePlansMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/ListRestorePlans") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/restorePlans", 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(ListRestorePlansResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getRestorePlanMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/GetRestorePlan") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/restorePlans/*}", 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(RestorePlan.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateRestorePlanMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/UpdateRestorePlan") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{restorePlan.name=projects/*/locations/*/restorePlans/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "restorePlan.name", request.getRestorePlan().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("restorePlan", request.getRestorePlan(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateRestorePlanRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteRestorePlanMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/DeleteRestorePlan") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/restorePlans/*}", 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, "force", request.getForce()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteRestorePlanRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createRestoreMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/CreateRestore") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/restorePlans/*}/restores", 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, "restoreId", request.getRestoreId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("restore", request.getRestore(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateRestoreRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listRestoresMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/ListRestores") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/restorePlans/*}/restores", 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(ListRestoresResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getRestoreMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/GetRestore") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}", 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(Restore.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateRestoreMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/UpdateRestore") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "restore.name", request.getRestore().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("restore", request.getRestore(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateRestoreRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteRestoreMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/DeleteRestore") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}", 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, "force", request.getForce()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteRestoreRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listVolumeRestoresMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/ListVolumeRestores") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestores", 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(ListVolumeRestoresResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getVolumeRestoreMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/GetVolumeRestore") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}", 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(VolumeRestore.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< GetBackupIndexDownloadUrlRequest, GetBackupIndexDownloadUrlResponse> getBackupIndexDownloadUrlMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName("google.cloud.gkebackup.v1.BackupForGKE/GetBackupIndexDownloadUrl") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{backup=projects/*/locations/*/backupPlans/*/backups/*}:getBackupIndexDownloadUrl", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "backup", request.getBackup()); 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(GetBackupIndexDownloadUrlResponse.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 static final ApiMethodDescriptor setIamPolicyMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{resource=projects/*/locations/*/backupPlans/*}:setIamPolicy", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "resource", request.getResource()); return fields; }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:setIamPolicy", "/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:setIamPolicy", "/v1/{resource=projects/*/locations/*/restorePlans/*}:setIamPolicy", "/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:setIamPolicy", "/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}:setIamPolicy") .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().clearResource().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Policy.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getIamPolicyMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{resource=projects/*/locations/*/backupPlans/*}:getIamPolicy", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "resource", request.getResource()); return fields; }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:getIamPolicy", "/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:getIamPolicy", "/v1/{resource=projects/*/locations/*/restorePlans/*}:getIamPolicy", "/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:getIamPolicy", "/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}:getIamPolicy") .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(Policy.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor testIamPermissionsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{resource=projects/*/locations/*/backupPlans/*}:testIamPermissions", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "resource", request.getResource()); return fields; }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*}:testIamPermissions", "/v1/{resource=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}:testIamPermissions", "/v1/{resource=projects/*/locations/*/restorePlans/*}:testIamPermissions", "/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*}:testIamPermissions", "/v1/{resource=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}:testIamPermissions") .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().clearResource().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private final UnaryCallable createBackupPlanCallable; private final OperationCallable createBackupPlanOperationCallable; private final UnaryCallable listBackupPlansCallable; private final UnaryCallable listBackupPlansPagedCallable; private final UnaryCallable getBackupPlanCallable; private final UnaryCallable updateBackupPlanCallable; private final OperationCallable updateBackupPlanOperationCallable; private final UnaryCallable deleteBackupPlanCallable; private final OperationCallable deleteBackupPlanOperationCallable; private final UnaryCallable createBackupCallable; private final OperationCallable createBackupOperationCallable; private final UnaryCallable listBackupsCallable; private final UnaryCallable listBackupsPagedCallable; private final UnaryCallable getBackupCallable; private final UnaryCallable updateBackupCallable; private final OperationCallable updateBackupOperationCallable; private final UnaryCallable deleteBackupCallable; private final OperationCallable deleteBackupOperationCallable; private final UnaryCallable listVolumeBackupsCallable; private final UnaryCallable listVolumeBackupsPagedCallable; private final UnaryCallable getVolumeBackupCallable; private final UnaryCallable createRestorePlanCallable; private final OperationCallable createRestorePlanOperationCallable; private final UnaryCallable listRestorePlansCallable; private final UnaryCallable listRestorePlansPagedCallable; private final UnaryCallable getRestorePlanCallable; private final UnaryCallable updateRestorePlanCallable; private final OperationCallable updateRestorePlanOperationCallable; private final UnaryCallable deleteRestorePlanCallable; private final OperationCallable deleteRestorePlanOperationCallable; private final UnaryCallable createRestoreCallable; private final OperationCallable createRestoreOperationCallable; private final UnaryCallable listRestoresCallable; private final UnaryCallable listRestoresPagedCallable; private final UnaryCallable getRestoreCallable; private final UnaryCallable updateRestoreCallable; private final OperationCallable updateRestoreOperationCallable; private final UnaryCallable deleteRestoreCallable; private final OperationCallable deleteRestoreOperationCallable; private final UnaryCallable listVolumeRestoresCallable; private final UnaryCallable listVolumeRestoresPagedCallable; private final UnaryCallable getVolumeRestoreCallable; private final UnaryCallable getBackupIndexDownloadUrlCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; private final UnaryCallable getLocationCallable; private final UnaryCallable setIamPolicyCallable; private final UnaryCallable getIamPolicyCallable; private final UnaryCallable testIamPermissionsCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; private final HttpJsonStubCallableFactory callableFactory; public static final HttpJsonBackupForGKEStub create(BackupForGKEStubSettings settings) throws IOException { return new HttpJsonBackupForGKEStub(settings, ClientContext.create(settings)); } public static final HttpJsonBackupForGKEStub create(ClientContext clientContext) throws IOException { return new HttpJsonBackupForGKEStub( BackupForGKEStubSettings.newHttpJsonBuilder().build(), clientContext); } public static final HttpJsonBackupForGKEStub create( ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { return new HttpJsonBackupForGKEStub( BackupForGKEStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of HttpJsonBackupForGKEStub, 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 HttpJsonBackupForGKEStub(BackupForGKEStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new HttpJsonBackupForGKECallableFactory()); } /** * Constructs an instance of HttpJsonBackupForGKEStub, 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 HttpJsonBackupForGKEStub( BackupForGKEStubSettings 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 createBackupPlanTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createBackupPlanMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listBackupPlansTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listBackupPlansMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getBackupPlanTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getBackupPlanMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateBackupPlanTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateBackupPlanMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "backup_plan.name", String.valueOf(request.getBackupPlan().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteBackupPlanTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteBackupPlanMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createBackupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createBackupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listBackupsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listBackupsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getBackupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getBackupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateBackupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateBackupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("backup.name", String.valueOf(request.getBackup().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteBackupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteBackupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listVolumeBackupsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listVolumeBackupsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getVolumeBackupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getVolumeBackupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createRestorePlanTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createRestorePlanMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listRestorePlansTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listRestorePlansMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getRestorePlanTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getRestorePlanMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateRestorePlanTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateRestorePlanMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "restore_plan.name", String.valueOf(request.getRestorePlan().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteRestorePlanTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteRestorePlanMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createRestoreTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createRestoreMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listRestoresTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listRestoresMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getRestoreTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getRestoreMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateRestoreTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateRestoreMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("restore.name", String.valueOf(request.getRestore().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteRestoreTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteRestoreMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listVolumeRestoresTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listVolumeRestoresMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getVolumeRestoreTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getVolumeRestoreMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings getBackupIndexDownloadUrlTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(getBackupIndexDownloadUrlMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("backup", String.valueOf(request.getBackup())); 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(); HttpJsonCallSettings setIamPolicyTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) .build(); HttpJsonCallSettings getIamPolicyTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) .build(); HttpJsonCallSettings testIamPermissionsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("resource", String.valueOf(request.getResource())); return builder.build(); }) .build(); this.createBackupPlanCallable = callableFactory.createUnaryCallable( createBackupPlanTransportSettings, settings.createBackupPlanSettings(), clientContext); this.createBackupPlanOperationCallable = callableFactory.createOperationCallable( createBackupPlanTransportSettings, settings.createBackupPlanOperationSettings(), clientContext, httpJsonOperationsStub); this.listBackupPlansCallable = callableFactory.createUnaryCallable( listBackupPlansTransportSettings, settings.listBackupPlansSettings(), clientContext); this.listBackupPlansPagedCallable = callableFactory.createPagedCallable( listBackupPlansTransportSettings, settings.listBackupPlansSettings(), clientContext); this.getBackupPlanCallable = callableFactory.createUnaryCallable( getBackupPlanTransportSettings, settings.getBackupPlanSettings(), clientContext); this.updateBackupPlanCallable = callableFactory.createUnaryCallable( updateBackupPlanTransportSettings, settings.updateBackupPlanSettings(), clientContext); this.updateBackupPlanOperationCallable = callableFactory.createOperationCallable( updateBackupPlanTransportSettings, settings.updateBackupPlanOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteBackupPlanCallable = callableFactory.createUnaryCallable( deleteBackupPlanTransportSettings, settings.deleteBackupPlanSettings(), clientContext); this.deleteBackupPlanOperationCallable = callableFactory.createOperationCallable( deleteBackupPlanTransportSettings, settings.deleteBackupPlanOperationSettings(), clientContext, httpJsonOperationsStub); this.createBackupCallable = callableFactory.createUnaryCallable( createBackupTransportSettings, settings.createBackupSettings(), clientContext); this.createBackupOperationCallable = callableFactory.createOperationCallable( createBackupTransportSettings, settings.createBackupOperationSettings(), clientContext, httpJsonOperationsStub); this.listBackupsCallable = callableFactory.createUnaryCallable( listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); this.listBackupsPagedCallable = callableFactory.createPagedCallable( listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); this.getBackupCallable = callableFactory.createUnaryCallable( getBackupTransportSettings, settings.getBackupSettings(), clientContext); this.updateBackupCallable = callableFactory.createUnaryCallable( updateBackupTransportSettings, settings.updateBackupSettings(), clientContext); this.updateBackupOperationCallable = callableFactory.createOperationCallable( updateBackupTransportSettings, settings.updateBackupOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteBackupCallable = callableFactory.createUnaryCallable( deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); this.deleteBackupOperationCallable = callableFactory.createOperationCallable( deleteBackupTransportSettings, settings.deleteBackupOperationSettings(), clientContext, httpJsonOperationsStub); this.listVolumeBackupsCallable = callableFactory.createUnaryCallable( listVolumeBackupsTransportSettings, settings.listVolumeBackupsSettings(), clientContext); this.listVolumeBackupsPagedCallable = callableFactory.createPagedCallable( listVolumeBackupsTransportSettings, settings.listVolumeBackupsSettings(), clientContext); this.getVolumeBackupCallable = callableFactory.createUnaryCallable( getVolumeBackupTransportSettings, settings.getVolumeBackupSettings(), clientContext); this.createRestorePlanCallable = callableFactory.createUnaryCallable( createRestorePlanTransportSettings, settings.createRestorePlanSettings(), clientContext); this.createRestorePlanOperationCallable = callableFactory.createOperationCallable( createRestorePlanTransportSettings, settings.createRestorePlanOperationSettings(), clientContext, httpJsonOperationsStub); this.listRestorePlansCallable = callableFactory.createUnaryCallable( listRestorePlansTransportSettings, settings.listRestorePlansSettings(), clientContext); this.listRestorePlansPagedCallable = callableFactory.createPagedCallable( listRestorePlansTransportSettings, settings.listRestorePlansSettings(), clientContext); this.getRestorePlanCallable = callableFactory.createUnaryCallable( getRestorePlanTransportSettings, settings.getRestorePlanSettings(), clientContext); this.updateRestorePlanCallable = callableFactory.createUnaryCallable( updateRestorePlanTransportSettings, settings.updateRestorePlanSettings(), clientContext); this.updateRestorePlanOperationCallable = callableFactory.createOperationCallable( updateRestorePlanTransportSettings, settings.updateRestorePlanOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteRestorePlanCallable = callableFactory.createUnaryCallable( deleteRestorePlanTransportSettings, settings.deleteRestorePlanSettings(), clientContext); this.deleteRestorePlanOperationCallable = callableFactory.createOperationCallable( deleteRestorePlanTransportSettings, settings.deleteRestorePlanOperationSettings(), clientContext, httpJsonOperationsStub); this.createRestoreCallable = callableFactory.createUnaryCallable( createRestoreTransportSettings, settings.createRestoreSettings(), clientContext); this.createRestoreOperationCallable = callableFactory.createOperationCallable( createRestoreTransportSettings, settings.createRestoreOperationSettings(), clientContext, httpJsonOperationsStub); this.listRestoresCallable = callableFactory.createUnaryCallable( listRestoresTransportSettings, settings.listRestoresSettings(), clientContext); this.listRestoresPagedCallable = callableFactory.createPagedCallable( listRestoresTransportSettings, settings.listRestoresSettings(), clientContext); this.getRestoreCallable = callableFactory.createUnaryCallable( getRestoreTransportSettings, settings.getRestoreSettings(), clientContext); this.updateRestoreCallable = callableFactory.createUnaryCallable( updateRestoreTransportSettings, settings.updateRestoreSettings(), clientContext); this.updateRestoreOperationCallable = callableFactory.createOperationCallable( updateRestoreTransportSettings, settings.updateRestoreOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteRestoreCallable = callableFactory.createUnaryCallable( deleteRestoreTransportSettings, settings.deleteRestoreSettings(), clientContext); this.deleteRestoreOperationCallable = callableFactory.createOperationCallable( deleteRestoreTransportSettings, settings.deleteRestoreOperationSettings(), clientContext, httpJsonOperationsStub); this.listVolumeRestoresCallable = callableFactory.createUnaryCallable( listVolumeRestoresTransportSettings, settings.listVolumeRestoresSettings(), clientContext); this.listVolumeRestoresPagedCallable = callableFactory.createPagedCallable( listVolumeRestoresTransportSettings, settings.listVolumeRestoresSettings(), clientContext); this.getVolumeRestoreCallable = callableFactory.createUnaryCallable( getVolumeRestoreTransportSettings, settings.getVolumeRestoreSettings(), clientContext); this.getBackupIndexDownloadUrlCallable = callableFactory.createUnaryCallable( getBackupIndexDownloadUrlTransportSettings, settings.getBackupIndexDownloadUrlSettings(), 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.setIamPolicyCallable = callableFactory.createUnaryCallable( setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); this.getIamPolicyCallable = callableFactory.createUnaryCallable( getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); this.testIamPermissionsCallable = callableFactory.createUnaryCallable( testIamPermissionsTransportSettings, settings.testIamPermissionsSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @InternalApi public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(createBackupPlanMethodDescriptor); methodDescriptors.add(listBackupPlansMethodDescriptor); methodDescriptors.add(getBackupPlanMethodDescriptor); methodDescriptors.add(updateBackupPlanMethodDescriptor); methodDescriptors.add(deleteBackupPlanMethodDescriptor); methodDescriptors.add(createBackupMethodDescriptor); methodDescriptors.add(listBackupsMethodDescriptor); methodDescriptors.add(getBackupMethodDescriptor); methodDescriptors.add(updateBackupMethodDescriptor); methodDescriptors.add(deleteBackupMethodDescriptor); methodDescriptors.add(listVolumeBackupsMethodDescriptor); methodDescriptors.add(getVolumeBackupMethodDescriptor); methodDescriptors.add(createRestorePlanMethodDescriptor); methodDescriptors.add(listRestorePlansMethodDescriptor); methodDescriptors.add(getRestorePlanMethodDescriptor); methodDescriptors.add(updateRestorePlanMethodDescriptor); methodDescriptors.add(deleteRestorePlanMethodDescriptor); methodDescriptors.add(createRestoreMethodDescriptor); methodDescriptors.add(listRestoresMethodDescriptor); methodDescriptors.add(getRestoreMethodDescriptor); methodDescriptors.add(updateRestoreMethodDescriptor); methodDescriptors.add(deleteRestoreMethodDescriptor); methodDescriptors.add(listVolumeRestoresMethodDescriptor); methodDescriptors.add(getVolumeRestoreMethodDescriptor); methodDescriptors.add(getBackupIndexDownloadUrlMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); methodDescriptors.add(setIamPolicyMethodDescriptor); methodDescriptors.add(getIamPolicyMethodDescriptor); methodDescriptors.add(testIamPermissionsMethodDescriptor); return methodDescriptors; } public HttpJsonOperationsStub getHttpJsonOperationsStub() { return httpJsonOperationsStub; } @Override public UnaryCallable createBackupPlanCallable() { return createBackupPlanCallable; } @Override public OperationCallable createBackupPlanOperationCallable() { return createBackupPlanOperationCallable; } @Override public UnaryCallable listBackupPlansCallable() { return listBackupPlansCallable; } @Override public UnaryCallable listBackupPlansPagedCallable() { return listBackupPlansPagedCallable; } @Override public UnaryCallable getBackupPlanCallable() { return getBackupPlanCallable; } @Override public UnaryCallable updateBackupPlanCallable() { return updateBackupPlanCallable; } @Override public OperationCallable updateBackupPlanOperationCallable() { return updateBackupPlanOperationCallable; } @Override public UnaryCallable deleteBackupPlanCallable() { return deleteBackupPlanCallable; } @Override public OperationCallable deleteBackupPlanOperationCallable() { return deleteBackupPlanOperationCallable; } @Override public UnaryCallable createBackupCallable() { return createBackupCallable; } @Override public OperationCallable createBackupOperationCallable() { return createBackupOperationCallable; } @Override public UnaryCallable listBackupsCallable() { return listBackupsCallable; } @Override public UnaryCallable listBackupsPagedCallable() { return listBackupsPagedCallable; } @Override public UnaryCallable getBackupCallable() { return getBackupCallable; } @Override public UnaryCallable updateBackupCallable() { return updateBackupCallable; } @Override public OperationCallable updateBackupOperationCallable() { return updateBackupOperationCallable; } @Override public UnaryCallable deleteBackupCallable() { return deleteBackupCallable; } @Override public OperationCallable deleteBackupOperationCallable() { return deleteBackupOperationCallable; } @Override public UnaryCallable listVolumeBackupsCallable() { return listVolumeBackupsCallable; } @Override public UnaryCallable listVolumeBackupsPagedCallable() { return listVolumeBackupsPagedCallable; } @Override public UnaryCallable getVolumeBackupCallable() { return getVolumeBackupCallable; } @Override public UnaryCallable createRestorePlanCallable() { return createRestorePlanCallable; } @Override public OperationCallable createRestorePlanOperationCallable() { return createRestorePlanOperationCallable; } @Override public UnaryCallable listRestorePlansCallable() { return listRestorePlansCallable; } @Override public UnaryCallable listRestorePlansPagedCallable() { return listRestorePlansPagedCallable; } @Override public UnaryCallable getRestorePlanCallable() { return getRestorePlanCallable; } @Override public UnaryCallable updateRestorePlanCallable() { return updateRestorePlanCallable; } @Override public OperationCallable updateRestorePlanOperationCallable() { return updateRestorePlanOperationCallable; } @Override public UnaryCallable deleteRestorePlanCallable() { return deleteRestorePlanCallable; } @Override public OperationCallable deleteRestorePlanOperationCallable() { return deleteRestorePlanOperationCallable; } @Override public UnaryCallable createRestoreCallable() { return createRestoreCallable; } @Override public OperationCallable createRestoreOperationCallable() { return createRestoreOperationCallable; } @Override public UnaryCallable listRestoresCallable() { return listRestoresCallable; } @Override public UnaryCallable listRestoresPagedCallable() { return listRestoresPagedCallable; } @Override public UnaryCallable getRestoreCallable() { return getRestoreCallable; } @Override public UnaryCallable updateRestoreCallable() { return updateRestoreCallable; } @Override public OperationCallable updateRestoreOperationCallable() { return updateRestoreOperationCallable; } @Override public UnaryCallable deleteRestoreCallable() { return deleteRestoreCallable; } @Override public OperationCallable deleteRestoreOperationCallable() { return deleteRestoreOperationCallable; } @Override public UnaryCallable listVolumeRestoresCallable() { return listVolumeRestoresCallable; } @Override public UnaryCallable listVolumeRestoresPagedCallable() { return listVolumeRestoresPagedCallable; } @Override public UnaryCallable getVolumeRestoreCallable() { return getVolumeRestoreCallable; } @Override public UnaryCallable getBackupIndexDownloadUrlCallable() { return getBackupIndexDownloadUrlCallable; } @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; } @Override public UnaryCallable listLocationsPagedCallable() { return listLocationsPagedCallable; } @Override public UnaryCallable getLocationCallable() { return getLocationCallable; } @Override public UnaryCallable setIamPolicyCallable() { return setIamPolicyCallable; } @Override public UnaryCallable getIamPolicyCallable() { return getIamPolicyCallable; } @Override public UnaryCallable testIamPermissionsCallable() { return testIamPermissionsCallable; } @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 - 2025 Weber Informatics LLC | Privacy Policy