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

com.google.cloud.dataplex.v1.stub.HttpJsonDataplexServiceStub Maven / Gradle / Ivy

Go to download

Cloud Dataplex provides intelligent data fabric that enables organizations to centrally manage, monitor, and govern their data across data lakes, data warehouses, and data marts with consistent controls, providing access to trusted data and powering analytics at scale.

There is a newer version: 1.52.0
Show newest version
/*
 * Copyright 2023 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.dataplex.v1.stub;

import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListAssetActionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListAssetsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListEnvironmentsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListJobsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLakeActionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLakesPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListSessionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListTasksPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListZoneActionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListZonesPagedResponse;

import com.google.api.HttpRule;
import com.google.api.core.BetaApi;
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.dataplex.v1.Asset;
import com.google.cloud.dataplex.v1.CancelJobRequest;
import com.google.cloud.dataplex.v1.CreateAssetRequest;
import com.google.cloud.dataplex.v1.CreateEnvironmentRequest;
import com.google.cloud.dataplex.v1.CreateLakeRequest;
import com.google.cloud.dataplex.v1.CreateTaskRequest;
import com.google.cloud.dataplex.v1.CreateZoneRequest;
import com.google.cloud.dataplex.v1.DeleteAssetRequest;
import com.google.cloud.dataplex.v1.DeleteEnvironmentRequest;
import com.google.cloud.dataplex.v1.DeleteLakeRequest;
import com.google.cloud.dataplex.v1.DeleteTaskRequest;
import com.google.cloud.dataplex.v1.DeleteZoneRequest;
import com.google.cloud.dataplex.v1.Environment;
import com.google.cloud.dataplex.v1.GetAssetRequest;
import com.google.cloud.dataplex.v1.GetEnvironmentRequest;
import com.google.cloud.dataplex.v1.GetJobRequest;
import com.google.cloud.dataplex.v1.GetLakeRequest;
import com.google.cloud.dataplex.v1.GetTaskRequest;
import com.google.cloud.dataplex.v1.GetZoneRequest;
import com.google.cloud.dataplex.v1.Job;
import com.google.cloud.dataplex.v1.Lake;
import com.google.cloud.dataplex.v1.ListActionsResponse;
import com.google.cloud.dataplex.v1.ListAssetActionsRequest;
import com.google.cloud.dataplex.v1.ListAssetsRequest;
import com.google.cloud.dataplex.v1.ListAssetsResponse;
import com.google.cloud.dataplex.v1.ListEnvironmentsRequest;
import com.google.cloud.dataplex.v1.ListEnvironmentsResponse;
import com.google.cloud.dataplex.v1.ListJobsRequest;
import com.google.cloud.dataplex.v1.ListJobsResponse;
import com.google.cloud.dataplex.v1.ListLakeActionsRequest;
import com.google.cloud.dataplex.v1.ListLakesRequest;
import com.google.cloud.dataplex.v1.ListLakesResponse;
import com.google.cloud.dataplex.v1.ListSessionsRequest;
import com.google.cloud.dataplex.v1.ListSessionsResponse;
import com.google.cloud.dataplex.v1.ListTasksRequest;
import com.google.cloud.dataplex.v1.ListTasksResponse;
import com.google.cloud.dataplex.v1.ListZoneActionsRequest;
import com.google.cloud.dataplex.v1.ListZonesRequest;
import com.google.cloud.dataplex.v1.ListZonesResponse;
import com.google.cloud.dataplex.v1.OperationMetadata;
import com.google.cloud.dataplex.v1.RunTaskRequest;
import com.google.cloud.dataplex.v1.RunTaskResponse;
import com.google.cloud.dataplex.v1.Task;
import com.google.cloud.dataplex.v1.UpdateAssetRequest;
import com.google.cloud.dataplex.v1.UpdateEnvironmentRequest;
import com.google.cloud.dataplex.v1.UpdateLakeRequest;
import com.google.cloud.dataplex.v1.UpdateTaskRequest;
import com.google.cloud.dataplex.v1.UpdateZoneRequest;
import com.google.cloud.dataplex.v1.Zone;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.common.collect.ImmutableMap;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.TypeRegistry;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

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

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") @BetaApi public class HttpJsonDataplexServiceStub extends DataplexServiceStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(Empty.getDescriptor()) .add(Task.getDescriptor()) .add(Zone.getDescriptor()) .add(OperationMetadata.getDescriptor()) .add(Environment.getDescriptor()) .add(Lake.getDescriptor()) .add(Asset.getDescriptor()) .build(); private static final ApiMethodDescriptor createLakeMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/CreateLake") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/lakes", 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, "lakeId", request.getLakeId()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create().toBody("lake", request.getLake(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateLakeRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateLakeMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/UpdateLake") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{lake.name=projects/*/locations/*/lakes/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "lake.name", request.getLake().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create().toBody("lake", request.getLake(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateLakeRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteLakeMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/DeleteLake") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteLakeRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listLakesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/ListLakes") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/lakes", 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(ListLakesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getLakeMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/GetLake") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*}", 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(Lake.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listLakeActionsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/ListLakeActions") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*}/actions", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListActionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createZoneMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/CreateZone") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*}/zones", 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, "validateOnly", request.getValidateOnly()); serializer.putQueryParam(fields, "zoneId", request.getZoneId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create().toBody("zone", request.getZone(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateZoneRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateZoneMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/UpdateZone") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "zone.name", request.getZone().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create().toBody("zone", request.getZone(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateZoneRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteZoneMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/DeleteZone") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteZoneRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listZonesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/ListZones") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*}/zones", 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(ListZonesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getZoneMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/GetZone") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/zones/*}", 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(Zone.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listZoneActionsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/ListZoneActions") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListActionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/CreateAsset") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/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, "assetId", request.getAssetId()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("asset", request.getAsset(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateAssetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/UpdateAsset") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/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, "updateMask", request.getUpdateMask()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("asset", request.getAsset(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateAssetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteAssetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/DeleteAsset") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/zones/*/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, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteAssetRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listAssetsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/ListAssets") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/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, "$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.dataplex.v1.DataplexService/GetAsset") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/zones/*/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, "$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 listAssetActionsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/ListAssetActions") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListActionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createTaskMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/CreateTask") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", 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, "taskId", request.getTaskId()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create().toBody("task", request.getTask(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateTaskRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateTaskMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/UpdateTask") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "task.name", request.getTask().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create().toBody("task", request.getTask(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateTaskRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteTaskMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/DeleteTask") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteTaskRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listTasksMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/ListTasks") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*}/tasks", 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(ListTasksResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getTaskMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/GetTask") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}", 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(Task.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listJobsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/ListJobs") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListJobsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor runTaskMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/RunTask") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}: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(RunTaskResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getJobMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/GetJob") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}", 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(Job.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor cancelJobMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/CancelJob") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("*", request.toBuilder().clearName().build(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Empty.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createEnvironmentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/CreateEnvironment") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*}/environments", 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, "environmentId", request.getEnvironmentId()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("environment", request.getEnvironment(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateEnvironmentRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor updateEnvironmentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/UpdateEnvironment") .setHttpMethod("PATCH") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam( fields, "environment.name", request.getEnvironment().getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("environment", request.getEnvironment(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (UpdateEnvironmentRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteEnvironmentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/DeleteEnvironment") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (DeleteEnvironmentRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listEnvironmentsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/ListEnvironments") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*}/environments", 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(ListEnvironmentsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getEnvironmentMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/GetEnvironment") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/lakes/*/environments/*}", 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(Environment.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listSessionsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.dataplex.v1.DataplexService/ListSessions") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListSessionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.location.Locations/ListLocations") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*}/locations", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getLocationMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.location.Locations/GetLocation") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*}", request -> { Map fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putPathParam(fields, "name", request.getName()); return fields; }) .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor(request -> null) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Location.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private final UnaryCallable createLakeCallable; private final OperationCallable createLakeOperationCallable; private final UnaryCallable updateLakeCallable; private final OperationCallable updateLakeOperationCallable; private final UnaryCallable deleteLakeCallable; private final OperationCallable deleteLakeOperationCallable; private final UnaryCallable listLakesCallable; private final UnaryCallable listLakesPagedCallable; private final UnaryCallable getLakeCallable; private final UnaryCallable listLakeActionsCallable; private final UnaryCallable listLakeActionsPagedCallable; private final UnaryCallable createZoneCallable; private final OperationCallable createZoneOperationCallable; private final UnaryCallable updateZoneCallable; private final OperationCallable updateZoneOperationCallable; private final UnaryCallable deleteZoneCallable; private final OperationCallable deleteZoneOperationCallable; private final UnaryCallable listZonesCallable; private final UnaryCallable listZonesPagedCallable; private final UnaryCallable getZoneCallable; private final UnaryCallable listZoneActionsCallable; private final UnaryCallable listZoneActionsPagedCallable; private final UnaryCallable createAssetCallable; private final OperationCallable createAssetOperationCallable; private final UnaryCallable updateAssetCallable; private final OperationCallable updateAssetOperationCallable; private final UnaryCallable deleteAssetCallable; private final OperationCallable deleteAssetOperationCallable; private final UnaryCallable listAssetsCallable; private final UnaryCallable listAssetsPagedCallable; private final UnaryCallable getAssetCallable; private final UnaryCallable listAssetActionsCallable; private final UnaryCallable listAssetActionsPagedCallable; private final UnaryCallable createTaskCallable; private final OperationCallable createTaskOperationCallable; private final UnaryCallable updateTaskCallable; private final OperationCallable updateTaskOperationCallable; private final UnaryCallable deleteTaskCallable; private final OperationCallable deleteTaskOperationCallable; private final UnaryCallable listTasksCallable; private final UnaryCallable listTasksPagedCallable; private final UnaryCallable getTaskCallable; private final UnaryCallable listJobsCallable; private final UnaryCallable listJobsPagedCallable; private final UnaryCallable runTaskCallable; private final UnaryCallable getJobCallable; private final UnaryCallable cancelJobCallable; private final UnaryCallable createEnvironmentCallable; private final OperationCallable createEnvironmentOperationCallable; private final UnaryCallable updateEnvironmentCallable; private final OperationCallable updateEnvironmentOperationCallable; private final UnaryCallable deleteEnvironmentCallable; private final OperationCallable deleteEnvironmentOperationCallable; private final UnaryCallable listEnvironmentsCallable; private final UnaryCallable listEnvironmentsPagedCallable; private final UnaryCallable getEnvironmentCallable; private final UnaryCallable listSessionsCallable; private final UnaryCallable listSessionsPagedCallable; 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 HttpJsonDataplexServiceStub create(DataplexServiceStubSettings settings) throws IOException { return new HttpJsonDataplexServiceStub(settings, ClientContext.create(settings)); } public static final HttpJsonDataplexServiceStub create(ClientContext clientContext) throws IOException { return new HttpJsonDataplexServiceStub( DataplexServiceStubSettings.newHttpJsonBuilder().build(), clientContext); } public static final HttpJsonDataplexServiceStub create( ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { return new HttpJsonDataplexServiceStub( DataplexServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of HttpJsonDataplexServiceStub, 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 HttpJsonDataplexServiceStub( DataplexServiceStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new HttpJsonDataplexServiceCallableFactory()); } /** * Constructs an instance of HttpJsonDataplexServiceStub, 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 HttpJsonDataplexServiceStub( DataplexServiceStubSettings 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 createLakeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createLakeMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateLakeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateLakeMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("lake.name", String.valueOf(request.getLake().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteLakeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteLakeMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listLakesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listLakesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getLakeTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getLakeMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listLakeActionsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listLakeActionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings createZoneTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createZoneMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateZoneTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateZoneMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("zone.name", String.valueOf(request.getZone().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteZoneTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteZoneMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listZonesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listZonesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getZoneTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getZoneMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listZoneActionsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listZoneActionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings createAssetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createAssetMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); 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 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 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 listAssetActionsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listAssetActionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings createTaskTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createTaskMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateTaskTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateTaskMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("task.name", String.valueOf(request.getTask().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteTaskTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteTaskMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listTasksTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listTasksMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getTaskTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getTaskMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listJobsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listJobsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings runTaskTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(runTaskMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings getJobTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getJobMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings cancelJobTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(cancelJobMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createEnvironmentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createEnvironmentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings updateEnvironmentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(updateEnvironmentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add( "environment.name", String.valueOf(request.getEnvironment().getName())); return builder.build(); }) .build(); HttpJsonCallSettings deleteEnvironmentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteEnvironmentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listEnvironmentsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listEnvironmentsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getEnvironmentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getEnvironmentMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listSessionsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listSessionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); 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.createLakeCallable = callableFactory.createUnaryCallable( createLakeTransportSettings, settings.createLakeSettings(), clientContext); this.createLakeOperationCallable = callableFactory.createOperationCallable( createLakeTransportSettings, settings.createLakeOperationSettings(), clientContext, httpJsonOperationsStub); this.updateLakeCallable = callableFactory.createUnaryCallable( updateLakeTransportSettings, settings.updateLakeSettings(), clientContext); this.updateLakeOperationCallable = callableFactory.createOperationCallable( updateLakeTransportSettings, settings.updateLakeOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteLakeCallable = callableFactory.createUnaryCallable( deleteLakeTransportSettings, settings.deleteLakeSettings(), clientContext); this.deleteLakeOperationCallable = callableFactory.createOperationCallable( deleteLakeTransportSettings, settings.deleteLakeOperationSettings(), clientContext, httpJsonOperationsStub); this.listLakesCallable = callableFactory.createUnaryCallable( listLakesTransportSettings, settings.listLakesSettings(), clientContext); this.listLakesPagedCallable = callableFactory.createPagedCallable( listLakesTransportSettings, settings.listLakesSettings(), clientContext); this.getLakeCallable = callableFactory.createUnaryCallable( getLakeTransportSettings, settings.getLakeSettings(), clientContext); this.listLakeActionsCallable = callableFactory.createUnaryCallable( listLakeActionsTransportSettings, settings.listLakeActionsSettings(), clientContext); this.listLakeActionsPagedCallable = callableFactory.createPagedCallable( listLakeActionsTransportSettings, settings.listLakeActionsSettings(), clientContext); this.createZoneCallable = callableFactory.createUnaryCallable( createZoneTransportSettings, settings.createZoneSettings(), clientContext); this.createZoneOperationCallable = callableFactory.createOperationCallable( createZoneTransportSettings, settings.createZoneOperationSettings(), clientContext, httpJsonOperationsStub); this.updateZoneCallable = callableFactory.createUnaryCallable( updateZoneTransportSettings, settings.updateZoneSettings(), clientContext); this.updateZoneOperationCallable = callableFactory.createOperationCallable( updateZoneTransportSettings, settings.updateZoneOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteZoneCallable = callableFactory.createUnaryCallable( deleteZoneTransportSettings, settings.deleteZoneSettings(), clientContext); this.deleteZoneOperationCallable = callableFactory.createOperationCallable( deleteZoneTransportSettings, settings.deleteZoneOperationSettings(), clientContext, httpJsonOperationsStub); this.listZonesCallable = callableFactory.createUnaryCallable( listZonesTransportSettings, settings.listZonesSettings(), clientContext); this.listZonesPagedCallable = callableFactory.createPagedCallable( listZonesTransportSettings, settings.listZonesSettings(), clientContext); this.getZoneCallable = callableFactory.createUnaryCallable( getZoneTransportSettings, settings.getZoneSettings(), clientContext); this.listZoneActionsCallable = callableFactory.createUnaryCallable( listZoneActionsTransportSettings, settings.listZoneActionsSettings(), clientContext); this.listZoneActionsPagedCallable = callableFactory.createPagedCallable( listZoneActionsTransportSettings, settings.listZoneActionsSettings(), clientContext); this.createAssetCallable = callableFactory.createUnaryCallable( createAssetTransportSettings, settings.createAssetSettings(), clientContext); this.createAssetOperationCallable = callableFactory.createOperationCallable( createAssetTransportSettings, settings.createAssetOperationSettings(), clientContext, httpJsonOperationsStub); this.updateAssetCallable = callableFactory.createUnaryCallable( updateAssetTransportSettings, settings.updateAssetSettings(), clientContext); this.updateAssetOperationCallable = callableFactory.createOperationCallable( updateAssetTransportSettings, settings.updateAssetOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteAssetCallable = callableFactory.createUnaryCallable( deleteAssetTransportSettings, settings.deleteAssetSettings(), clientContext); this.deleteAssetOperationCallable = callableFactory.createOperationCallable( deleteAssetTransportSettings, settings.deleteAssetOperationSettings(), clientContext, httpJsonOperationsStub); 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.listAssetActionsCallable = callableFactory.createUnaryCallable( listAssetActionsTransportSettings, settings.listAssetActionsSettings(), clientContext); this.listAssetActionsPagedCallable = callableFactory.createPagedCallable( listAssetActionsTransportSettings, settings.listAssetActionsSettings(), clientContext); this.createTaskCallable = callableFactory.createUnaryCallable( createTaskTransportSettings, settings.createTaskSettings(), clientContext); this.createTaskOperationCallable = callableFactory.createOperationCallable( createTaskTransportSettings, settings.createTaskOperationSettings(), clientContext, httpJsonOperationsStub); this.updateTaskCallable = callableFactory.createUnaryCallable( updateTaskTransportSettings, settings.updateTaskSettings(), clientContext); this.updateTaskOperationCallable = callableFactory.createOperationCallable( updateTaskTransportSettings, settings.updateTaskOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteTaskCallable = callableFactory.createUnaryCallable( deleteTaskTransportSettings, settings.deleteTaskSettings(), clientContext); this.deleteTaskOperationCallable = callableFactory.createOperationCallable( deleteTaskTransportSettings, settings.deleteTaskOperationSettings(), clientContext, httpJsonOperationsStub); this.listTasksCallable = callableFactory.createUnaryCallable( listTasksTransportSettings, settings.listTasksSettings(), clientContext); this.listTasksPagedCallable = callableFactory.createPagedCallable( listTasksTransportSettings, settings.listTasksSettings(), clientContext); this.getTaskCallable = callableFactory.createUnaryCallable( getTaskTransportSettings, settings.getTaskSettings(), clientContext); this.listJobsCallable = callableFactory.createUnaryCallable( listJobsTransportSettings, settings.listJobsSettings(), clientContext); this.listJobsPagedCallable = callableFactory.createPagedCallable( listJobsTransportSettings, settings.listJobsSettings(), clientContext); this.runTaskCallable = callableFactory.createUnaryCallable( runTaskTransportSettings, settings.runTaskSettings(), clientContext); this.getJobCallable = callableFactory.createUnaryCallable( getJobTransportSettings, settings.getJobSettings(), clientContext); this.cancelJobCallable = callableFactory.createUnaryCallable( cancelJobTransportSettings, settings.cancelJobSettings(), clientContext); this.createEnvironmentCallable = callableFactory.createUnaryCallable( createEnvironmentTransportSettings, settings.createEnvironmentSettings(), clientContext); this.createEnvironmentOperationCallable = callableFactory.createOperationCallable( createEnvironmentTransportSettings, settings.createEnvironmentOperationSettings(), clientContext, httpJsonOperationsStub); this.updateEnvironmentCallable = callableFactory.createUnaryCallable( updateEnvironmentTransportSettings, settings.updateEnvironmentSettings(), clientContext); this.updateEnvironmentOperationCallable = callableFactory.createOperationCallable( updateEnvironmentTransportSettings, settings.updateEnvironmentOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteEnvironmentCallable = callableFactory.createUnaryCallable( deleteEnvironmentTransportSettings, settings.deleteEnvironmentSettings(), clientContext); this.deleteEnvironmentOperationCallable = callableFactory.createOperationCallable( deleteEnvironmentTransportSettings, settings.deleteEnvironmentOperationSettings(), clientContext, httpJsonOperationsStub); this.listEnvironmentsCallable = callableFactory.createUnaryCallable( listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); this.listEnvironmentsPagedCallable = callableFactory.createPagedCallable( listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); this.getEnvironmentCallable = callableFactory.createUnaryCallable( getEnvironmentTransportSettings, settings.getEnvironmentSettings(), clientContext); this.listSessionsCallable = callableFactory.createUnaryCallable( listSessionsTransportSettings, settings.listSessionsSettings(), clientContext); this.listSessionsPagedCallable = callableFactory.createPagedCallable( listSessionsTransportSettings, settings.listSessionsSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); this.listLocationsPagedCallable = callableFactory.createPagedCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); this.getLocationCallable = callableFactory.createUnaryCallable( getLocationTransportSettings, settings.getLocationSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @InternalApi public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(createLakeMethodDescriptor); methodDescriptors.add(updateLakeMethodDescriptor); methodDescriptors.add(deleteLakeMethodDescriptor); methodDescriptors.add(listLakesMethodDescriptor); methodDescriptors.add(getLakeMethodDescriptor); methodDescriptors.add(listLakeActionsMethodDescriptor); methodDescriptors.add(createZoneMethodDescriptor); methodDescriptors.add(updateZoneMethodDescriptor); methodDescriptors.add(deleteZoneMethodDescriptor); methodDescriptors.add(listZonesMethodDescriptor); methodDescriptors.add(getZoneMethodDescriptor); methodDescriptors.add(listZoneActionsMethodDescriptor); methodDescriptors.add(createAssetMethodDescriptor); methodDescriptors.add(updateAssetMethodDescriptor); methodDescriptors.add(deleteAssetMethodDescriptor); methodDescriptors.add(listAssetsMethodDescriptor); methodDescriptors.add(getAssetMethodDescriptor); methodDescriptors.add(listAssetActionsMethodDescriptor); methodDescriptors.add(createTaskMethodDescriptor); methodDescriptors.add(updateTaskMethodDescriptor); methodDescriptors.add(deleteTaskMethodDescriptor); methodDescriptors.add(listTasksMethodDescriptor); methodDescriptors.add(getTaskMethodDescriptor); methodDescriptors.add(listJobsMethodDescriptor); methodDescriptors.add(runTaskMethodDescriptor); methodDescriptors.add(getJobMethodDescriptor); methodDescriptors.add(cancelJobMethodDescriptor); methodDescriptors.add(createEnvironmentMethodDescriptor); methodDescriptors.add(updateEnvironmentMethodDescriptor); methodDescriptors.add(deleteEnvironmentMethodDescriptor); methodDescriptors.add(listEnvironmentsMethodDescriptor); methodDescriptors.add(getEnvironmentMethodDescriptor); methodDescriptors.add(listSessionsMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } public HttpJsonOperationsStub getHttpJsonOperationsStub() { return httpJsonOperationsStub; } @Override public UnaryCallable createLakeCallable() { return createLakeCallable; } @Override public OperationCallable createLakeOperationCallable() { return createLakeOperationCallable; } @Override public UnaryCallable updateLakeCallable() { return updateLakeCallable; } @Override public OperationCallable updateLakeOperationCallable() { return updateLakeOperationCallable; } @Override public UnaryCallable deleteLakeCallable() { return deleteLakeCallable; } @Override public OperationCallable deleteLakeOperationCallable() { return deleteLakeOperationCallable; } @Override public UnaryCallable listLakesCallable() { return listLakesCallable; } @Override public UnaryCallable listLakesPagedCallable() { return listLakesPagedCallable; } @Override public UnaryCallable getLakeCallable() { return getLakeCallable; } @Override public UnaryCallable listLakeActionsCallable() { return listLakeActionsCallable; } @Override public UnaryCallable listLakeActionsPagedCallable() { return listLakeActionsPagedCallable; } @Override public UnaryCallable createZoneCallable() { return createZoneCallable; } @Override public OperationCallable createZoneOperationCallable() { return createZoneOperationCallable; } @Override public UnaryCallable updateZoneCallable() { return updateZoneCallable; } @Override public OperationCallable updateZoneOperationCallable() { return updateZoneOperationCallable; } @Override public UnaryCallable deleteZoneCallable() { return deleteZoneCallable; } @Override public OperationCallable deleteZoneOperationCallable() { return deleteZoneOperationCallable; } @Override public UnaryCallable listZonesCallable() { return listZonesCallable; } @Override public UnaryCallable listZonesPagedCallable() { return listZonesPagedCallable; } @Override public UnaryCallable getZoneCallable() { return getZoneCallable; } @Override public UnaryCallable listZoneActionsCallable() { return listZoneActionsCallable; } @Override public UnaryCallable listZoneActionsPagedCallable() { return listZoneActionsPagedCallable; } @Override public UnaryCallable createAssetCallable() { return createAssetCallable; } @Override public OperationCallable createAssetOperationCallable() { return createAssetOperationCallable; } @Override public UnaryCallable updateAssetCallable() { return updateAssetCallable; } @Override public OperationCallable updateAssetOperationCallable() { return updateAssetOperationCallable; } @Override public UnaryCallable deleteAssetCallable() { return deleteAssetCallable; } @Override public OperationCallable deleteAssetOperationCallable() { return deleteAssetOperationCallable; } @Override public UnaryCallable listAssetsCallable() { return listAssetsCallable; } @Override public UnaryCallable listAssetsPagedCallable() { return listAssetsPagedCallable; } @Override public UnaryCallable getAssetCallable() { return getAssetCallable; } @Override public UnaryCallable listAssetActionsCallable() { return listAssetActionsCallable; } @Override public UnaryCallable listAssetActionsPagedCallable() { return listAssetActionsPagedCallable; } @Override public UnaryCallable createTaskCallable() { return createTaskCallable; } @Override public OperationCallable createTaskOperationCallable() { return createTaskOperationCallable; } @Override public UnaryCallable updateTaskCallable() { return updateTaskCallable; } @Override public OperationCallable updateTaskOperationCallable() { return updateTaskOperationCallable; } @Override public UnaryCallable deleteTaskCallable() { return deleteTaskCallable; } @Override public OperationCallable deleteTaskOperationCallable() { return deleteTaskOperationCallable; } @Override public UnaryCallable listTasksCallable() { return listTasksCallable; } @Override public UnaryCallable listTasksPagedCallable() { return listTasksPagedCallable; } @Override public UnaryCallable getTaskCallable() { return getTaskCallable; } @Override public UnaryCallable listJobsCallable() { return listJobsCallable; } @Override public UnaryCallable listJobsPagedCallable() { return listJobsPagedCallable; } @Override public UnaryCallable runTaskCallable() { return runTaskCallable; } @Override public UnaryCallable getJobCallable() { return getJobCallable; } @Override public UnaryCallable cancelJobCallable() { return cancelJobCallable; } @Override public UnaryCallable createEnvironmentCallable() { return createEnvironmentCallable; } @Override public OperationCallable createEnvironmentOperationCallable() { return createEnvironmentOperationCallable; } @Override public UnaryCallable updateEnvironmentCallable() { return updateEnvironmentCallable; } @Override public OperationCallable updateEnvironmentOperationCallable() { return updateEnvironmentOperationCallable; } @Override public UnaryCallable deleteEnvironmentCallable() { return deleteEnvironmentCallable; } @Override public OperationCallable deleteEnvironmentOperationCallable() { return deleteEnvironmentOperationCallable; } @Override public UnaryCallable listEnvironmentsCallable() { return listEnvironmentsCallable; } @Override public UnaryCallable listEnvironmentsPagedCallable() { return listEnvironmentsPagedCallable; } @Override public UnaryCallable getEnvironmentCallable() { return getEnvironmentCallable; } @Override public UnaryCallable listSessionsCallable() { return listSessionsCallable; } @Override public UnaryCallable listSessionsPagedCallable() { return listSessionsPagedCallable; } @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