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

com.google.cloud.oracledatabase.v1.stub.HttpJsonOracleDatabaseStub Maven / Gradle / Ivy

Go to download

Oracle Database@Google Cloud API The Oracle Database@Google Cloud API provides a set of APIs to manage Oracle database services, such as Exadata and Autonomous Databases.

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

import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListAutonomousDatabaseBackupsPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListAutonomousDatabaseCharacterSetsPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListAutonomousDatabasesPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListAutonomousDbVersionsPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListCloudExadataInfrastructuresPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListCloudVmClustersPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListDbNodesPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListDbServersPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListDbSystemShapesPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListEntitlementsPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListGiVersionsPagedResponse;
import static com.google.cloud.oracledatabase.v1.OracleDatabaseClient.ListLocationsPagedResponse;

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.oracledatabase.v1.AutonomousDatabase;
import com.google.cloud.oracledatabase.v1.CloudExadataInfrastructure;
import com.google.cloud.oracledatabase.v1.CloudVmCluster;
import com.google.cloud.oracledatabase.v1.CreateAutonomousDatabaseRequest;
import com.google.cloud.oracledatabase.v1.CreateCloudExadataInfrastructureRequest;
import com.google.cloud.oracledatabase.v1.CreateCloudVmClusterRequest;
import com.google.cloud.oracledatabase.v1.DeleteAutonomousDatabaseRequest;
import com.google.cloud.oracledatabase.v1.DeleteCloudExadataInfrastructureRequest;
import com.google.cloud.oracledatabase.v1.DeleteCloudVmClusterRequest;
import com.google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequest;
import com.google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletResponse;
import com.google.cloud.oracledatabase.v1.GetAutonomousDatabaseRequest;
import com.google.cloud.oracledatabase.v1.GetCloudExadataInfrastructureRequest;
import com.google.cloud.oracledatabase.v1.GetCloudVmClusterRequest;
import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest;
import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsResponse;
import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest;
import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsResponse;
import com.google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest;
import com.google.cloud.oracledatabase.v1.ListAutonomousDatabasesResponse;
import com.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest;
import com.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsResponse;
import com.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest;
import com.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresResponse;
import com.google.cloud.oracledatabase.v1.ListCloudVmClustersRequest;
import com.google.cloud.oracledatabase.v1.ListCloudVmClustersResponse;
import com.google.cloud.oracledatabase.v1.ListDbNodesRequest;
import com.google.cloud.oracledatabase.v1.ListDbNodesResponse;
import com.google.cloud.oracledatabase.v1.ListDbServersRequest;
import com.google.cloud.oracledatabase.v1.ListDbServersResponse;
import com.google.cloud.oracledatabase.v1.ListDbSystemShapesRequest;
import com.google.cloud.oracledatabase.v1.ListDbSystemShapesResponse;
import com.google.cloud.oracledatabase.v1.ListEntitlementsRequest;
import com.google.cloud.oracledatabase.v1.ListEntitlementsResponse;
import com.google.cloud.oracledatabase.v1.ListGiVersionsRequest;
import com.google.cloud.oracledatabase.v1.ListGiVersionsResponse;
import com.google.cloud.oracledatabase.v1.OperationMetadata;
import com.google.cloud.oracledatabase.v1.RestoreAutonomousDatabaseRequest;
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 OracleDatabase service API.
 *
 * 

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") public class HttpJsonOracleDatabaseStub extends OracleDatabaseStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(CloudVmCluster.getDescriptor()) .add(Empty.getDescriptor()) .add(AutonomousDatabase.getDescriptor()) .add(CloudExadataInfrastructure.getDescriptor()) .add(OperationMetadata.getDescriptor()) .build(); private static final ApiMethodDescriptor< ListCloudExadataInfrastructuresRequest, ListCloudExadataInfrastructuresResponse> listCloudExadataInfrastructuresMethodDescriptor = ApiMethodDescriptor . newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/ListCloudExadataInfrastructures") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/cloudExadataInfrastructures", 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( ListCloudExadataInfrastructuresResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< GetCloudExadataInfrastructureRequest, CloudExadataInfrastructure> getCloudExadataInfrastructureMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/GetCloudExadataInfrastructure") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/cloudExadataInfrastructures/*}", 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(CloudExadataInfrastructure.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createCloudExadataInfrastructureMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/CreateCloudExadataInfrastructure") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/cloudExadataInfrastructures", 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, "cloudExadataInfrastructureId", request.getCloudExadataInfrastructureId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody( "cloudExadataInfrastructure", request.getCloudExadataInfrastructure(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateCloudExadataInfrastructureRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteCloudExadataInfrastructureMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/DeleteCloudExadataInfrastructure") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/cloudExadataInfrastructures/*}", 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( (DeleteCloudExadataInfrastructureRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listCloudVmClustersMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/ListCloudVmClusters") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/cloudVmClusters", 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(ListCloudVmClustersResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getCloudVmClusterMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.oracledatabase.v1.OracleDatabase/GetCloudVmCluster") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/cloudVmClusters/*}", 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(CloudVmCluster.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createCloudVmClusterMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/CreateCloudVmCluster") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/cloudVmClusters", 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, "cloudVmClusterId", request.getCloudVmClusterId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody("cloudVmCluster", request.getCloudVmCluster(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateCloudVmClusterRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteCloudVmClusterMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/DeleteCloudVmCluster") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/cloudVmClusters/*}", 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( (DeleteCloudVmClusterRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor listEntitlementsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.oracledatabase.v1.OracleDatabase/ListEntitlements") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/entitlements", 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(ListEntitlementsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listDbServersMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.oracledatabase.v1.OracleDatabase/ListDbServers") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/cloudExadataInfrastructures/*}/dbServers", 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(ListDbServersResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listDbNodesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.oracledatabase.v1.OracleDatabase/ListDbNodes") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*/cloudVmClusters/*}/dbNodes", 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(ListDbNodesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listGiVersionsMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.oracledatabase.v1.OracleDatabase/ListGiVersions") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/giVersions", 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(ListGiVersionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor listDbSystemShapesMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.oracledatabase.v1.OracleDatabase/ListDbSystemShapes") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/dbSystemShapes", 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(ListDbSystemShapesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< ListAutonomousDatabasesRequest, ListAutonomousDatabasesResponse> listAutonomousDatabasesMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDatabases") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/autonomousDatabases", 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(ListAutonomousDatabasesResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor getAutonomousDatabaseMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/GetAutonomousDatabase") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/autonomousDatabases/*}", 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(AutonomousDatabase.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor createAutonomousDatabaseMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/CreateAutonomousDatabase") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/autonomousDatabases", 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, "autonomousDatabaseId", request.getAutonomousDatabaseId()); serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) .setRequestBodyExtractor( request -> ProtoRestSerializer.create() .toBody( "autonomousDatabase", request.getAutonomousDatabase(), true)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() .setDefaultInstance(Operation.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .setOperationSnapshotFactory( (CreateAutonomousDatabaseRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor deleteAutonomousDatabaseMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/DeleteAutonomousDatabase") .setHttpMethod("DELETE") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/autonomousDatabases/*}", 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( (DeleteAutonomousDatabaseRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor restoreAutonomousDatabaseMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/RestoreAutonomousDatabase") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/autonomousDatabases/*}:restore", 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( (RestoreAutonomousDatabaseRequest request, Operation response) -> HttpJsonOperationSnapshot.create(response)) .build(); private static final ApiMethodDescriptor< GenerateAutonomousDatabaseWalletRequest, GenerateAutonomousDatabaseWalletResponse> generateAutonomousDatabaseWalletMethodDescriptor = ApiMethodDescriptor . newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/GenerateAutonomousDatabaseWallet") .setHttpMethod("POST") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{name=projects/*/locations/*/autonomousDatabases/*}:generateWallet", 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( GenerateAutonomousDatabaseWalletResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< ListAutonomousDbVersionsRequest, ListAutonomousDbVersionsResponse> listAutonomousDbVersionsMethodDescriptor = ApiMethodDescriptor .newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDbVersions") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/autonomousDbVersions", 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(ListAutonomousDbVersionsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< ListAutonomousDatabaseCharacterSetsRequest, ListAutonomousDatabaseCharacterSetsResponse> listAutonomousDatabaseCharacterSetsMethodDescriptor = ApiMethodDescriptor . newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDatabaseCharacterSets") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter .newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/autonomousDatabaseCharacterSets", 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( ListAutonomousDatabaseCharacterSetsResponse.getDefaultInstance()) .setDefaultTypeRegistry(typeRegistry) .build()) .build(); private static final ApiMethodDescriptor< ListAutonomousDatabaseBackupsRequest, ListAutonomousDatabaseBackupsResponse> listAutonomousDatabaseBackupsMethodDescriptor = ApiMethodDescriptor . newBuilder() .setFullMethodName( "google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDatabaseBackups") .setHttpMethod("GET") .setType(ApiMethodDescriptor.MethodType.UNARY) .setRequestFormatter( ProtoMessageRequestFormatter.newBuilder() .setPath( "/v1/{parent=projects/*/locations/*}/autonomousDatabaseBackups", 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( ListAutonomousDatabaseBackupsResponse.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< ListCloudExadataInfrastructuresRequest, ListCloudExadataInfrastructuresResponse> listCloudExadataInfrastructuresCallable; private final UnaryCallable< ListCloudExadataInfrastructuresRequest, ListCloudExadataInfrastructuresPagedResponse> listCloudExadataInfrastructuresPagedCallable; private final UnaryCallable getCloudExadataInfrastructureCallable; private final UnaryCallable createCloudExadataInfrastructureCallable; private final OperationCallable< CreateCloudExadataInfrastructureRequest, CloudExadataInfrastructure, OperationMetadata> createCloudExadataInfrastructureOperationCallable; private final UnaryCallable deleteCloudExadataInfrastructureCallable; private final OperationCallable deleteCloudExadataInfrastructureOperationCallable; private final UnaryCallable listCloudVmClustersCallable; private final UnaryCallable listCloudVmClustersPagedCallable; private final UnaryCallable getCloudVmClusterCallable; private final UnaryCallable createCloudVmClusterCallable; private final OperationCallable createCloudVmClusterOperationCallable; private final UnaryCallable deleteCloudVmClusterCallable; private final OperationCallable deleteCloudVmClusterOperationCallable; private final UnaryCallable listEntitlementsCallable; private final UnaryCallable listEntitlementsPagedCallable; private final UnaryCallable listDbServersCallable; private final UnaryCallable listDbServersPagedCallable; private final UnaryCallable listDbNodesCallable; private final UnaryCallable listDbNodesPagedCallable; private final UnaryCallable listGiVersionsCallable; private final UnaryCallable listGiVersionsPagedCallable; private final UnaryCallable listDbSystemShapesCallable; private final UnaryCallable listDbSystemShapesPagedCallable; private final UnaryCallable listAutonomousDatabasesCallable; private final UnaryCallable listAutonomousDatabasesPagedCallable; private final UnaryCallable getAutonomousDatabaseCallable; private final UnaryCallable createAutonomousDatabaseCallable; private final OperationCallable< CreateAutonomousDatabaseRequest, AutonomousDatabase, OperationMetadata> createAutonomousDatabaseOperationCallable; private final UnaryCallable deleteAutonomousDatabaseCallable; private final OperationCallable deleteAutonomousDatabaseOperationCallable; private final UnaryCallable restoreAutonomousDatabaseCallable; private final OperationCallable< RestoreAutonomousDatabaseRequest, AutonomousDatabase, OperationMetadata> restoreAutonomousDatabaseOperationCallable; private final UnaryCallable< GenerateAutonomousDatabaseWalletRequest, GenerateAutonomousDatabaseWalletResponse> generateAutonomousDatabaseWalletCallable; private final UnaryCallable listAutonomousDbVersionsCallable; private final UnaryCallable< ListAutonomousDbVersionsRequest, ListAutonomousDbVersionsPagedResponse> listAutonomousDbVersionsPagedCallable; private final UnaryCallable< ListAutonomousDatabaseCharacterSetsRequest, ListAutonomousDatabaseCharacterSetsResponse> listAutonomousDatabaseCharacterSetsCallable; private final UnaryCallable< ListAutonomousDatabaseCharacterSetsRequest, ListAutonomousDatabaseCharacterSetsPagedResponse> listAutonomousDatabaseCharacterSetsPagedCallable; private final UnaryCallable< ListAutonomousDatabaseBackupsRequest, ListAutonomousDatabaseBackupsResponse> listAutonomousDatabaseBackupsCallable; private final UnaryCallable< ListAutonomousDatabaseBackupsRequest, ListAutonomousDatabaseBackupsPagedResponse> listAutonomousDatabaseBackupsPagedCallable; 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 HttpJsonOracleDatabaseStub create(OracleDatabaseStubSettings settings) throws IOException { return new HttpJsonOracleDatabaseStub(settings, ClientContext.create(settings)); } public static final HttpJsonOracleDatabaseStub create(ClientContext clientContext) throws IOException { return new HttpJsonOracleDatabaseStub( OracleDatabaseStubSettings.newBuilder().build(), clientContext); } public static final HttpJsonOracleDatabaseStub create( ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { return new HttpJsonOracleDatabaseStub( OracleDatabaseStubSettings.newBuilder().build(), clientContext, callableFactory); } /** * Constructs an instance of HttpJsonOracleDatabaseStub, 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 HttpJsonOracleDatabaseStub( OracleDatabaseStubSettings settings, ClientContext clientContext) throws IOException { this(settings, clientContext, new HttpJsonOracleDatabaseCallableFactory()); } /** * Constructs an instance of HttpJsonOracleDatabaseStub, 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 HttpJsonOracleDatabaseStub( OracleDatabaseStubSettings 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< ListCloudExadataInfrastructuresRequest, ListCloudExadataInfrastructuresResponse> listCloudExadataInfrastructuresTransportSettings = HttpJsonCallSettings . newBuilder() .setMethodDescriptor(listCloudExadataInfrastructuresMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getCloudExadataInfrastructureTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(getCloudExadataInfrastructureMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createCloudExadataInfrastructureTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createCloudExadataInfrastructureMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteCloudExadataInfrastructureTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteCloudExadataInfrastructureMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listCloudVmClustersTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listCloudVmClustersMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getCloudVmClusterTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getCloudVmClusterMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createCloudVmClusterTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createCloudVmClusterMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteCloudVmClusterTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteCloudVmClusterMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listEntitlementsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listEntitlementsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listDbServersTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listDbServersMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listDbNodesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listDbNodesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listGiVersionsTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listGiVersionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listDbSystemShapesTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listDbSystemShapesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings listAutonomousDatabasesTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listAutonomousDatabasesMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings getAutonomousDatabaseTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getAutonomousDatabaseMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings createAutonomousDatabaseTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(createAutonomousDatabaseMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings deleteAutonomousDatabaseTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(deleteAutonomousDatabaseMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings restoreAutonomousDatabaseTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(restoreAutonomousDatabaseMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings< GenerateAutonomousDatabaseWalletRequest, GenerateAutonomousDatabaseWalletResponse> generateAutonomousDatabaseWalletTransportSettings = HttpJsonCallSettings . newBuilder() .setMethodDescriptor(generateAutonomousDatabaseWalletMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("name", String.valueOf(request.getName())); return builder.build(); }) .build(); HttpJsonCallSettings listAutonomousDbVersionsTransportSettings = HttpJsonCallSettings .newBuilder() .setMethodDescriptor(listAutonomousDbVersionsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings< ListAutonomousDatabaseCharacterSetsRequest, ListAutonomousDatabaseCharacterSetsResponse> listAutonomousDatabaseCharacterSetsTransportSettings = HttpJsonCallSettings . newBuilder() .setMethodDescriptor(listAutonomousDatabaseCharacterSetsMethodDescriptor) .setTypeRegistry(typeRegistry) .setParamsExtractor( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) .build(); HttpJsonCallSettings< ListAutonomousDatabaseBackupsRequest, ListAutonomousDatabaseBackupsResponse> listAutonomousDatabaseBackupsTransportSettings = HttpJsonCallSettings . newBuilder() .setMethodDescriptor(listAutonomousDatabaseBackupsMethodDescriptor) .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.listCloudExadataInfrastructuresCallable = callableFactory.createUnaryCallable( listCloudExadataInfrastructuresTransportSettings, settings.listCloudExadataInfrastructuresSettings(), clientContext); this.listCloudExadataInfrastructuresPagedCallable = callableFactory.createPagedCallable( listCloudExadataInfrastructuresTransportSettings, settings.listCloudExadataInfrastructuresSettings(), clientContext); this.getCloudExadataInfrastructureCallable = callableFactory.createUnaryCallable( getCloudExadataInfrastructureTransportSettings, settings.getCloudExadataInfrastructureSettings(), clientContext); this.createCloudExadataInfrastructureCallable = callableFactory.createUnaryCallable( createCloudExadataInfrastructureTransportSettings, settings.createCloudExadataInfrastructureSettings(), clientContext); this.createCloudExadataInfrastructureOperationCallable = callableFactory.createOperationCallable( createCloudExadataInfrastructureTransportSettings, settings.createCloudExadataInfrastructureOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteCloudExadataInfrastructureCallable = callableFactory.createUnaryCallable( deleteCloudExadataInfrastructureTransportSettings, settings.deleteCloudExadataInfrastructureSettings(), clientContext); this.deleteCloudExadataInfrastructureOperationCallable = callableFactory.createOperationCallable( deleteCloudExadataInfrastructureTransportSettings, settings.deleteCloudExadataInfrastructureOperationSettings(), clientContext, httpJsonOperationsStub); this.listCloudVmClustersCallable = callableFactory.createUnaryCallable( listCloudVmClustersTransportSettings, settings.listCloudVmClustersSettings(), clientContext); this.listCloudVmClustersPagedCallable = callableFactory.createPagedCallable( listCloudVmClustersTransportSettings, settings.listCloudVmClustersSettings(), clientContext); this.getCloudVmClusterCallable = callableFactory.createUnaryCallable( getCloudVmClusterTransportSettings, settings.getCloudVmClusterSettings(), clientContext); this.createCloudVmClusterCallable = callableFactory.createUnaryCallable( createCloudVmClusterTransportSettings, settings.createCloudVmClusterSettings(), clientContext); this.createCloudVmClusterOperationCallable = callableFactory.createOperationCallable( createCloudVmClusterTransportSettings, settings.createCloudVmClusterOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteCloudVmClusterCallable = callableFactory.createUnaryCallable( deleteCloudVmClusterTransportSettings, settings.deleteCloudVmClusterSettings(), clientContext); this.deleteCloudVmClusterOperationCallable = callableFactory.createOperationCallable( deleteCloudVmClusterTransportSettings, settings.deleteCloudVmClusterOperationSettings(), clientContext, httpJsonOperationsStub); this.listEntitlementsCallable = callableFactory.createUnaryCallable( listEntitlementsTransportSettings, settings.listEntitlementsSettings(), clientContext); this.listEntitlementsPagedCallable = callableFactory.createPagedCallable( listEntitlementsTransportSettings, settings.listEntitlementsSettings(), clientContext); this.listDbServersCallable = callableFactory.createUnaryCallable( listDbServersTransportSettings, settings.listDbServersSettings(), clientContext); this.listDbServersPagedCallable = callableFactory.createPagedCallable( listDbServersTransportSettings, settings.listDbServersSettings(), clientContext); this.listDbNodesCallable = callableFactory.createUnaryCallable( listDbNodesTransportSettings, settings.listDbNodesSettings(), clientContext); this.listDbNodesPagedCallable = callableFactory.createPagedCallable( listDbNodesTransportSettings, settings.listDbNodesSettings(), clientContext); this.listGiVersionsCallable = callableFactory.createUnaryCallable( listGiVersionsTransportSettings, settings.listGiVersionsSettings(), clientContext); this.listGiVersionsPagedCallable = callableFactory.createPagedCallable( listGiVersionsTransportSettings, settings.listGiVersionsSettings(), clientContext); this.listDbSystemShapesCallable = callableFactory.createUnaryCallable( listDbSystemShapesTransportSettings, settings.listDbSystemShapesSettings(), clientContext); this.listDbSystemShapesPagedCallable = callableFactory.createPagedCallable( listDbSystemShapesTransportSettings, settings.listDbSystemShapesSettings(), clientContext); this.listAutonomousDatabasesCallable = callableFactory.createUnaryCallable( listAutonomousDatabasesTransportSettings, settings.listAutonomousDatabasesSettings(), clientContext); this.listAutonomousDatabasesPagedCallable = callableFactory.createPagedCallable( listAutonomousDatabasesTransportSettings, settings.listAutonomousDatabasesSettings(), clientContext); this.getAutonomousDatabaseCallable = callableFactory.createUnaryCallable( getAutonomousDatabaseTransportSettings, settings.getAutonomousDatabaseSettings(), clientContext); this.createAutonomousDatabaseCallable = callableFactory.createUnaryCallable( createAutonomousDatabaseTransportSettings, settings.createAutonomousDatabaseSettings(), clientContext); this.createAutonomousDatabaseOperationCallable = callableFactory.createOperationCallable( createAutonomousDatabaseTransportSettings, settings.createAutonomousDatabaseOperationSettings(), clientContext, httpJsonOperationsStub); this.deleteAutonomousDatabaseCallable = callableFactory.createUnaryCallable( deleteAutonomousDatabaseTransportSettings, settings.deleteAutonomousDatabaseSettings(), clientContext); this.deleteAutonomousDatabaseOperationCallable = callableFactory.createOperationCallable( deleteAutonomousDatabaseTransportSettings, settings.deleteAutonomousDatabaseOperationSettings(), clientContext, httpJsonOperationsStub); this.restoreAutonomousDatabaseCallable = callableFactory.createUnaryCallable( restoreAutonomousDatabaseTransportSettings, settings.restoreAutonomousDatabaseSettings(), clientContext); this.restoreAutonomousDatabaseOperationCallable = callableFactory.createOperationCallable( restoreAutonomousDatabaseTransportSettings, settings.restoreAutonomousDatabaseOperationSettings(), clientContext, httpJsonOperationsStub); this.generateAutonomousDatabaseWalletCallable = callableFactory.createUnaryCallable( generateAutonomousDatabaseWalletTransportSettings, settings.generateAutonomousDatabaseWalletSettings(), clientContext); this.listAutonomousDbVersionsCallable = callableFactory.createUnaryCallable( listAutonomousDbVersionsTransportSettings, settings.listAutonomousDbVersionsSettings(), clientContext); this.listAutonomousDbVersionsPagedCallable = callableFactory.createPagedCallable( listAutonomousDbVersionsTransportSettings, settings.listAutonomousDbVersionsSettings(), clientContext); this.listAutonomousDatabaseCharacterSetsCallable = callableFactory.createUnaryCallable( listAutonomousDatabaseCharacterSetsTransportSettings, settings.listAutonomousDatabaseCharacterSetsSettings(), clientContext); this.listAutonomousDatabaseCharacterSetsPagedCallable = callableFactory.createPagedCallable( listAutonomousDatabaseCharacterSetsTransportSettings, settings.listAutonomousDatabaseCharacterSetsSettings(), clientContext); this.listAutonomousDatabaseBackupsCallable = callableFactory.createUnaryCallable( listAutonomousDatabaseBackupsTransportSettings, settings.listAutonomousDatabaseBackupsSettings(), clientContext); this.listAutonomousDatabaseBackupsPagedCallable = callableFactory.createPagedCallable( listAutonomousDatabaseBackupsTransportSettings, settings.listAutonomousDatabaseBackupsSettings(), 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(listCloudExadataInfrastructuresMethodDescriptor); methodDescriptors.add(getCloudExadataInfrastructureMethodDescriptor); methodDescriptors.add(createCloudExadataInfrastructureMethodDescriptor); methodDescriptors.add(deleteCloudExadataInfrastructureMethodDescriptor); methodDescriptors.add(listCloudVmClustersMethodDescriptor); methodDescriptors.add(getCloudVmClusterMethodDescriptor); methodDescriptors.add(createCloudVmClusterMethodDescriptor); methodDescriptors.add(deleteCloudVmClusterMethodDescriptor); methodDescriptors.add(listEntitlementsMethodDescriptor); methodDescriptors.add(listDbServersMethodDescriptor); methodDescriptors.add(listDbNodesMethodDescriptor); methodDescriptors.add(listGiVersionsMethodDescriptor); methodDescriptors.add(listDbSystemShapesMethodDescriptor); methodDescriptors.add(listAutonomousDatabasesMethodDescriptor); methodDescriptors.add(getAutonomousDatabaseMethodDescriptor); methodDescriptors.add(createAutonomousDatabaseMethodDescriptor); methodDescriptors.add(deleteAutonomousDatabaseMethodDescriptor); methodDescriptors.add(restoreAutonomousDatabaseMethodDescriptor); methodDescriptors.add(generateAutonomousDatabaseWalletMethodDescriptor); methodDescriptors.add(listAutonomousDbVersionsMethodDescriptor); methodDescriptors.add(listAutonomousDatabaseCharacterSetsMethodDescriptor); methodDescriptors.add(listAutonomousDatabaseBackupsMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } public HttpJsonOperationsStub getHttpJsonOperationsStub() { return httpJsonOperationsStub; } @Override public UnaryCallable< ListCloudExadataInfrastructuresRequest, ListCloudExadataInfrastructuresResponse> listCloudExadataInfrastructuresCallable() { return listCloudExadataInfrastructuresCallable; } @Override public UnaryCallable< ListCloudExadataInfrastructuresRequest, ListCloudExadataInfrastructuresPagedResponse> listCloudExadataInfrastructuresPagedCallable() { return listCloudExadataInfrastructuresPagedCallable; } @Override public UnaryCallable getCloudExadataInfrastructureCallable() { return getCloudExadataInfrastructureCallable; } @Override public UnaryCallable createCloudExadataInfrastructureCallable() { return createCloudExadataInfrastructureCallable; } @Override public OperationCallable< CreateCloudExadataInfrastructureRequest, CloudExadataInfrastructure, OperationMetadata> createCloudExadataInfrastructureOperationCallable() { return createCloudExadataInfrastructureOperationCallable; } @Override public UnaryCallable deleteCloudExadataInfrastructureCallable() { return deleteCloudExadataInfrastructureCallable; } @Override public OperationCallable deleteCloudExadataInfrastructureOperationCallable() { return deleteCloudExadataInfrastructureOperationCallable; } @Override public UnaryCallable listCloudVmClustersCallable() { return listCloudVmClustersCallable; } @Override public UnaryCallable listCloudVmClustersPagedCallable() { return listCloudVmClustersPagedCallable; } @Override public UnaryCallable getCloudVmClusterCallable() { return getCloudVmClusterCallable; } @Override public UnaryCallable createCloudVmClusterCallable() { return createCloudVmClusterCallable; } @Override public OperationCallable createCloudVmClusterOperationCallable() { return createCloudVmClusterOperationCallable; } @Override public UnaryCallable deleteCloudVmClusterCallable() { return deleteCloudVmClusterCallable; } @Override public OperationCallable deleteCloudVmClusterOperationCallable() { return deleteCloudVmClusterOperationCallable; } @Override public UnaryCallable listEntitlementsCallable() { return listEntitlementsCallable; } @Override public UnaryCallable listEntitlementsPagedCallable() { return listEntitlementsPagedCallable; } @Override public UnaryCallable listDbServersCallable() { return listDbServersCallable; } @Override public UnaryCallable listDbServersPagedCallable() { return listDbServersPagedCallable; } @Override public UnaryCallable listDbNodesCallable() { return listDbNodesCallable; } @Override public UnaryCallable listDbNodesPagedCallable() { return listDbNodesPagedCallable; } @Override public UnaryCallable listGiVersionsCallable() { return listGiVersionsCallable; } @Override public UnaryCallable listGiVersionsPagedCallable() { return listGiVersionsPagedCallable; } @Override public UnaryCallable listDbSystemShapesCallable() { return listDbSystemShapesCallable; } @Override public UnaryCallable listDbSystemShapesPagedCallable() { return listDbSystemShapesPagedCallable; } @Override public UnaryCallable listAutonomousDatabasesCallable() { return listAutonomousDatabasesCallable; } @Override public UnaryCallable listAutonomousDatabasesPagedCallable() { return listAutonomousDatabasesPagedCallable; } @Override public UnaryCallable getAutonomousDatabaseCallable() { return getAutonomousDatabaseCallable; } @Override public UnaryCallable createAutonomousDatabaseCallable() { return createAutonomousDatabaseCallable; } @Override public OperationCallable createAutonomousDatabaseOperationCallable() { return createAutonomousDatabaseOperationCallable; } @Override public UnaryCallable deleteAutonomousDatabaseCallable() { return deleteAutonomousDatabaseCallable; } @Override public OperationCallable deleteAutonomousDatabaseOperationCallable() { return deleteAutonomousDatabaseOperationCallable; } @Override public UnaryCallable restoreAutonomousDatabaseCallable() { return restoreAutonomousDatabaseCallable; } @Override public OperationCallable restoreAutonomousDatabaseOperationCallable() { return restoreAutonomousDatabaseOperationCallable; } @Override public UnaryCallable< GenerateAutonomousDatabaseWalletRequest, GenerateAutonomousDatabaseWalletResponse> generateAutonomousDatabaseWalletCallable() { return generateAutonomousDatabaseWalletCallable; } @Override public UnaryCallable listAutonomousDbVersionsCallable() { return listAutonomousDbVersionsCallable; } @Override public UnaryCallable listAutonomousDbVersionsPagedCallable() { return listAutonomousDbVersionsPagedCallable; } @Override public UnaryCallable< ListAutonomousDatabaseCharacterSetsRequest, ListAutonomousDatabaseCharacterSetsResponse> listAutonomousDatabaseCharacterSetsCallable() { return listAutonomousDatabaseCharacterSetsCallable; } @Override public UnaryCallable< ListAutonomousDatabaseCharacterSetsRequest, ListAutonomousDatabaseCharacterSetsPagedResponse> listAutonomousDatabaseCharacterSetsPagedCallable() { return listAutonomousDatabaseCharacterSetsPagedCallable; } @Override public UnaryCallable listAutonomousDatabaseBackupsCallable() { return listAutonomousDatabaseBackupsCallable; } @Override public UnaryCallable< ListAutonomousDatabaseBackupsRequest, ListAutonomousDatabaseBackupsPagedResponse> listAutonomousDatabaseBackupsPagedCallable() { return listAutonomousDatabaseBackupsPagedCallable; } @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