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

com.google.cloud.netapp.v1.stub.HttpJsonNetAppStub Maven / Gradle / Ivy

Go to download

NetApp API Google Cloud NetApp Volumes is a fully-managed, cloud-based data storage service that provides advanced data management capabilities and highly scalable performance with global availability.

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

import static com.google.cloud.netapp.v1.NetAppClient.ListActiveDirectoriesPagedResponse;
import static com.google.cloud.netapp.v1.NetAppClient.ListBackupPoliciesPagedResponse;
import static com.google.cloud.netapp.v1.NetAppClient.ListBackupVaultsPagedResponse;
import static com.google.cloud.netapp.v1.NetAppClient.ListBackupsPagedResponse;
import static com.google.cloud.netapp.v1.NetAppClient.ListKmsConfigsPagedResponse;
import static com.google.cloud.netapp.v1.NetAppClient.ListLocationsPagedResponse;
import static com.google.cloud.netapp.v1.NetAppClient.ListReplicationsPagedResponse;
import static com.google.cloud.netapp.v1.NetAppClient.ListSnapshotsPagedResponse;
import static com.google.cloud.netapp.v1.NetAppClient.ListStoragePoolsPagedResponse;
import static com.google.cloud.netapp.v1.NetAppClient.ListVolumesPagedResponse;

