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

com.google.cloud.migrationcenter.v1.stub.HttpJsonMigrationCenterStub Maven / Gradle / Ivy

Go to download

Migration Center API Google Cloud Migration Center is a unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud

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

import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListAssetsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListErrorFramesPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListGroupsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportDataFilesPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportJobsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListLocationsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListPreferenceSetsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportConfigsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListSourcesPagedResponse;

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.migrationcenter.v1.AddAssetsToGroupRequest;
import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest;
import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse;
import com.google.cloud.migrationcenter.v1.Asset;
import com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest;
import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest;
import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse;
import com.google.cloud.migrationcenter.v1.CreateGroupRequest;
import com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest;
import com.google.cloud.migrationcenter.v1.CreateImportJobRequest;
import com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest;
import com.google.cloud.migrationcenter.v1.CreateReportConfigRequest;
import com.google.cloud.migrationcenter.v1.CreateReportRequest;
import com.google.cloud.migrationcenter.v1.CreateSourceRequest;
import com.google.cloud.migrationcenter.v1.DeleteAssetRequest;
import com.google.cloud.migrationcenter.v1.DeleteGroupRequest;
import com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest;
import com.google.cloud.migrationcenter.v1.DeleteImportJobRequest;
import com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest;
import com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest;
import com.google.cloud.migrationcenter.v1.DeleteReportRequest;
import com.google.cloud.migrationcenter.v1.DeleteSourceRequest;
import com.google.cloud.migrationcenter.v1.ErrorFrame;
import com.google.cloud.migrationcenter.v1.GetAssetRequest;
import com.google.cloud.migrationcenter.v1.GetErrorFrameRequest;
import com.google.cloud.migrationcenter.v1.GetGroupRequest;
import com.google.cloud.migrationcenter.v1.GetImportDataFileRequest;
import com.google.cloud.migrationcenter.v1.GetImportJobRequest;
import com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest;
import com.google.cloud.migrationcenter.v1.GetReportConfigRequest;
import com.google.cloud.migrationcenter.v1.GetReportRequest;
import com.google.cloud.migrationcenter.v1.GetSettingsRequest;
import com.google.cloud.migrationcenter.v1.GetSourceRequest;
import com.google.cloud.migrationcenter.v1.Group;
import com.google.cloud.migrationcenter.v1.ImportDataFile;
import com.google.cloud.migrationcenter.v1.ImportJob;
import com.google.cloud.migrationcenter.v1.ListAssetsRequest;
import com.google.cloud.migrationcenter.v1.ListAssetsResponse;
import com.google.cloud.migrationcenter.v1.ListErrorFramesRequest;
import com.google.cloud.migrationcenter.v1.ListErrorFramesResponse;
import com.google.cloud.migrationcenter.v1.ListGroupsRequest;
import com.google.cloud.migrationcenter.v1.ListGroupsResponse;
import com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest;
import com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse;
import com.google.cloud.migrationcenter.v1.ListImportJobsRequest;
import com.google.cloud.migrationcenter.v1.ListImportJobsResponse;
import com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest;
import com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse;
import com.google.cloud.migrationcenter.v1.ListReportConfigsRequest;
import com.google.cloud.migrationcenter.v1.ListReportConfigsResponse;
import com.google.cloud.migrationcenter.v1.ListReportsRequest;
import com.google.cloud.migrationcenter.v1.ListReportsResponse;
import com.google.cloud.migrationcenter.v1.ListSourcesRequest;
import com.google.cloud.migrationcenter.v1.ListSourcesResponse;
import com.google.cloud.migrationcenter.v1.OperationMetadata;
import com.google.cloud.migrationcenter.v1.PreferenceSet;
import com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest;
import com.google.cloud.migrationcenter.v1.Report;
import com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest;
import com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse;
import com.google.cloud.migrationcenter.v1.ReportConfig;
import com.google.cloud.migrationcenter.v1.RunImportJobRequest;
import com.google.cloud.migrationcenter.v1.Settings;
import com.google.cloud.migrationcenter.v1.Source;
import com.google.cloud.migrationcenter.v1.UpdateAssetRequest;
import com.google.cloud.migrationcenter.v1.UpdateGroupRequest;
import com.google.cloud.migrationcenter.v1.UpdateImportJobRequest;
import com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest;
import com.google.cloud.migrationcenter.v1.UpdateSettingsRequest;
import com.google.cloud.migrationcenter.v1.UpdateSourceRequest;
import com.google.cloud.migrationcenter.v1.ValidateImportJobRequest;
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 MigrationCenter service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class HttpJsonMigrationCenterStub extends MigrationCenterStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(ImportDataFile.getDescriptor()) .add(Source.getDescriptor()) .add(Empty.getDescriptor()) .add(OperationMetadata.getDescriptor()) .add(ReportConfig.getDescriptor()) .add(PreferenceSet.getDescriptor()) .add(Settings.getDescriptor()) .add(Report.getDescriptor()) .add(ImportJob.getDescriptor()) .add(Group.getDescriptor()) .build(); private static final ApiMethodDescriptor listAssetsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListAssets") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/assets", 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, "view", request.getViewValue()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListAssetsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetAsset") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/assets/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "view", request.getViewValue()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Asset.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateAsset") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{asset.name=projects/*/locations/*/assets/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "asset.name", request.getAsset().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create().toBody("asset", request.getAsset(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Asset.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor batchUpdateAssetsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/BatchUpdateAssets") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/assets:batchUpdate", 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, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearParent().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(BatchUpdateAssetsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteAsset") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/assets/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor batchDeleteAssetsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/BatchDeleteAssets") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/assets:batchDelete", 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, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearParent().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor reportAssetFramesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/ReportAssetFrames") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/assets:reportAssetFrames", 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, "source", request.getSource()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("frames", request.getFrames(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ReportAssetFramesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< AggregateAssetsValuesRequest, AggregateAssetsValuesResponse> aggregateAssetsValuesMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/AggregateAssetsValues") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/assets:aggregateValues", 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, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearParent().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(AggregateAssetsValuesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createImportJobMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateImportJob") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/importJobs", 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, "importJobId", request.getImportJobId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("importJob", request.getImportJob(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateImportJobRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listImportJobsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListImportJobs") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/importJobs", 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, "view", request.getViewValue()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListImportJobsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getImportJobMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetImportJob") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/importJobs/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "view", request.getViewValue()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ImportJob.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteImportJobMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteImportJob") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/importJobs/*}", 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, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteImportJobRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateImportJobMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateImportJob") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{importJob.name=projects/*/locations/*/importJobs/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "importJob.name", request.getImportJob().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("importJob", request.getImportJob(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateImportJobRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor validateImportJobMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/ValidateImportJob") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/importJobs/*}:validate", 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( (ValidateImportJobRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor runImportJobMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/RunImportJob") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/importJobs/*}:run", 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( (RunImportJobRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getImportDataFileMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/GetImportDataFile") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/importJobs/*/importDataFiles/*}", 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(ImportDataFile.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listImportDataFilesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/ListImportDataFiles") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/importJobs/*}/importDataFiles", 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(ListImportDataFilesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createImportDataFileMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/CreateImportDataFile") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/importJobs/*}/importDataFiles", 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, "importDataFileId", request.getImportDataFileId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("importDataFile", request.getImportDataFile(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateImportDataFileRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteImportDataFileMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/DeleteImportDataFile") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/importJobs/*/importDataFiles/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteImportDataFileRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listGroupsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListGroups") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/groups", 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(ListGroupsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getGroupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetGroup") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/groups/*}", 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(Group.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createGroupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateGroup") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/groups", 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, "groupId", request.getGroupId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("group", request.getGroup(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateGroupRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateGroupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateGroup") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{group.name=projects/*/locations/*/groups/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "group.name", request.getGroup().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("group", request.getGroup(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateGroupRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteGroupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteGroup") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/groups/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteGroupRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor addAssetsToGroupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/AddAssetsToGroup") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{group=projects/*/locations/*/groups/*}:addAssets", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "group", request.getGroup()); 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().clearGroup().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (AddAssetsToGroupRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor removeAssetsFromGroupMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/RemoveAssetsFromGroup") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{group=projects/*/locations/*/groups/*}:removeAssets", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "group", request.getGroup()); 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().clearGroup().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (RemoveAssetsFromGroupRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listErrorFramesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListErrorFrames") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/sources/*}/errorFrames", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "view", request.getViewValue()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListErrorFramesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getErrorFrameMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetErrorFrame") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/sources/*/errorFrames/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "view", request.getViewValue()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ErrorFrame.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listSourcesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListSources") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/sources", 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(ListSourcesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getSourceMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetSource") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/sources/*}", 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(Source.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createSourceMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateSource") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/sources", 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, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "sourceId", request.getSourceId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("source", request.getSource(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateSourceRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateSourceMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateSource") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{source.name=projects/*/locations/*/sources/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "source.name", request.getSource().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("source", request.getSource(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateSourceRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteSourceMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteSource") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/sources/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteSourceRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listPreferenceSetsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/ListPreferenceSets") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/preferenceSets", 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, "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(ListPreferenceSetsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getPreferenceSetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetPreferenceSet") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/preferenceSets/*}", 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(PreferenceSet.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createPreferenceSetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/CreatePreferenceSet") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/preferenceSets", 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, "preferenceSetId", request.getPreferenceSetId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("preferenceSet", request.getPreferenceSet(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreatePreferenceSetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updatePreferenceSetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/UpdatePreferenceSet") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{preferenceSet.name=projects/*/locations/*/preferenceSets/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "preferenceSet.name", request.getPreferenceSet().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("preferenceSet", request.getPreferenceSet(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdatePreferenceSetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deletePreferenceSetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/DeletePreferenceSet") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/preferenceSets/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeletePreferenceSetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getSettingsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetSettings") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/settings}", 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(Settings.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor updateSettingsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/UpdateSettings") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{settings.name=projects/*/locations/*/settings}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "settings.name", request.getSettings().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("settings", request.getSettings(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateSettingsRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createReportConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/CreateReportConfig") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/reportConfigs", 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, "reportConfigId", request.getReportConfigId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("reportConfig", request.getReportConfig(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateReportConfigRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getReportConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetReportConfig") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/reportConfigs/*}", 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(ReportConfig.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listReportConfigsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/ListReportConfigs") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/reportConfigs", 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(ListReportConfigsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteReportConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.migrationcenter.v1.MigrationCenter/DeleteReportConfig") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/reportConfigs/*}", 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, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteReportConfigRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor createReportMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/CreateReport") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/reportConfigs/*}/reports", 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, "reportId", request.getReportId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("report", request.getReport(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateReportRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor getReportMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/GetReport") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/reportConfigs/*/reports/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "view", request.getViewValue()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Report.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listReportsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/ListReports") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/reportConfigs/*}/reports", 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, "view", request.getViewValue()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListReportsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor deleteReportMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.migrationcenter.v1.MigrationCenter/DeleteReport") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/reportConfigs/*/reports/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteReportRequest 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 listAssetsCallable; private final UnaryCallable listAssetsPagedCallable; private final UnaryCallable getAssetCallable; private final UnaryCallable updateAssetCallable; private final UnaryCallable batchUpdateAssetsCallable; private final UnaryCallable deleteAssetCallable; private final UnaryCallable batchDeleteAssetsCallable; private final UnaryCallable reportAssetFramesCallable; private final UnaryCallable aggregateAssetsValuesCallable; private final UnaryCallable createImportJobCallable; private final OperationCallable createImportJobOperationCallable; private final UnaryCallable listImportJobsCallable; private final UnaryCallable listImportJobsPagedCallable; private final UnaryCallable getImportJobCallable; private final UnaryCallable deleteImportJobCallable; private final OperationCallable deleteImportJobOperationCallable; private final UnaryCallable updateImportJobCallable; private final OperationCallable updateImportJobOperationCallable; private final UnaryCallable validateImportJobCallable; private final OperationCallable validateImportJobOperationCallable; private final UnaryCallable runImportJobCallable; private final OperationCallable runImportJobOperationCallable; private final UnaryCallable getImportDataFileCallable; private final UnaryCallable listImportDataFilesCallable; private final UnaryCallable listImportDataFilesPagedCallable; private final UnaryCallable createImportDataFileCallable; private final OperationCallable createImportDataFileOperationCallable; private final UnaryCallable deleteImportDataFileCallable; private final OperationCallable deleteImportDataFileOperationCallable; private final UnaryCallable listGroupsCallable; private final UnaryCallable listGroupsPagedCallable; private final UnaryCallable getGroupCallable; private final UnaryCallable createGroupCallable; private final OperationCallable createGroupOperationCallable; private final UnaryCallable updateGroupCallable; private final OperationCallable updateGroupOperationCallable; private final UnaryCallable deleteGroupCallable; private final OperationCallable deleteGroupOperationCallable; private final UnaryCallable addAssetsToGroupCallable; private final OperationCallable addAssetsToGroupOperationCallable; private final UnaryCallable removeAssetsFromGroupCallable; private final OperationCallable removeAssetsFromGroupOperationCallable; private final UnaryCallable listErrorFramesCallable; private final UnaryCallable listErrorFramesPagedCallable; private final UnaryCallable getErrorFrameCallable; private final UnaryCallable listSourcesCallable; private final UnaryCallable listSourcesPagedCallable; private final UnaryCallable getSourceCallable; private final UnaryCallable createSourceCallable; private final OperationCallable createSourceOperationCallable; private final UnaryCallable updateSourceCallable; private final OperationCallable updateSourceOperationCallable; private final UnaryCallable deleteSourceCallable; private final OperationCallable deleteSourceOperationCallable; private final UnaryCallable listPreferenceSetsCallable; private final UnaryCallable listPreferenceSetsPagedCallable; private final UnaryCallable getPreferenceSetCallable; private final UnaryCallable createPreferenceSetCallable; private final OperationCallable createPreferenceSetOperationCallable; private final UnaryCallable updatePreferenceSetCallable; private final OperationCallable updatePreferenceSetOperationCallable; private final UnaryCallable deletePreferenceSetCallable; private final OperationCallable deletePreferenceSetOperationCallable; private final UnaryCallable getSettingsCallable; private final UnaryCallable updateSettingsCallable; private final OperationCallable updateSettingsOperationCallable; private final UnaryCallable createReportConfigCallable; private final OperationCallable createReportConfigOperationCallable; private final UnaryCallable getReportConfigCallable; private final UnaryCallable listReportConfigsCallable; private final UnaryCallable listReportConfigsPagedCallable; private final UnaryCallable deleteReportConfigCallable; private final OperationCallable deleteReportConfigOperationCallable; private final UnaryCallable createReportCallable; private final OperationCallable createReportOperationCallable; private final UnaryCallable getReportCallable; private final UnaryCallable listReportsCallable; private final UnaryCallable listReportsPagedCallable; private final UnaryCallable deleteReportCallable; private final OperationCallable deleteReportOperationCallable; 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 HttpJsonMigrationCenterStub create(MigrationCenterStubSettings settings) throws IOException { return new HttpJsonMigrationCenterStub(settings, ClientContext.create(settings)); } public static final HttpJsonMigrationCenterStub create(ClientContext clientContext) throws IOException { return new HttpJsonMigrationCenterStub( MigrationCenterStubSettings.newHttpJsonBuilder().build(), clientContext); } public static final HttpJsonMigrationCenterStub create( ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { return new HttpJsonMigrationCenterStub( MigrationCenterStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of HttpJsonMigrationCenterStub, 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 HttpJsonMigrationCenterStub( MigrationCenterStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new HttpJsonMigrationCenterCallableFactory()); } /** * Constructs an instance of HttpJsonMigrationCenterStub, 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 HttpJsonMigrationCenterStub( MigrationCenterStubSettings 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 listAssetsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listAssetsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("asset.name", String.valueOf(request.getAsset().getName())); return builder.build(); }) .build(); HttpJsonCallSettings batchUpdateAssetsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(batchUpdateAssetsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings batchDeleteAssetsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(batchDeleteAssetsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings reportAssetFramesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(reportAssetFramesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings aggregateAssetsValuesTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(aggregateAssetsValuesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings createImportJobTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createImportJobMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listImportJobsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listImportJobsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getImportJobTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getImportJobMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteImportJobTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteImportJobMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateImportJobTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateImportJobMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("import_job.name", String.valueOf(request.getImportJob().getName())); return builder.build(); }) .build(); HttpJsonCallSettings validateImportJobTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(validateImportJobMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings runImportJobTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(runImportJobMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings getImportDataFileTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getImportDataFileMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listImportDataFilesTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listImportDataFilesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings createImportDataFileTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createImportDataFileMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteImportDataFileTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteImportDataFileMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listGroupsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listGroupsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getGroupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getGroupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createGroupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createGroupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateGroupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateGroupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("group.name", String.valueOf(request.getGroup().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteGroupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteGroupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings addAssetsToGroupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(addAssetsToGroupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("group", String.valueOf(request.getGroup())); return builder.build(); }) .build(); HttpJsonCallSettings removeAssetsFromGroupTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(removeAssetsFromGroupMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("group", String.valueOf(request.getGroup())); return builder.build(); }) .build(); HttpJsonCallSettings listErrorFramesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listErrorFramesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getErrorFrameTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getErrorFrameMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listSourcesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listSourcesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getSourceTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getSourceMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createSourceTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createSourceMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateSourceTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateSourceMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("source.name", String.valueOf(request.getSource().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteSourceTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteSourceMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listPreferenceSetsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listPreferenceSetsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getPreferenceSetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getPreferenceSetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createPreferenceSetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createPreferenceSetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updatePreferenceSetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updatePreferenceSetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "preference_set.name", String.valueOf(request.getPreferenceSet().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deletePreferenceSetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deletePreferenceSetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings getSettingsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getSettingsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings updateSettingsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateSettingsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("settings.name", String.valueOf(request.getSettings().getName())); return builder.build(); }) .build(); HttpJsonCallSettings createReportConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createReportConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getReportConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getReportConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listReportConfigsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listReportConfigsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteReportConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteReportConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createReportTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createReportMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getReportTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getReportMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listReportsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listReportsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteReportTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteReportMethodDescriptor) .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.listAssetsCallable = callableFactory.createUnaryCallable( listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); this.listAssetsPagedCallable = callableFactory.createPagedCallable( listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); this.getAssetCallable = callableFactory.createUnaryCallable( getAssetTransportSettings, settings.getAssetSettings(), clientContext); this.updateAssetCallable = callableFactory.createUnaryCallable( updateAssetTransportSettings, settings.updateAssetSettings(), clientContext); this.batchUpdateAssetsCallable = callableFactory.createUnaryCallable( batchUpdateAssetsTransportSettings, settings.batchUpdateAssetsSettings(), clientContext); this.deleteAssetCallable = callableFactory.createUnaryCallable( deleteAssetTransportSettings, settings.deleteAssetSettings(), clientContext); this.batchDeleteAssetsCallable = callableFactory.createUnaryCallable( batchDeleteAssetsTransportSettings, settings.batchDeleteAssetsSettings(), clientContext); this.reportAssetFramesCallable = callableFactory.createUnaryCallable( reportAssetFramesTransportSettings, settings.reportAssetFramesSettings(), clientContext); this.aggregateAssetsValuesCallable = callableFactory.createUnaryCallable( aggregateAssetsValuesTransportSettings, settings.aggregateAssetsValuesSettings(), clientContext); this.createImportJobCallable = callableFactory.createUnaryCallable( createImportJobTransportSettings, settings.createImportJobSettings(), clientContext); this.createImportJobOperationCallable = callableFactory.createOperationCallable( createImportJobTransportSettings, settings.createImportJobOperationSettings(), clientContext, httpJsonOperationsStub); this.listImportJobsCallable = callableFactory.createUnaryCallable( listImportJobsTransportSettings, settings.listImportJobsSettings(), clientContext); this.listImportJobsPagedCallable = callableFactory.createPagedCallable( listImportJobsTransportSettings, settings.listImportJobsSettings(), clientContext); this.getImportJobCallable = callableFactory.createUnaryCallable( getImportJobTransportSettings, settings.getImportJobSettings(), clientContext); this.deleteImportJobCallable = callableFactory.createUnaryCallable( deleteImportJobTransportSettings, settings.deleteImportJobSettings(), clientContext); this.deleteImportJobOperationCallable = callableFactory.createOperationCallable( deleteImportJobTransportSettings, settings.deleteImportJobOperationSettings(), clientContext, httpJsonOperationsStub); this.updateImportJobCallable = callableFactory.createUnaryCallable( updateImportJobTransportSettings, settings.updateImportJobSettings(), clientContext); this.updateImportJobOperationCallable = callableFactory.createOperationCallable( updateImportJobTransportSettings, settings.updateImportJobOperationSettings(), clientContext, httpJsonOperationsStub); this.validateImportJobCallable = callableFactory.createUnaryCallable( validateImportJobTransportSettings, settings.validateImportJobSettings(), clientContext); this.validateImportJobOperationCallable = callableFactory.createOperationCallable( validateImportJobTransportSettings, settings.validateImportJobOperationSettings(), clientContext, httpJsonOperationsStub); this.runImportJobCallable = callableFactory.createUnaryCallable( runImportJobTransportSettings, settings.runImportJobSettings(), clientContext); this.runImportJobOperationCallable = callableFactory.createOperationCallable( runImportJobTransportSettings, settings.runImportJobOperationSettings(), clientContext, httpJsonOperationsStub); this.getImportDataFileCallable = callableFactory.createUnaryCallable( getImportDataFileTransportSettings, settings.getImportDataFileSettings(), clientContext); this.listImportDataFilesCallable = callableFactory.createUnaryCallable( listImportDataFilesTransportSettings, settings.listImportDataFilesSettings(), clientContext); this.listImportDataFilesPagedCallable = callableFactory.createPagedCallable( listImportDataFilesTransportSettings, settings.listImportDataFilesSettings(), clientContext); this.createImportDataFileCallable = callableFactory.createUnaryCallable( createImportDataFileTransportSettings, settings.createImportDataFileSettings(), clientContext); this.createImportDataFileOperationCallable = callableFactory.createOperationCallable( createImportDataFileTransportSettings, settings.createImportDataFileOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteImportDataFileCallable = callableFactory.createUnaryCallable( deleteImportDataFileTransportSettings, settings.deleteImportDataFileSettings(), clientContext); this.deleteImportDataFileOperationCallable = callableFactory.createOperationCallable( deleteImportDataFileTransportSettings, settings.deleteImportDataFileOperationSettings(), clientContext, httpJsonOperationsStub); this.listGroupsCallable = callableFactory.createUnaryCallable( listGroupsTransportSettings, settings.listGroupsSettings(), clientContext); this.listGroupsPagedCallable = callableFactory.createPagedCallable( listGroupsTransportSettings, settings.listGroupsSettings(), clientContext); this.getGroupCallable = callableFactory.createUnaryCallable( getGroupTransportSettings, settings.getGroupSettings(), clientContext); this.createGroupCallable = callableFactory.createUnaryCallable( createGroupTransportSettings, settings.createGroupSettings(), clientContext); this.createGroupOperationCallable = callableFactory.createOperationCallable( createGroupTransportSettings, settings.createGroupOperationSettings(), clientContext, httpJsonOperationsStub); this.updateGroupCallable = callableFactory.createUnaryCallable( updateGroupTransportSettings, settings.updateGroupSettings(), clientContext); this.updateGroupOperationCallable = callableFactory.createOperationCallable( updateGroupTransportSettings, settings.updateGroupOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteGroupCallable = callableFactory.createUnaryCallable( deleteGroupTransportSettings, settings.deleteGroupSettings(), clientContext); this.deleteGroupOperationCallable = callableFactory.createOperationCallable( deleteGroupTransportSettings, settings.deleteGroupOperationSettings(), clientContext, httpJsonOperationsStub); this.addAssetsToGroupCallable = callableFactory.createUnaryCallable( addAssetsToGroupTransportSettings, settings.addAssetsToGroupSettings(), clientContext); this.addAssetsToGroupOperationCallable = callableFactory.createOperationCallable( addAssetsToGroupTransportSettings, settings.addAssetsToGroupOperationSettings(), clientContext, httpJsonOperationsStub); this.removeAssetsFromGroupCallable = callableFactory.createUnaryCallable( removeAssetsFromGroupTransportSettings, settings.removeAssetsFromGroupSettings(), clientContext); this.removeAssetsFromGroupOperationCallable = callableFactory.createOperationCallable( removeAssetsFromGroupTransportSettings, settings.removeAssetsFromGroupOperationSettings(), clientContext, httpJsonOperationsStub); this.listErrorFramesCallable = callableFactory.createUnaryCallable( listErrorFramesTransportSettings, settings.listErrorFramesSettings(), clientContext); this.listErrorFramesPagedCallable = callableFactory.createPagedCallable( listErrorFramesTransportSettings, settings.listErrorFramesSettings(), clientContext); this.getErrorFrameCallable = callableFactory.createUnaryCallable( getErrorFrameTransportSettings, settings.getErrorFrameSettings(), clientContext); this.listSourcesCallable = callableFactory.createUnaryCallable( listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); this.listSourcesPagedCallable = callableFactory.createPagedCallable( listSourcesTransportSettings, settings.listSourcesSettings(), clientContext); this.getSourceCallable = callableFactory.createUnaryCallable( getSourceTransportSettings, settings.getSourceSettings(), clientContext); this.createSourceCallable = callableFactory.createUnaryCallable( createSourceTransportSettings, settings.createSourceSettings(), clientContext); this.createSourceOperationCallable = callableFactory.createOperationCallable( createSourceTransportSettings, settings.createSourceOperationSettings(), clientContext, httpJsonOperationsStub); this.updateSourceCallable = callableFactory.createUnaryCallable( updateSourceTransportSettings, settings.updateSourceSettings(), clientContext); this.updateSourceOperationCallable = callableFactory.createOperationCallable( updateSourceTransportSettings, settings.updateSourceOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteSourceCallable = callableFactory.createUnaryCallable( deleteSourceTransportSettings, settings.deleteSourceSettings(), clientContext); this.deleteSourceOperationCallable = callableFactory.createOperationCallable( deleteSourceTransportSettings, settings.deleteSourceOperationSettings(), clientContext, httpJsonOperationsStub); this.listPreferenceSetsCallable = callableFactory.createUnaryCallable( listPreferenceSetsTransportSettings, settings.listPreferenceSetsSettings(), clientContext); this.listPreferenceSetsPagedCallable = callableFactory.createPagedCallable( listPreferenceSetsTransportSettings, settings.listPreferenceSetsSettings(), clientContext); this.getPreferenceSetCallable = callableFactory.createUnaryCallable( getPreferenceSetTransportSettings, settings.getPreferenceSetSettings(), clientContext); this.createPreferenceSetCallable = callableFactory.createUnaryCallable( createPreferenceSetTransportSettings, settings.createPreferenceSetSettings(), clientContext); this.createPreferenceSetOperationCallable = callableFactory.createOperationCallable( createPreferenceSetTransportSettings, settings.createPreferenceSetOperationSettings(), clientContext, httpJsonOperationsStub); this.updatePreferenceSetCallable = callableFactory.createUnaryCallable( updatePreferenceSetTransportSettings, settings.updatePreferenceSetSettings(), clientContext); this.updatePreferenceSetOperationCallable = callableFactory.createOperationCallable( updatePreferenceSetTransportSettings, settings.updatePreferenceSetOperationSettings(), clientContext, httpJsonOperationsStub); this.deletePreferenceSetCallable = callableFactory.createUnaryCallable( deletePreferenceSetTransportSettings, settings.deletePreferenceSetSettings(), clientContext); this.deletePreferenceSetOperationCallable = callableFactory.createOperationCallable( deletePreferenceSetTransportSettings, settings.deletePreferenceSetOperationSettings(), clientContext, httpJsonOperationsStub); this.getSettingsCallable = callableFactory.createUnaryCallable( getSettingsTransportSettings, settings.getSettingsSettings(), clientContext); this.updateSettingsCallable = callableFactory.createUnaryCallable( updateSettingsTransportSettings, settings.updateSettingsSettings(), clientContext); this.updateSettingsOperationCallable = callableFactory.createOperationCallable( updateSettingsTransportSettings, settings.updateSettingsOperationSettings(), clientContext, httpJsonOperationsStub); this.createReportConfigCallable = callableFactory.createUnaryCallable( createReportConfigTransportSettings, settings.createReportConfigSettings(), clientContext); this.createReportConfigOperationCallable = callableFactory.createOperationCallable( createReportConfigTransportSettings, settings.createReportConfigOperationSettings(), clientContext, httpJsonOperationsStub); this.getReportConfigCallable = callableFactory.createUnaryCallable( getReportConfigTransportSettings, settings.getReportConfigSettings(), clientContext); this.listReportConfigsCallable = callableFactory.createUnaryCallable( listReportConfigsTransportSettings, settings.listReportConfigsSettings(), clientContext); this.listReportConfigsPagedCallable = callableFactory.createPagedCallable( listReportConfigsTransportSettings, settings.listReportConfigsSettings(), clientContext); this.deleteReportConfigCallable = callableFactory.createUnaryCallable( deleteReportConfigTransportSettings, settings.deleteReportConfigSettings(), clientContext); this.deleteReportConfigOperationCallable = callableFactory.createOperationCallable( deleteReportConfigTransportSettings, settings.deleteReportConfigOperationSettings(), clientContext, httpJsonOperationsStub); this.createReportCallable = callableFactory.createUnaryCallable( createReportTransportSettings, settings.createReportSettings(), clientContext); this.createReportOperationCallable = callableFactory.createOperationCallable( createReportTransportSettings, settings.createReportOperationSettings(), clientContext, httpJsonOperationsStub); this.getReportCallable = callableFactory.createUnaryCallable( getReportTransportSettings, settings.getReportSettings(), clientContext); this.listReportsCallable = callableFactory.createUnaryCallable( listReportsTransportSettings, settings.listReportsSettings(), clientContext); this.listReportsPagedCallable = callableFactory.createPagedCallable( listReportsTransportSettings, settings.listReportsSettings(), clientContext); this.deleteReportCallable = callableFactory.createUnaryCallable( deleteReportTransportSettings, settings.deleteReportSettings(), clientContext); this.deleteReportOperationCallable = callableFactory.createOperationCallable( deleteReportTransportSettings, settings.deleteReportOperationSettings(), 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(listAssetsMethodDescriptor); methodDescriptors.add(getAssetMethodDescriptor); methodDescriptors.add(updateAssetMethodDescriptor); methodDescriptors.add(batchUpdateAssetsMethodDescriptor); methodDescriptors.add(deleteAssetMethodDescriptor); methodDescriptors.add(batchDeleteAssetsMethodDescriptor); methodDescriptors.add(reportAssetFramesMethodDescriptor); methodDescriptors.add(aggregateAssetsValuesMethodDescriptor); methodDescriptors.add(createImportJobMethodDescriptor); methodDescriptors.add(listImportJobsMethodDescriptor); methodDescriptors.add(getImportJobMethodDescriptor); methodDescriptors.add(deleteImportJobMethodDescriptor); methodDescriptors.add(updateImportJobMethodDescriptor); methodDescriptors.add(validateImportJobMethodDescriptor); methodDescriptors.add(runImportJobMethodDescriptor); methodDescriptors.add(getImportDataFileMethodDescriptor); methodDescriptors.add(listImportDataFilesMethodDescriptor); methodDescriptors.add(createImportDataFileMethodDescriptor); methodDescriptors.add(deleteImportDataFileMethodDescriptor); methodDescriptors.add(listGroupsMethodDescriptor); methodDescriptors.add(getGroupMethodDescriptor); methodDescriptors.add(createGroupMethodDescriptor); methodDescriptors.add(updateGroupMethodDescriptor); methodDescriptors.add(deleteGroupMethodDescriptor); methodDescriptors.add(addAssetsToGroupMethodDescriptor); methodDescriptors.add(removeAssetsFromGroupMethodDescriptor); methodDescriptors.add(listErrorFramesMethodDescriptor); methodDescriptors.add(getErrorFrameMethodDescriptor); methodDescriptors.add(listSourcesMethodDescriptor); methodDescriptors.add(getSourceMethodDescriptor); methodDescriptors.add(createSourceMethodDescriptor); methodDescriptors.add(updateSourceMethodDescriptor); methodDescriptors.add(deleteSourceMethodDescriptor); methodDescriptors.add(listPreferenceSetsMethodDescriptor); methodDescriptors.add(getPreferenceSetMethodDescriptor); methodDescriptors.add(createPreferenceSetMethodDescriptor); methodDescriptors.add(updatePreferenceSetMethodDescriptor); methodDescriptors.add(deletePreferenceSetMethodDescriptor); methodDescriptors.add(getSettingsMethodDescriptor); methodDescriptors.add(updateSettingsMethodDescriptor); methodDescriptors.add(createReportConfigMethodDescriptor); methodDescriptors.add(getReportConfigMethodDescriptor); methodDescriptors.add(listReportConfigsMethodDescriptor); methodDescriptors.add(deleteReportConfigMethodDescriptor); methodDescriptors.add(createReportMethodDescriptor); methodDescriptors.add(getReportMethodDescriptor); methodDescriptors.add(listReportsMethodDescriptor); methodDescriptors.add(deleteReportMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } public HttpJsonOperationsStub getHttpJsonOperationsStub() { return httpJsonOperationsStub; } @Override public UnaryCallable listAssetsCallable() { return listAssetsCallable; } @Override public UnaryCallable listAssetsPagedCallable() { return listAssetsPagedCallable; } @Override public UnaryCallable getAssetCallable() { return getAssetCallable; } @Override public UnaryCallable updateAssetCallable() { return updateAssetCallable; } @Override public UnaryCallable batchUpdateAssetsCallable() { return batchUpdateAssetsCallable; } @Override public UnaryCallable deleteAssetCallable() { return deleteAssetCallable; } @Override public UnaryCallable batchDeleteAssetsCallable() { return batchDeleteAssetsCallable; } @Override public UnaryCallable reportAssetFramesCallable() { return reportAssetFramesCallable; } @Override public UnaryCallable aggregateAssetsValuesCallable() { return aggregateAssetsValuesCallable; } @Override public UnaryCallable createImportJobCallable() { return createImportJobCallable; } @Override public OperationCallable createImportJobOperationCallable() { return createImportJobOperationCallable; } @Override public UnaryCallable listImportJobsCallable() { return listImportJobsCallable; } @Override public UnaryCallable listImportJobsPagedCallable() { return listImportJobsPagedCallable; } @Override public UnaryCallable getImportJobCallable() { return getImportJobCallable; } @Override public UnaryCallable deleteImportJobCallable() { return deleteImportJobCallable; } @Override public OperationCallable deleteImportJobOperationCallable() { return deleteImportJobOperationCallable; } @Override public UnaryCallable updateImportJobCallable() { return updateImportJobCallable; } @Override public OperationCallable updateImportJobOperationCallable() { return updateImportJobOperationCallable; } @Override public UnaryCallable validateImportJobCallable() { return validateImportJobCallable; } @Override public OperationCallable validateImportJobOperationCallable() { return validateImportJobOperationCallable; } @Override public UnaryCallable runImportJobCallable() { return runImportJobCallable; } @Override public OperationCallable runImportJobOperationCallable() { return runImportJobOperationCallable; } @Override public UnaryCallable getImportDataFileCallable() { return getImportDataFileCallable; } @Override public UnaryCallable listImportDataFilesCallable() { return listImportDataFilesCallable; } @Override public UnaryCallable listImportDataFilesPagedCallable() { return listImportDataFilesPagedCallable; } @Override public UnaryCallable createImportDataFileCallable() { return createImportDataFileCallable; } @Override public OperationCallable createImportDataFileOperationCallable() { return createImportDataFileOperationCallable; } @Override public UnaryCallable deleteImportDataFileCallable() { return deleteImportDataFileCallable; } @Override public OperationCallable deleteImportDataFileOperationCallable() { return deleteImportDataFileOperationCallable; } @Override public UnaryCallable listGroupsCallable() { return listGroupsCallable; } @Override public UnaryCallable listGroupsPagedCallable() { return listGroupsPagedCallable; } @Override public UnaryCallable getGroupCallable() { return getGroupCallable; } @Override public UnaryCallable createGroupCallable() { return createGroupCallable; } @Override public OperationCallable createGroupOperationCallable() { return createGroupOperationCallable; } @Override public UnaryCallable updateGroupCallable() { return updateGroupCallable; } @Override public OperationCallable updateGroupOperationCallable() { return updateGroupOperationCallable; } @Override public UnaryCallable deleteGroupCallable() { return deleteGroupCallable; } @Override public OperationCallable deleteGroupOperationCallable() { return deleteGroupOperationCallable; } @Override public UnaryCallable addAssetsToGroupCallable() { return addAssetsToGroupCallable; } @Override public OperationCallable addAssetsToGroupOperationCallable() { return addAssetsToGroupOperationCallable; } @Override public UnaryCallable removeAssetsFromGroupCallable() { return removeAssetsFromGroupCallable; } @Override public OperationCallable removeAssetsFromGroupOperationCallable() { return removeAssetsFromGroupOperationCallable; } @Override public UnaryCallable listErrorFramesCallable() { return listErrorFramesCallable; } @Override public UnaryCallable listErrorFramesPagedCallable() { return listErrorFramesPagedCallable; } @Override public UnaryCallable getErrorFrameCallable() { return getErrorFrameCallable; } @Override public UnaryCallable listSourcesCallable() { return listSourcesCallable; } @Override public UnaryCallable listSourcesPagedCallable() { return listSourcesPagedCallable; } @Override public UnaryCallable getSourceCallable() { return getSourceCallable; } @Override public UnaryCallable createSourceCallable() { return createSourceCallable; } @Override public OperationCallable createSourceOperationCallable() { return createSourceOperationCallable; } @Override public UnaryCallable updateSourceCallable() { return updateSourceCallable; } @Override public OperationCallable updateSourceOperationCallable() { return updateSourceOperationCallable; } @Override public UnaryCallable deleteSourceCallable() { return deleteSourceCallable; } @Override public OperationCallable deleteSourceOperationCallable() { return deleteSourceOperationCallable; } @Override public UnaryCallable listPreferenceSetsCallable() { return listPreferenceSetsCallable; } @Override public UnaryCallable listPreferenceSetsPagedCallable() { return listPreferenceSetsPagedCallable; } @Override public UnaryCallable getPreferenceSetCallable() { return getPreferenceSetCallable; } @Override public UnaryCallable createPreferenceSetCallable() { return createPreferenceSetCallable; } @Override public OperationCallable createPreferenceSetOperationCallable() { return createPreferenceSetOperationCallable; } @Override public UnaryCallable updatePreferenceSetCallable() { return updatePreferenceSetCallable; } @Override public OperationCallable updatePreferenceSetOperationCallable() { return updatePreferenceSetOperationCallable; } @Override public UnaryCallable deletePreferenceSetCallable() { return deletePreferenceSetCallable; } @Override public OperationCallable deletePreferenceSetOperationCallable() { return deletePreferenceSetOperationCallable; } @Override public UnaryCallable getSettingsCallable() { return getSettingsCallable; } @Override public UnaryCallable updateSettingsCallable() { return updateSettingsCallable; } @Override public OperationCallable updateSettingsOperationCallable() { return updateSettingsOperationCallable; } @Override public UnaryCallable createReportConfigCallable() { return createReportConfigCallable; } @Override public OperationCallable createReportConfigOperationCallable() { return createReportConfigOperationCallable; } @Override public UnaryCallable getReportConfigCallable() { return getReportConfigCallable; } @Override public UnaryCallable listReportConfigsCallable() { return listReportConfigsCallable; } @Override public UnaryCallable listReportConfigsPagedCallable() { return listReportConfigsPagedCallable; } @Override public UnaryCallable deleteReportConfigCallable() { return deleteReportConfigCallable; } @Override public OperationCallable deleteReportConfigOperationCallable() { return deleteReportConfigOperationCallable; } @Override public UnaryCallable createReportCallable() { return createReportCallable; } @Override public OperationCallable createReportOperationCallable() { return createReportOperationCallable; } @Override public UnaryCallable getReportCallable() { return getReportCallable; } @Override public UnaryCallable listReportsCallable() { return listReportsCallable; } @Override public UnaryCallable listReportsPagedCallable() { return listReportsPagedCallable; } @Override public UnaryCallable deleteReportCallable() { return deleteReportCallable; } @Override public OperationCallable deleteReportOperationCallable() { return deleteReportOperationCallable; } @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