import com.google.api.HttpRule;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
import com.google.api.gax.httpjson.ApiMethodDescriptor;
import com.google.api.gax.httpjson.HttpJsonCallSettings;
import com.google.api.gax.httpjson.HttpJsonOperationSnapshot;
import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
import com.google.api.gax.httpjson.ProtoMessageResponseParser;
import com.google.api.gax.httpjson.ProtoRestSerializer;
import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.netapp.v1.ActiveDirectory;
import com.google.cloud.netapp.v1.Backup;
import com.google.cloud.netapp.v1.BackupPolicy;
import com.google.cloud.netapp.v1.BackupVault;
import com.google.cloud.netapp.v1.CreateActiveDirectoryRequest;
import com.google.cloud.netapp.v1.CreateBackupPolicyRequest;
import com.google.cloud.netapp.v1.CreateBackupRequest;
import com.google.cloud.netapp.v1.CreateBackupVaultRequest;
import com.google.cloud.netapp.v1.CreateKmsConfigRequest;
import com.google.cloud.netapp.v1.CreateReplicationRequest;
import com.google.cloud.netapp.v1.CreateSnapshotRequest;
import com.google.cloud.netapp.v1.CreateStoragePoolRequest;
import com.google.cloud.netapp.v1.CreateVolumeRequest;
import com.google.cloud.netapp.v1.DeleteActiveDirectoryRequest;
import com.google.cloud.netapp.v1.DeleteBackupPolicyRequest;
import com.google.cloud.netapp.v1.DeleteBackupRequest;
import com.google.cloud.netapp.v1.DeleteBackupVaultRequest;
import com.google.cloud.netapp.v1.DeleteKmsConfigRequest;
import com.google.cloud.netapp.v1.DeleteReplicationRequest;
import com.google.cloud.netapp.v1.DeleteSnapshotRequest;
import com.google.cloud.netapp.v1.DeleteStoragePoolRequest;
import com.google.cloud.netapp.v1.DeleteVolumeRequest;
import com.google.cloud.netapp.v1.EncryptVolumesRequest;
import com.google.cloud.netapp.v1.GetActiveDirectoryRequest;
import com.google.cloud.netapp.v1.GetBackupPolicyRequest;
import com.google.cloud.netapp.v1.GetBackupRequest;
import com.google.cloud.netapp.v1.GetBackupVaultRequest;
import com.google.cloud.netapp.v1.GetKmsConfigRequest;
import com.google.cloud.netapp.v1.GetReplicationRequest;
import com.google.cloud.netapp.v1.GetSnapshotRequest;
import com.google.cloud.netapp.v1.GetStoragePoolRequest;
import com.google.cloud.netapp.v1.GetVolumeRequest;
import com.google.cloud.netapp.v1.KmsConfig;
import com.google.cloud.netapp.v1.ListActiveDirectoriesRequest;
import com.google.cloud.netapp.v1.ListActiveDirectoriesResponse;
import com.google.cloud.netapp.v1.ListBackupPoliciesRequest;
import com.google.cloud.netapp.v1.ListBackupPoliciesResponse;
import com.google.cloud.netapp.v1.ListBackupVaultsRequest;
import com.google.cloud.netapp.v1.ListBackupVaultsResponse;
import com.google.cloud.netapp.v1.ListBackupsRequest;
import com.google.cloud.netapp.v1.ListBackupsResponse;
import com.google.cloud.netapp.v1.ListKmsConfigsRequest;
import com.google.cloud.netapp.v1.ListKmsConfigsResponse;
import com.google.cloud.netapp.v1.ListReplicationsRequest;
import com.google.cloud.netapp.v1.ListReplicationsResponse;
import com.google.cloud.netapp.v1.ListSnapshotsRequest;
import com.google.cloud.netapp.v1.ListSnapshotsResponse;
import com.google.cloud.netapp.v1.ListStoragePoolsRequest;
import com.google.cloud.netapp.v1.ListStoragePoolsResponse;
import com.google.cloud.netapp.v1.ListVolumesRequest;
import com.google.cloud.netapp.v1.ListVolumesResponse;
import com.google.cloud.netapp.v1.OperationMetadata;
import com.google.cloud.netapp.v1.Replication;
import com.google.cloud.netapp.v1.ResumeReplicationRequest;
import com.google.cloud.netapp.v1.ReverseReplicationDirectionRequest;
import com.google.cloud.netapp.v1.RevertVolumeRequest;
import com.google.cloud.netapp.v1.Snapshot;
import com.google.cloud.netapp.v1.StopReplicationRequest;
import com.google.cloud.netapp.v1.StoragePool;
import com.google.cloud.netapp.v1.UpdateActiveDirectoryRequest;
import com.google.cloud.netapp.v1.UpdateBackupPolicyRequest;
import com.google.cloud.netapp.v1.UpdateBackupRequest;
import com.google.cloud.netapp.v1.UpdateBackupVaultRequest;
import com.google.cloud.netapp.v1.UpdateKmsConfigRequest;
import com.google.cloud.netapp.v1.UpdateReplicationRequest;
import com.google.cloud.netapp.v1.UpdateSnapshotRequest;
import com.google.cloud.netapp.v1.UpdateStoragePoolRequest;
import com.google.cloud.netapp.v1.UpdateVolumeRequest;
import com.google.cloud.netapp.v1.VerifyKmsConfigRequest;
import com.google.cloud.netapp.v1.VerifyKmsConfigResponse;
import com.google.cloud.netapp.v1.Volume;
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 NetApp service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class HttpJsonNetAppStub extends NetAppStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(StoragePool.getDescriptor()) .add(Empty.getDescriptor()) .add(OperationMetadata.getDescriptor()) .add(BackupPolicy.getDescriptor()) .add(Volume.getDescriptor()) .add(KmsConfig.getDescriptor()) .add(Snapshot.getDescriptor()) .add(BackupVault.getDescriptor()) .add(ActiveDirectory.getDescriptor()) .add(Replication.getDescriptor()) .add(Backup.getDescriptor()) .build(); private static final ApiMethodDescriptor listStoragePoolsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ListStoragePools") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/storagePools", 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(ListStoragePoolsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createStoragePoolMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateStoragePool") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/storagePools", 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, "storagePoolId", request.getStoragePoolId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("storagePool", request.getStoragePool(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateStoragePoolRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getStoragePoolMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/GetStoragePool") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/storagePools/*}", 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(StoragePool.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateStoragePoolMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateStoragePool") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{storagePool.name=projects/*/locations/*/storagePools/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "storagePool.name", request.getStoragePool().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("storagePool", request.getStoragePool(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateStoragePoolRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteStoragePoolMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteStoragePool") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/storagePools/*}", 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( (DeleteStoragePoolRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listVolumesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ListVolumes") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/volumes", 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(ListVolumesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getVolumeMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/GetVolume") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/volumes/*}", 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(Volume.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createVolumeMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateVolume") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/volumes", 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, "volumeId", request.getVolumeId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("volume", request.getVolume(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateVolumeRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateVolumeMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateVolume") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{volume.name=projects/*/locations/*/volumes/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "volume.name", request.getVolume().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("volume", request.getVolume(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateVolumeRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteVolumeMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteVolume") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/volumes/*}", 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, "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( (DeleteVolumeRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor revertVolumeMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/RevertVolume") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/volumes/*}:revert", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (RevertVolumeRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listSnapshotsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ListSnapshots") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", 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(ListSnapshotsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getSnapshotMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/GetSnapshot") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}", 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(Snapshot.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createSnapshotMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateSnapshot") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/volumes/*}/snapshots", 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, "snapshotId", request.getSnapshotId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("snapshot", request.getSnapshot(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateSnapshotRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteSnapshotMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteSnapshot") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}", 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( (DeleteSnapshotRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateSnapshotMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateSnapshot") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "snapshot.name", request.getSnapshot().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("snapshot", request.getSnapshot(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateSnapshotRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor< ListActiveDirectoriesRequest, ListActiveDirectoriesResponse> listActiveDirectoriesMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ListActiveDirectories") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/activeDirectories", 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(ListActiveDirectoriesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getActiveDirectoryMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/GetActiveDirectory") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/activeDirectories/*}", 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(ActiveDirectory.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createActiveDirectoryMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateActiveDirectory") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/activeDirectories", 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, "activeDirectoryId", request.getActiveDirectoryId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("activeDirectory", request.getActiveDirectory(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateActiveDirectoryRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateActiveDirectoryMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateActiveDirectory") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{activeDirectory.name=projects/*/locations/*/activeDirectories/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "activeDirectory.name", request.getActiveDirectory().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("activeDirectory", request.getActiveDirectory(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateActiveDirectoryRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteActiveDirectoryMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteActiveDirectory") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/activeDirectories/*}", 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( (DeleteActiveDirectoryRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listKmsConfigsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ListKmsConfigs") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/kmsConfigs", 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(ListKmsConfigsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createKmsConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateKmsConfig") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/kmsConfigs", 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, "kmsConfigId", request.getKmsConfigId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("kmsConfig", request.getKmsConfig(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateKmsConfigRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getKmsConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/GetKmsConfig") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/kmsConfigs/*}", 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(KmsConfig.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateKmsConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateKmsConfig") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{kmsConfig.name=projects/*/locations/*/kmsConfigs/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "kmsConfig.name", request.getKmsConfig().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("kmsConfig", request.getKmsConfig(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateKmsConfigRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor encryptVolumesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/EncryptVolumes") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (EncryptVolumesRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor verifyKmsConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/VerifyKmsConfig") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(VerifyKmsConfigResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteKmsConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteKmsConfig") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/kmsConfigs/*}", 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( (DeleteKmsConfigRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listReplicationsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ListReplications") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/volumes/*}/replications", 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(ListReplicationsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getReplicationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/GetReplication") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/volumes/*/replications/*}", 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(Replication.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createReplicationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateReplication") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/volumes/*}/replications", 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, "replicationId", request.getReplicationId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("replication", request.getReplication(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateReplicationRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteReplicationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteReplication") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/volumes/*/replications/*}", 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( (DeleteReplicationRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateReplicationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateReplication") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "replication.name", request.getReplication().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("replication", request.getReplication(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateReplicationRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor stopReplicationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/StopReplication") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (StopReplicationRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor resumeReplicationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ResumeReplication") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (ResumeReplicationRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor reverseReplicationDirectionMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ReverseReplicationDirection") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (ReverseReplicationDirectionRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createBackupVaultMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateBackupVault") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/backupVaults", 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, "backupVaultId", request.getBackupVaultId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("backupVault", request.getBackupVault(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateBackupVaultRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getBackupVaultMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/GetBackupVault") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupVaults/*}", 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(BackupVault.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listBackupVaultsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ListBackupVaults") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/backupVaults", 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(ListBackupVaultsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateBackupVaultMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateBackupVault") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{backupVault.name=projects/*/locations/*/backupVaults/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "backupVault.name", request.getBackupVault().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("backupVault", request.getBackupVault(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateBackupVaultRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteBackupVaultMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteBackupVault") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupVaults/*}", 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( (DeleteBackupVaultRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createBackupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateBackup") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/backupVaults/*}/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 getBackupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/GetBackup") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupVaults/*/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 listBackupsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ListBackups") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/backupVaults/*}/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 deleteBackupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteBackup") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupVaults/*/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(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteBackupRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateBackupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateBackup") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{backup.name=projects/*/locations/*/backupVaults/*/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 createBackupPolicyMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/CreateBackupPolicy") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/backupPolicies", 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, "backupPolicyId", request.getBackupPolicyId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("backupPolicy", request.getBackupPolicy(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateBackupPolicyRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getBackupPolicyMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/GetBackupPolicy") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupPolicies/*}", 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(BackupPolicy.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listBackupPoliciesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/ListBackupPolicies") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/backupPolicies", 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(ListBackupPoliciesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateBackupPolicyMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/UpdateBackupPolicy") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{backupPolicy.name=projects/*/locations/*/backupPolicies/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "backupPolicy.name", request.getBackupPolicy().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("backupPolicy", request.getBackupPolicy(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateBackupPolicyRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteBackupPolicyMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.netapp.v1.NetApp/DeleteBackupPolicy") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/backupPolicies/*}", 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( (DeleteBackupPolicyRequest 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 listStoragePoolsCallable; private final UnaryCallable listStoragePoolsPagedCallable; private final UnaryCallable createStoragePoolCallable; private final OperationCallable createStoragePoolOperationCallable; private final UnaryCallable getStoragePoolCallable; private final UnaryCallable updateStoragePoolCallable; private final OperationCallable updateStoragePoolOperationCallable; private final UnaryCallable deleteStoragePoolCallable; private final OperationCallable deleteStoragePoolOperationCallable; private final UnaryCallable listVolumesCallable; private final UnaryCallable listVolumesPagedCallable; private final UnaryCallable getVolumeCallable; private final UnaryCallable createVolumeCallable; private final OperationCallable createVolumeOperationCallable; private final UnaryCallable updateVolumeCallable; private final OperationCallable updateVolumeOperationCallable; private final UnaryCallable deleteVolumeCallable; private final OperationCallable deleteVolumeOperationCallable; private final UnaryCallable revertVolumeCallable; private final OperationCallable revertVolumeOperationCallable; private final UnaryCallable listSnapshotsCallable; private final UnaryCallable listSnapshotsPagedCallable; private final UnaryCallable getSnapshotCallable; private final UnaryCallable createSnapshotCallable; private final OperationCallable createSnapshotOperationCallable; private final UnaryCallable deleteSnapshotCallable; private final OperationCallable deleteSnapshotOperationCallable; private final UnaryCallable updateSnapshotCallable; private final OperationCallable updateSnapshotOperationCallable; private final UnaryCallable listActiveDirectoriesCallable; private final UnaryCallable listActiveDirectoriesPagedCallable; private final UnaryCallable getActiveDirectoryCallable; private final UnaryCallable createActiveDirectoryCallable; private final OperationCallable createActiveDirectoryOperationCallable; private final UnaryCallable updateActiveDirectoryCallable; private final OperationCallable updateActiveDirectoryOperationCallable; private final UnaryCallable deleteActiveDirectoryCallable; private final OperationCallable deleteActiveDirectoryOperationCallable; private final UnaryCallable listKmsConfigsCallable; private final UnaryCallable listKmsConfigsPagedCallable; private final UnaryCallable createKmsConfigCallable; private final OperationCallable createKmsConfigOperationCallable; private final UnaryCallable getKmsConfigCallable; private final UnaryCallable updateKmsConfigCallable; private final OperationCallable updateKmsConfigOperationCallable; private final UnaryCallable encryptVolumesCallable; private final OperationCallable encryptVolumesOperationCallable; private final UnaryCallable verifyKmsConfigCallable; private final UnaryCallable deleteKmsConfigCallable; private final OperationCallable deleteKmsConfigOperationCallable; private final UnaryCallable listReplicationsCallable; private final UnaryCallable listReplicationsPagedCallable; private final UnaryCallable getReplicationCallable; private final UnaryCallable createReplicationCallable; private final OperationCallable createReplicationOperationCallable; private final UnaryCallable deleteReplicationCallable; private final OperationCallable deleteReplicationOperationCallable; private final UnaryCallable updateReplicationCallable; private final OperationCallable updateReplicationOperationCallable; private final UnaryCallable stopReplicationCallable; private final OperationCallable stopReplicationOperationCallable; private final UnaryCallable resumeReplicationCallable; private final OperationCallable resumeReplicationOperationCallable; private final UnaryCallable reverseReplicationDirectionCallable; private final OperationCallable< ReverseReplicationDirectionRequest, Replication, OperationMetadata> reverseReplicationDirectionOperationCallable; private final UnaryCallable createBackupVaultCallable; private final OperationCallable createBackupVaultOperationCallable; private final UnaryCallable getBackupVaultCallable; private final UnaryCallable listBackupVaultsCallable; private final UnaryCallable listBackupVaultsPagedCallable; private final UnaryCallable updateBackupVaultCallable; private final OperationCallable updateBackupVaultOperationCallable; private final UnaryCallable deleteBackupVaultCallable; private final OperationCallable deleteBackupVaultOperationCallable; private final UnaryCallable createBackupCallable; private final OperationCallable createBackupOperationCallable; private final UnaryCallable getBackupCallable; private final UnaryCallable listBackupsCallable; private final UnaryCallable listBackupsPagedCallable; private final UnaryCallable deleteBackupCallable; private final OperationCallable deleteBackupOperationCallable; private final UnaryCallable updateBackupCallable; private final OperationCallable updateBackupOperationCallable; private final UnaryCallable createBackupPolicyCallable; private final OperationCallable createBackupPolicyOperationCallable; private final UnaryCallable getBackupPolicyCallable; private final UnaryCallable listBackupPoliciesCallable; private final UnaryCallable listBackupPoliciesPagedCallable; private final UnaryCallable updateBackupPolicyCallable; private final OperationCallable updateBackupPolicyOperationCallable; private final UnaryCallable deleteBackupPolicyCallable; private final OperationCallable deleteBackupPolicyOperationCallable; 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 HttpJsonNetAppStub create(NetAppStubSettings settings) throws IOException { return new HttpJsonNetAppStub(settings, ClientContext.create(settings)); } public static final HttpJsonNetAppStub create(ClientContext clientContext) throws IOException { return new HttpJsonNetAppStub(NetAppStubSettings.newHttpJsonBuilder().build(), clientContext); } public static final HttpJsonNetAppStub create( ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { return new HttpJsonNetAppStub( NetAppStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of HttpJsonNetAppStub, 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 HttpJsonNetAppStub(NetAppStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new HttpJsonNetAppCallableFactory()); } /** * Constructs an instance of HttpJsonNetAppStub, 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 HttpJsonNetAppStub( NetAppStubSettings 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 listStoragePoolsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listStoragePoolsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings createStoragePoolTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createStoragePoolMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getStoragePoolTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getStoragePoolMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateStoragePoolTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateStoragePoolMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "storage_pool.name", String.valueOf(request.getStoragePool().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteStoragePoolTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteStoragePoolMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listVolumesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listVolumesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getVolumeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getVolumeMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createVolumeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createVolumeMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateVolumeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateVolumeMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("volume.name", String.valueOf(request.getVolume().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteVolumeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteVolumeMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings revertVolumeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(revertVolumeMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listSnapshotsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listSnapshotsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getSnapshotTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getSnapshotMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createSnapshotTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createSnapshotMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteSnapshotTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteSnapshotMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateSnapshotTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateSnapshotMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("snapshot.name", String.valueOf(request.getSnapshot().getName())); return builder.build(); }) .build(); HttpJsonCallSettings listActiveDirectoriesTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listActiveDirectoriesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getActiveDirectoryTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getActiveDirectoryMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createActiveDirectoryTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createActiveDirectoryMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateActiveDirectoryTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateActiveDirectoryMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "active_directory.name", String.valueOf(request.getActiveDirectory().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteActiveDirectoryTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteActiveDirectoryMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listKmsConfigsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listKmsConfigsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings createKmsConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createKmsConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getKmsConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getKmsConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateKmsConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateKmsConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("kms_config.name", String.valueOf(request.getKmsConfig().getName())); return builder.build(); }) .build(); HttpJsonCallSettings encryptVolumesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(encryptVolumesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings verifyKmsConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(verifyKmsConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteKmsConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteKmsConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listReplicationsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listReplicationsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getReplicationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getReplicationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createReplicationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createReplicationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteReplicationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteReplicationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateReplicationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateReplicationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "replication.name", String.valueOf(request.getReplication().getName())); return builder.build(); }) .build(); HttpJsonCallSettings stopReplicationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(stopReplicationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings resumeReplicationTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(resumeReplicationMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings reverseReplicationDirectionTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(reverseReplicationDirectionMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createBackupVaultTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createBackupVaultMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getBackupVaultTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getBackupVaultMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listBackupVaultsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listBackupVaultsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateBackupVaultTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateBackupVaultMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "backup_vault.name", String.valueOf(request.getBackupVault().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteBackupVaultTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteBackupVaultMethodDescriptor) .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 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 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 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 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 createBackupPolicyTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createBackupPolicyMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getBackupPolicyTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getBackupPolicyMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listBackupPoliciesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listBackupPoliciesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateBackupPolicyTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateBackupPolicyMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "backup_policy.name", String.valueOf(request.getBackupPolicy().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteBackupPolicyTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteBackupPolicyMethodDescriptor) .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.listStoragePoolsCallable = callableFactory.createUnaryCallable( listStoragePoolsTransportSettings, settings.listStoragePoolsSettings(), clientContext); this.listStoragePoolsPagedCallable = callableFactory.createPagedCallable( listStoragePoolsTransportSettings, settings.listStoragePoolsSettings(), clientContext); this.createStoragePoolCallable = callableFactory.createUnaryCallable( createStoragePoolTransportSettings, settings.createStoragePoolSettings(), clientContext); this.createStoragePoolOperationCallable = callableFactory.createOperationCallable( createStoragePoolTransportSettings, settings.createStoragePoolOperationSettings(), clientContext, httpJsonOperationsStub); this.getStoragePoolCallable = callableFactory.createUnaryCallable( getStoragePoolTransportSettings, settings.getStoragePoolSettings(), clientContext); this.updateStoragePoolCallable = callableFactory.createUnaryCallable( updateStoragePoolTransportSettings, settings.updateStoragePoolSettings(), clientContext); this.updateStoragePoolOperationCallable = callableFactory.createOperationCallable( updateStoragePoolTransportSettings, settings.updateStoragePoolOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteStoragePoolCallable = callableFactory.createUnaryCallable( deleteStoragePoolTransportSettings, settings.deleteStoragePoolSettings(), clientContext); this.deleteStoragePoolOperationCallable = callableFactory.createOperationCallable( deleteStoragePoolTransportSettings, settings.deleteStoragePoolOperationSettings(), clientContext, httpJsonOperationsStub); this.listVolumesCallable = callableFactory.createUnaryCallable( listVolumesTransportSettings, settings.listVolumesSettings(), clientContext); this.listVolumesPagedCallable = callableFactory.createPagedCallable( listVolumesTransportSettings, settings.listVolumesSettings(), clientContext); this.getVolumeCallable = callableFactory.createUnaryCallable( getVolumeTransportSettings, settings.getVolumeSettings(), clientContext); this.createVolumeCallable = callableFactory.createUnaryCallable( createVolumeTransportSettings, settings.createVolumeSettings(), clientContext); this.createVolumeOperationCallable = callableFactory.createOperationCallable( createVolumeTransportSettings, settings.createVolumeOperationSettings(), clientContext, httpJsonOperationsStub); this.updateVolumeCallable = callableFactory.createUnaryCallable( updateVolumeTransportSettings, settings.updateVolumeSettings(), clientContext); this.updateVolumeOperationCallable = callableFactory.createOperationCallable( updateVolumeTransportSettings, settings.updateVolumeOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteVolumeCallable = callableFactory.createUnaryCallable( deleteVolumeTransportSettings, settings.deleteVolumeSettings(), clientContext); this.deleteVolumeOperationCallable = callableFactory.createOperationCallable( deleteVolumeTransportSettings, settings.deleteVolumeOperationSettings(), clientContext, httpJsonOperationsStub); this.revertVolumeCallable = callableFactory.createUnaryCallable( revertVolumeTransportSettings, settings.revertVolumeSettings(), clientContext); this.revertVolumeOperationCallable = callableFactory.createOperationCallable( revertVolumeTransportSettings, settings.revertVolumeOperationSettings(), clientContext, httpJsonOperationsStub); this.listSnapshotsCallable = callableFactory.createUnaryCallable( listSnapshotsTransportSettings, settings.listSnapshotsSettings(), clientContext); this.listSnapshotsPagedCallable = callableFactory.createPagedCallable( listSnapshotsTransportSettings, settings.listSnapshotsSettings(), clientContext); this.getSnapshotCallable = callableFactory.createUnaryCallable( getSnapshotTransportSettings, settings.getSnapshotSettings(), clientContext); this.createSnapshotCallable = callableFactory.createUnaryCallable( createSnapshotTransportSettings, settings.createSnapshotSettings(), clientContext); this.createSnapshotOperationCallable = callableFactory.createOperationCallable( createSnapshotTransportSettings, settings.createSnapshotOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteSnapshotCallable = callableFactory.createUnaryCallable( deleteSnapshotTransportSettings, settings.deleteSnapshotSettings(), clientContext); this.deleteSnapshotOperationCallable = callableFactory.createOperationCallable( deleteSnapshotTransportSettings, settings.deleteSnapshotOperationSettings(), clientContext, httpJsonOperationsStub); this.updateSnapshotCallable = callableFactory.createUnaryCallable( updateSnapshotTransportSettings, settings.updateSnapshotSettings(), clientContext); this.updateSnapshotOperationCallable = callableFactory.createOperationCallable( updateSnapshotTransportSettings, settings.updateSnapshotOperationSettings(), clientContext, httpJsonOperationsStub); this.listActiveDirectoriesCallable = callableFactory.createUnaryCallable( listActiveDirectoriesTransportSettings, settings.listActiveDirectoriesSettings(), clientContext); this.listActiveDirectoriesPagedCallable = callableFactory.createPagedCallable( listActiveDirectoriesTransportSettings, settings.listActiveDirectoriesSettings(), clientContext); this.getActiveDirectoryCallable = callableFactory.createUnaryCallable( getActiveDirectoryTransportSettings, settings.getActiveDirectorySettings(), clientContext); this.createActiveDirectoryCallable = callableFactory.createUnaryCallable( createActiveDirectoryTransportSettings, settings.createActiveDirectorySettings(), clientContext); this.createActiveDirectoryOperationCallable = callableFactory.createOperationCallable( createActiveDirectoryTransportSettings, settings.createActiveDirectoryOperationSettings(), clientContext, httpJsonOperationsStub); this.updateActiveDirectoryCallable = callableFactory.createUnaryCallable( updateActiveDirectoryTransportSettings, settings.updateActiveDirectorySettings(), clientContext); this.updateActiveDirectoryOperationCallable = callableFactory.createOperationCallable( updateActiveDirectoryTransportSettings, settings.updateActiveDirectoryOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteActiveDirectoryCallable = callableFactory.createUnaryCallable( deleteActiveDirectoryTransportSettings, settings.deleteActiveDirectorySettings(), clientContext); this.deleteActiveDirectoryOperationCallable = callableFactory.createOperationCallable( deleteActiveDirectoryTransportSettings, settings.deleteActiveDirectoryOperationSettings(), clientContext, httpJsonOperationsStub); this.listKmsConfigsCallable = callableFactory.createUnaryCallable( listKmsConfigsTransportSettings, settings.listKmsConfigsSettings(), clientContext); this.listKmsConfigsPagedCallable = callableFactory.createPagedCallable( listKmsConfigsTransportSettings, settings.listKmsConfigsSettings(), clientContext); this.createKmsConfigCallable = callableFactory.createUnaryCallable( createKmsConfigTransportSettings, settings.createKmsConfigSettings(), clientContext); this.createKmsConfigOperationCallable = callableFactory.createOperationCallable( createKmsConfigTransportSettings, settings.createKmsConfigOperationSettings(), clientContext, httpJsonOperationsStub); this.getKmsConfigCallable = callableFactory.createUnaryCallable( getKmsConfigTransportSettings, settings.getKmsConfigSettings(), clientContext); this.updateKmsConfigCallable = callableFactory.createUnaryCallable( updateKmsConfigTransportSettings, settings.updateKmsConfigSettings(), clientContext); this.updateKmsConfigOperationCallable = callableFactory.createOperationCallable( updateKmsConfigTransportSettings, settings.updateKmsConfigOperationSettings(), clientContext, httpJsonOperationsStub); this.encryptVolumesCallable = callableFactory.createUnaryCallable( encryptVolumesTransportSettings, settings.encryptVolumesSettings(), clientContext); this.encryptVolumesOperationCallable = callableFactory.createOperationCallable( encryptVolumesTransportSettings, settings.encryptVolumesOperationSettings(), clientContext, httpJsonOperationsStub); this.verifyKmsConfigCallable = callableFactory.createUnaryCallable( verifyKmsConfigTransportSettings, settings.verifyKmsConfigSettings(), clientContext); this.deleteKmsConfigCallable = callableFactory.createUnaryCallable( deleteKmsConfigTransportSettings, settings.deleteKmsConfigSettings(), clientContext); this.deleteKmsConfigOperationCallable = callableFactory.createOperationCallable( deleteKmsConfigTransportSettings, settings.deleteKmsConfigOperationSettings(), clientContext, httpJsonOperationsStub); this.listReplicationsCallable = callableFactory.createUnaryCallable( listReplicationsTransportSettings, settings.listReplicationsSettings(), clientContext); this.listReplicationsPagedCallable = callableFactory.createPagedCallable( listReplicationsTransportSettings, settings.listReplicationsSettings(), clientContext); this.getReplicationCallable = callableFactory.createUnaryCallable( getReplicationTransportSettings, settings.getReplicationSettings(), clientContext); this.createReplicationCallable = callableFactory.createUnaryCallable( createReplicationTransportSettings, settings.createReplicationSettings(), clientContext); this.createReplicationOperationCallable = callableFactory.createOperationCallable( createReplicationTransportSettings, settings.createReplicationOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteReplicationCallable = callableFactory.createUnaryCallable( deleteReplicationTransportSettings, settings.deleteReplicationSettings(), clientContext); this.deleteReplicationOperationCallable = callableFactory.createOperationCallable( deleteReplicationTransportSettings, settings.deleteReplicationOperationSettings(), clientContext, httpJsonOperationsStub); this.updateReplicationCallable = callableFactory.createUnaryCallable( updateReplicationTransportSettings, settings.updateReplicationSettings(), clientContext); this.updateReplicationOperationCallable = callableFactory.createOperationCallable( updateReplicationTransportSettings, settings.updateReplicationOperationSettings(), clientContext, httpJsonOperationsStub); this.stopReplicationCallable = callableFactory.createUnaryCallable( stopReplicationTransportSettings, settings.stopReplicationSettings(), clientContext); this.stopReplicationOperationCallable = callableFactory.createOperationCallable( stopReplicationTransportSettings, settings.stopReplicationOperationSettings(), clientContext, httpJsonOperationsStub); this.resumeReplicationCallable = callableFactory.createUnaryCallable( resumeReplicationTransportSettings, settings.resumeReplicationSettings(), clientContext); this.resumeReplicationOperationCallable = callableFactory.createOperationCallable( resumeReplicationTransportSettings, settings.resumeReplicationOperationSettings(), clientContext, httpJsonOperationsStub); this.reverseReplicationDirectionCallable = callableFactory.createUnaryCallable( reverseReplicationDirectionTransportSettings, settings.reverseReplicationDirectionSettings(), clientContext); this.reverseReplicationDirectionOperationCallable = callableFactory.createOperationCallable( reverseReplicationDirectionTransportSettings, settings.reverseReplicationDirectionOperationSettings(), clientContext, httpJsonOperationsStub); this.createBackupVaultCallable = callableFactory.createUnaryCallable( createBackupVaultTransportSettings, settings.createBackupVaultSettings(), clientContext); this.createBackupVaultOperationCallable = callableFactory.createOperationCallable( createBackupVaultTransportSettings, settings.createBackupVaultOperationSettings(), clientContext, httpJsonOperationsStub); this.getBackupVaultCallable = callableFactory.createUnaryCallable( getBackupVaultTransportSettings, settings.getBackupVaultSettings(), clientContext); this.listBackupVaultsCallable = callableFactory.createUnaryCallable( listBackupVaultsTransportSettings, settings.listBackupVaultsSettings(), clientContext); this.listBackupVaultsPagedCallable = callableFactory.createPagedCallable( listBackupVaultsTransportSettings, settings.listBackupVaultsSettings(), clientContext); this.updateBackupVaultCallable = callableFactory.createUnaryCallable( updateBackupVaultTransportSettings, settings.updateBackupVaultSettings(), clientContext); this.updateBackupVaultOperationCallable = callableFactory.createOperationCallable( updateBackupVaultTransportSettings, settings.updateBackupVaultOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteBackupVaultCallable = callableFactory.createUnaryCallable( deleteBackupVaultTransportSettings, settings.deleteBackupVaultSettings(), clientContext); this.deleteBackupVaultOperationCallable = callableFactory.createOperationCallable( deleteBackupVaultTransportSettings, settings.deleteBackupVaultOperationSettings(), clientContext, httpJsonOperationsStub); this.createBackupCallable = callableFactory.createUnaryCallable( createBackupTransportSettings, settings.createBackupSettings(), clientContext); this.createBackupOperationCallable = callableFactory.createOperationCallable( createBackupTransportSettings, settings.createBackupOperationSettings(), clientContext, httpJsonOperationsStub); this.getBackupCallable = callableFactory.createUnaryCallable( getBackupTransportSettings, settings.getBackupSettings(), clientContext); this.listBackupsCallable = callableFactory.createUnaryCallable( listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); this.listBackupsPagedCallable = callableFactory.createPagedCallable( listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); this.deleteBackupCallable = callableFactory.createUnaryCallable( deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); this.deleteBackupOperationCallable = callableFactory.createOperationCallable( deleteBackupTransportSettings, settings.deleteBackupOperationSettings(), clientContext, httpJsonOperationsStub); this.updateBackupCallable = callableFactory.createUnaryCallable( updateBackupTransportSettings, settings.updateBackupSettings(), clientContext); this.updateBackupOperationCallable = callableFactory.createOperationCallable( updateBackupTransportSettings, settings.updateBackupOperationSettings(), clientContext, httpJsonOperationsStub); this.createBackupPolicyCallable = callableFactory.createUnaryCallable( createBackupPolicyTransportSettings, settings.createBackupPolicySettings(), clientContext); this.createBackupPolicyOperationCallable = callableFactory.createOperationCallable( createBackupPolicyTransportSettings, settings.createBackupPolicyOperationSettings(), clientContext, httpJsonOperationsStub); this.getBackupPolicyCallable = callableFactory.createUnaryCallable( getBackupPolicyTransportSettings, settings.getBackupPolicySettings(), clientContext); this.listBackupPoliciesCallable = callableFactory.createUnaryCallable( listBackupPoliciesTransportSettings, settings.listBackupPoliciesSettings(), clientContext); this.listBackupPoliciesPagedCallable = callableFactory.createPagedCallable( listBackupPoliciesTransportSettings, settings.listBackupPoliciesSettings(), clientContext); this.updateBackupPolicyCallable = callableFactory.createUnaryCallable( updateBackupPolicyTransportSettings, settings.updateBackupPolicySettings(), clientContext); this.updateBackupPolicyOperationCallable = callableFactory.createOperationCallable( updateBackupPolicyTransportSettings, settings.updateBackupPolicyOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteBackupPolicyCallable = callableFactory.createUnaryCallable( deleteBackupPolicyTransportSettings, settings.deleteBackupPolicySettings(), clientContext); this.deleteBackupPolicyOperationCallable = callableFactory.createOperationCallable( deleteBackupPolicyTransportSettings, settings.deleteBackupPolicyOperationSettings(), 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(listStoragePoolsMethodDescriptor); methodDescriptors.add(createStoragePoolMethodDescriptor); methodDescriptors.add(getStoragePoolMethodDescriptor); methodDescriptors.add(updateStoragePoolMethodDescriptor); methodDescriptors.add(deleteStoragePoolMethodDescriptor); methodDescriptors.add(listVolumesMethodDescriptor); methodDescriptors.add(getVolumeMethodDescriptor); methodDescriptors.add(createVolumeMethodDescriptor); methodDescriptors.add(updateVolumeMethodDescriptor); methodDescriptors.add(deleteVolumeMethodDescriptor); methodDescriptors.add(revertVolumeMethodDescriptor); methodDescriptors.add(listSnapshotsMethodDescriptor); methodDescriptors.add(getSnapshotMethodDescriptor); methodDescriptors.add(createSnapshotMethodDescriptor); methodDescriptors.add(deleteSnapshotMethodDescriptor); methodDescriptors.add(updateSnapshotMethodDescriptor); methodDescriptors.add(listActiveDirectoriesMethodDescriptor); methodDescriptors.add(getActiveDirectoryMethodDescriptor); methodDescriptors.add(createActiveDirectoryMethodDescriptor); methodDescriptors.add(updateActiveDirectoryMethodDescriptor); methodDescriptors.add(deleteActiveDirectoryMethodDescriptor); methodDescriptors.add(listKmsConfigsMethodDescriptor); methodDescriptors.add(createKmsConfigMethodDescriptor); methodDescriptors.add(getKmsConfigMethodDescriptor); methodDescriptors.add(updateKmsConfigMethodDescriptor); methodDescriptors.add(encryptVolumesMethodDescriptor); methodDescriptors.add(verifyKmsConfigMethodDescriptor); methodDescriptors.add(deleteKmsConfigMethodDescriptor); methodDescriptors.add(listReplicationsMethodDescriptor); methodDescriptors.add(getReplicationMethodDescriptor); methodDescriptors.add(createReplicationMethodDescriptor); methodDescriptors.add(deleteReplicationMethodDescriptor); methodDescriptors.add(updateReplicationMethodDescriptor); methodDescriptors.add(stopReplicationMethodDescriptor); methodDescriptors.add(resumeReplicationMethodDescriptor); methodDescriptors.add(reverseReplicationDirectionMethodDescriptor); methodDescriptors.add(createBackupVaultMethodDescriptor); methodDescriptors.add(getBackupVaultMethodDescriptor); methodDescriptors.add(listBackupVaultsMethodDescriptor); methodDescriptors.add(updateBackupVaultMethodDescriptor); methodDescriptors.add(deleteBackupVaultMethodDescriptor); methodDescriptors.add(createBackupMethodDescriptor); methodDescriptors.add(getBackupMethodDescriptor); methodDescriptors.add(listBackupsMethodDescriptor); methodDescriptors.add(deleteBackupMethodDescriptor); methodDescriptors.add(updateBackupMethodDescriptor); methodDescriptors.add(createBackupPolicyMethodDescriptor); methodDescriptors.add(getBackupPolicyMethodDescriptor); methodDescriptors.add(listBackupPoliciesMethodDescriptor); methodDescriptors.add(updateBackupPolicyMethodDescriptor); methodDescriptors.add(deleteBackupPolicyMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } public HttpJsonOperationsStub getHttpJsonOperationsStub() { return httpJsonOperationsStub; } @Override public UnaryCallable listStoragePoolsCallable() { return listStoragePoolsCallable; } @Override public UnaryCallable listStoragePoolsPagedCallable() { return listStoragePoolsPagedCallable; } @Override public UnaryCallable createStoragePoolCallable() { return createStoragePoolCallable; } @Override public OperationCallable createStoragePoolOperationCallable() { return createStoragePoolOperationCallable; } @Override public UnaryCallable getStoragePoolCallable() { return getStoragePoolCallable; } @Override public UnaryCallable updateStoragePoolCallable() { return updateStoragePoolCallable; } @Override public OperationCallable updateStoragePoolOperationCallable() { return updateStoragePoolOperationCallable; } @Override public UnaryCallable deleteStoragePoolCallable() { return deleteStoragePoolCallable; } @Override public OperationCallable deleteStoragePoolOperationCallable() { return deleteStoragePoolOperationCallable; } @Override public UnaryCallable listVolumesCallable() { return listVolumesCallable; } @Override public UnaryCallable listVolumesPagedCallable() { return listVolumesPagedCallable; } @Override public UnaryCallable getVolumeCallable() { return getVolumeCallable; } @Override public UnaryCallable createVolumeCallable() { return createVolumeCallable; } @Override public OperationCallable createVolumeOperationCallable() { return createVolumeOperationCallable; } @Override public UnaryCallable updateVolumeCallable() { return updateVolumeCallable; } @Override public OperationCallable updateVolumeOperationCallable() { return updateVolumeOperationCallable; } @Override public UnaryCallable deleteVolumeCallable() { return deleteVolumeCallable; } @Override public OperationCallable deleteVolumeOperationCallable() { return deleteVolumeOperationCallable; } @Override public UnaryCallable revertVolumeCallable() { return revertVolumeCallable; } @Override public OperationCallable revertVolumeOperationCallable() { return revertVolumeOperationCallable; } @Override public UnaryCallable listSnapshotsCallable() { return listSnapshotsCallable; } @Override public UnaryCallable listSnapshotsPagedCallable() { return listSnapshotsPagedCallable; } @Override public UnaryCallable getSnapshotCallable() { return getSnapshotCallable; } @Override public UnaryCallable createSnapshotCallable() { return createSnapshotCallable; } @Override public OperationCallable createSnapshotOperationCallable() { return createSnapshotOperationCallable; } @Override public UnaryCallable deleteSnapshotCallable() { return deleteSnapshotCallable; } @Override public OperationCallable deleteSnapshotOperationCallable() { return deleteSnapshotOperationCallable; } @Override public UnaryCallable updateSnapshotCallable() { return updateSnapshotCallable; } @Override public OperationCallable updateSnapshotOperationCallable() { return updateSnapshotOperationCallable; } @Override public UnaryCallable listActiveDirectoriesCallable() { return listActiveDirectoriesCallable; } @Override public UnaryCallable listActiveDirectoriesPagedCallable() { return listActiveDirectoriesPagedCallable; } @Override public UnaryCallable getActiveDirectoryCallable() { return getActiveDirectoryCallable; } @Override public UnaryCallable createActiveDirectoryCallable() { return createActiveDirectoryCallable; } @Override public OperationCallable createActiveDirectoryOperationCallable() { return createActiveDirectoryOperationCallable; } @Override public UnaryCallable updateActiveDirectoryCallable() { return updateActiveDirectoryCallable; } @Override public OperationCallable updateActiveDirectoryOperationCallable() { return updateActiveDirectoryOperationCallable; } @Override public UnaryCallable deleteActiveDirectoryCallable() { return deleteActiveDirectoryCallable; } @Override public OperationCallable deleteActiveDirectoryOperationCallable() { return deleteActiveDirectoryOperationCallable; } @Override public UnaryCallable listKmsConfigsCallable() { return listKmsConfigsCallable; } @Override public UnaryCallable listKmsConfigsPagedCallable() { return listKmsConfigsPagedCallable; } @Override public UnaryCallable createKmsConfigCallable() { return createKmsConfigCallable; } @Override public OperationCallable createKmsConfigOperationCallable() { return createKmsConfigOperationCallable; } @Override public UnaryCallable getKmsConfigCallable() { return getKmsConfigCallable; } @Override public UnaryCallable updateKmsConfigCallable() { return updateKmsConfigCallable; } @Override public OperationCallable updateKmsConfigOperationCallable() { return updateKmsConfigOperationCallable; } @Override public UnaryCallable encryptVolumesCallable() { return encryptVolumesCallable; } @Override public OperationCallable encryptVolumesOperationCallable() { return encryptVolumesOperationCallable; } @Override public UnaryCallable verifyKmsConfigCallable() { return verifyKmsConfigCallable; } @Override public UnaryCallable deleteKmsConfigCallable() { return deleteKmsConfigCallable; } @Override public OperationCallable deleteKmsConfigOperationCallable() { return deleteKmsConfigOperationCallable; } @Override public UnaryCallable listReplicationsCallable() { return listReplicationsCallable; } @Override public UnaryCallable listReplicationsPagedCallable() { return listReplicationsPagedCallable; } @Override public UnaryCallable getReplicationCallable() { return getReplicationCallable; } @Override public UnaryCallable createReplicationCallable() { return createReplicationCallable; } @Override public OperationCallable createReplicationOperationCallable() { return createReplicationOperationCallable; } @Override public UnaryCallable deleteReplicationCallable() { return deleteReplicationCallable; } @Override public OperationCallable deleteReplicationOperationCallable() { return deleteReplicationOperationCallable; } @Override public UnaryCallable updateReplicationCallable() { return updateReplicationCallable; } @Override public OperationCallable updateReplicationOperationCallable() { return updateReplicationOperationCallable; } @Override public UnaryCallable stopReplicationCallable() { return stopReplicationCallable; } @Override public OperationCallable stopReplicationOperationCallable() { return stopReplicationOperationCallable; } @Override public UnaryCallable resumeReplicationCallable() { return resumeReplicationCallable; } @Override public OperationCallable resumeReplicationOperationCallable() { return resumeReplicationOperationCallable; } @Override public UnaryCallable reverseReplicationDirectionCallable() { return reverseReplicationDirectionCallable; } @Override public OperationCallable reverseReplicationDirectionOperationCallable() { return reverseReplicationDirectionOperationCallable; } @Override public UnaryCallable createBackupVaultCallable() { return createBackupVaultCallable; } @Override public OperationCallable createBackupVaultOperationCallable() { return createBackupVaultOperationCallable; } @Override public UnaryCallable getBackupVaultCallable() { return getBackupVaultCallable; } @Override public UnaryCallable listBackupVaultsCallable() { return listBackupVaultsCallable; } @Override public UnaryCallable listBackupVaultsPagedCallable() { return listBackupVaultsPagedCallable; } @Override public UnaryCallable updateBackupVaultCallable() { return updateBackupVaultCallable; } @Override public OperationCallable updateBackupVaultOperationCallable() { return updateBackupVaultOperationCallable; } @Override public UnaryCallable deleteBackupVaultCallable() { return deleteBackupVaultCallable; } @Override public OperationCallable deleteBackupVaultOperationCallable() { return deleteBackupVaultOperationCallable; } @Override public UnaryCallable createBackupCallable() { return createBackupCallable; } @Override public OperationCallable createBackupOperationCallable() { return createBackupOperationCallable; } @Override public UnaryCallable getBackupCallable() { return getBackupCallable; } @Override public UnaryCallable listBackupsCallable() { return listBackupsCallable; } @Override public UnaryCallable listBackupsPagedCallable() { return listBackupsPagedCallable; } @Override public UnaryCallable deleteBackupCallable() { return deleteBackupCallable; } @Override public OperationCallable deleteBackupOperationCallable() { return deleteBackupOperationCallable; } @Override public UnaryCallable updateBackupCallable() { return updateBackupCallable; } @Override public OperationCallable updateBackupOperationCallable() { return updateBackupOperationCallable; } @Override public UnaryCallable createBackupPolicyCallable() { return createBackupPolicyCallable; } @Override public OperationCallable createBackupPolicyOperationCallable() { return createBackupPolicyOperationCallable; } @Override public UnaryCallable getBackupPolicyCallable() { return getBackupPolicyCallable; } @Override public UnaryCallable listBackupPoliciesCallable() { return listBackupPoliciesCallable; } @Override public UnaryCallable listBackupPoliciesPagedCallable() { return listBackupPoliciesPagedCallable; } @Override public UnaryCallable updateBackupPolicyCallable() { return updateBackupPolicyCallable; } @Override public OperationCallable updateBackupPolicyOperationCallable() { return updateBackupPolicyOperationCallable; } @Override public UnaryCallable deleteBackupPolicyCallable() { return deleteBackupPolicyCallable; } @Override public OperationCallable deleteBackupPolicyOperationCallable() { return deleteBackupPolicyOperationCallable; } @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