Package com.google.cloud.apigateway.v1 (2.11.0)

The interfaces provided are listed below, along with usage samples.

ApiGatewayServiceClient

Service Description: The API Gateway Service is the interface for managing API Gateways.

Sample for ApiGatewayServiceClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   GatewayName name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]");
   Gateway response = apiGatewayServiceClient.getGateway(name);
 }
 

Classes

Api

An API that can be served by one or more Gateways.

Protobuf type google.cloud.apigateway.v1.Api

Api.Builder

An API that can be served by one or more Gateways.

Protobuf type google.cloud.apigateway.v1.Api

ApiConfig

An API Configuration is a combination of settings for both the Managed Service and Gateways serving this API Config.

Protobuf type google.cloud.apigateway.v1.ApiConfig

ApiConfig.Builder

An API Configuration is a combination of settings for both the Managed Service and Gateways serving this API Config.

Protobuf type google.cloud.apigateway.v1.ApiConfig

ApiConfig.File

A lightweight description of a file.

Protobuf type google.cloud.apigateway.v1.ApiConfig.File

ApiConfig.File.Builder

A lightweight description of a file.

Protobuf type google.cloud.apigateway.v1.ApiConfig.File

ApiConfig.GrpcServiceDefinition

A gRPC service definition.

Protobuf type google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinition

ApiConfig.GrpcServiceDefinition.Builder

A gRPC service definition.

Protobuf type google.cloud.apigateway.v1.ApiConfig.GrpcServiceDefinition

ApiConfig.OpenApiDocument

An OpenAPI Specification Document describing an API.

Protobuf type google.cloud.apigateway.v1.ApiConfig.OpenApiDocument

ApiConfig.OpenApiDocument.Builder

An OpenAPI Specification Document describing an API.

Protobuf type google.cloud.apigateway.v1.ApiConfig.OpenApiDocument

ApiConfigName

ApiConfigName.Builder

Builder for projects/{project}/locations/global/apis/{api}/configs/{api_config}.

ApiGatewayServiceClient

Service Description: The API Gateway Service is the interface for managing API Gateways.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   GatewayName name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]");
   Gateway response = apiGatewayServiceClient.getGateway(name);
 }
 

Note: close() needs to be called on the ApiGatewayServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of ApiGatewayServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 ApiGatewayServiceSettings apiGatewayServiceSettings =
     ApiGatewayServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 ApiGatewayServiceClient apiGatewayServiceClient =
     ApiGatewayServiceClient.create(apiGatewayServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 ApiGatewayServiceSettings apiGatewayServiceSettings =
     ApiGatewayServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 ApiGatewayServiceClient apiGatewayServiceClient =
     ApiGatewayServiceClient.create(apiGatewayServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 ApiGatewayServiceSettings apiGatewayServiceSettings =
     ApiGatewayServiceSettings.newHttpJsonBuilder().build();
 ApiGatewayServiceClient apiGatewayServiceClient =
     ApiGatewayServiceClient.create(apiGatewayServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

ApiGatewayServiceClient.ListApiConfigsFixedSizeCollection

ApiGatewayServiceClient.ListApiConfigsPage

ApiGatewayServiceClient.ListApiConfigsPagedResponse

ApiGatewayServiceClient.ListApisFixedSizeCollection

ApiGatewayServiceClient.ListApisPage

ApiGatewayServiceClient.ListApisPagedResponse

ApiGatewayServiceClient.ListGatewaysFixedSizeCollection

ApiGatewayServiceClient.ListGatewaysPage

ApiGatewayServiceClient.ListGatewaysPagedResponse

ApiGatewayServiceGrpc

The API Gateway Service is the interface for managing API Gateways.

ApiGatewayServiceGrpc.ApiGatewayServiceBlockingStub

The API Gateway Service is the interface for managing API Gateways.

ApiGatewayServiceGrpc.ApiGatewayServiceFutureStub

The API Gateway Service is the interface for managing API Gateways.

ApiGatewayServiceGrpc.ApiGatewayServiceImplBase

The API Gateway Service is the interface for managing API Gateways.

ApiGatewayServiceGrpc.ApiGatewayServiceStub

The API Gateway Service is the interface for managing API Gateways.

ApiGatewayServiceSettings

Settings class to configure an instance of ApiGatewayServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (apigateway.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of getGateway to 30 seconds:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 ApiGatewayServiceSettings.Builder apiGatewayServiceSettingsBuilder =
     ApiGatewayServiceSettings.newBuilder();
 apiGatewayServiceSettingsBuilder
     .getGatewaySettings()
     .setRetrySettings(
         apiGatewayServiceSettingsBuilder
             .getGatewaySettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 ApiGatewayServiceSettings apiGatewayServiceSettings = apiGatewayServiceSettingsBuilder.build();
 

ApiGatewayServiceSettings.Builder

Builder for ApiGatewayServiceSettings.

ApiName

ApiName.Builder

Builder for projects/{project}/locations/global/apis/{api}.

Apigateway

ApigatewayService

CreateApiConfigRequest

Request message for ApiGatewayService.CreateApiConfig

Protobuf type google.cloud.apigateway.v1.CreateApiConfigRequest

CreateApiConfigRequest.Builder

Request message for ApiGatewayService.CreateApiConfig

Protobuf type google.cloud.apigateway.v1.CreateApiConfigRequest

CreateApiRequest

Request message for ApiGatewayService.CreateApi

Protobuf type google.cloud.apigateway.v1.CreateApiRequest

CreateApiRequest.Builder

Request message for ApiGatewayService.CreateApi

Protobuf type google.cloud.apigateway.v1.CreateApiRequest

CreateGatewayRequest

Request message for ApiGatewayService.CreateGateway

Protobuf type google.cloud.apigateway.v1.CreateGatewayRequest

CreateGatewayRequest.Builder

Request message for ApiGatewayService.CreateGateway

Protobuf type google.cloud.apigateway.v1.CreateGatewayRequest

DeleteApiConfigRequest

Request message for ApiGatewayService.DeleteApiConfig

Protobuf type google.cloud.apigateway.v1.DeleteApiConfigRequest

DeleteApiConfigRequest.Builder

Request message for ApiGatewayService.DeleteApiConfig

Protobuf type google.cloud.apigateway.v1.DeleteApiConfigRequest

DeleteApiRequest

Request message for ApiGatewayService.DeleteApi

Protobuf type google.cloud.apigateway.v1.DeleteApiRequest

DeleteApiRequest.Builder

Request message for ApiGatewayService.DeleteApi

Protobuf type google.cloud.apigateway.v1.DeleteApiRequest

DeleteGatewayRequest

Request message for ApiGatewayService.DeleteGateway

Protobuf type google.cloud.apigateway.v1.DeleteGatewayRequest

DeleteGatewayRequest.Builder

Request message for ApiGatewayService.DeleteGateway

Protobuf type google.cloud.apigateway.v1.DeleteGatewayRequest

Gateway

A Gateway is an API-aware HTTP proxy. It performs API-Method and/or API-Consumer specific actions based on an API Config such as authentication, policy enforcement, and backend selection.

Protobuf type google.cloud.apigateway.v1.Gateway

Gateway.Builder

A Gateway is an API-aware HTTP proxy. It performs API-Method and/or API-Consumer specific actions based on an API Config such as authentication, policy enforcement, and backend selection.

Protobuf type google.cloud.apigateway.v1.Gateway

GatewayName

GatewayName.Builder

Builder for projects/{project}/locations/{location}/gateways/{gateway}.

GetApiConfigRequest

Request message for ApiGatewayService.GetApiConfig

Protobuf type google.cloud.apigateway.v1.GetApiConfigRequest

GetApiConfigRequest.Builder

Request message for ApiGatewayService.GetApiConfig

Protobuf type google.cloud.apigateway.v1.GetApiConfigRequest

GetApiRequest

Request message for ApiGatewayService.GetApi

Protobuf type google.cloud.apigateway.v1.GetApiRequest

GetApiRequest.Builder

Request message for ApiGatewayService.GetApi

Protobuf type google.cloud.apigateway.v1.GetApiRequest

GetGatewayRequest

Request message for ApiGatewayService.GetGateway

Protobuf type google.cloud.apigateway.v1.GetGatewayRequest

GetGatewayRequest.Builder

Request message for ApiGatewayService.GetGateway

Protobuf type google.cloud.apigateway.v1.GetGatewayRequest

ListApiConfigsRequest

Request message for ApiGatewayService.ListApiConfigs

Protobuf type google.cloud.apigateway.v1.ListApiConfigsRequest

ListApiConfigsRequest.Builder

Request message for ApiGatewayService.ListApiConfigs

Protobuf type google.cloud.apigateway.v1.ListApiConfigsRequest

ListApiConfigsResponse

Response message for ApiGatewayService.ListApiConfigs

Protobuf type google.cloud.apigateway.v1.ListApiConfigsResponse

ListApiConfigsResponse.Builder

Response message for ApiGatewayService.ListApiConfigs

Protobuf type google.cloud.apigateway.v1.ListApiConfigsResponse

ListApisRequest

Request message for ApiGatewayService.ListApis

Protobuf type google.cloud.apigateway.v1.ListApisRequest

ListApisRequest.Builder

Request message for ApiGatewayService.ListApis

Protobuf type google.cloud.apigateway.v1.ListApisRequest

ListApisResponse

Response message for ApiGatewayService.ListApis

Protobuf type google.cloud.apigateway.v1.ListApisResponse

ListApisResponse.Builder

Response message for ApiGatewayService.ListApis

Protobuf type google.cloud.apigateway.v1.ListApisResponse

ListGatewaysRequest

Request message for ApiGatewayService.ListGateways

Protobuf type google.cloud.apigateway.v1.ListGatewaysRequest

ListGatewaysRequest.Builder

Request message for ApiGatewayService.ListGateways

Protobuf type google.cloud.apigateway.v1.ListGatewaysRequest

ListGatewaysResponse

Response message for ApiGatewayService.ListGateways

Protobuf type google.cloud.apigateway.v1.ListGatewaysResponse

ListGatewaysResponse.Builder

Response message for ApiGatewayService.ListGateways

Protobuf type google.cloud.apigateway.v1.ListGatewaysResponse

LocationName

LocationName.Builder

Builder for projects/{project}/locations/{location}.

OperationMetadata

Represents the metadata of the long-running operation.

Protobuf type google.cloud.apigateway.v1.OperationMetadata

OperationMetadata.Builder

Represents the metadata of the long-running operation.

Protobuf type google.cloud.apigateway.v1.OperationMetadata

OperationMetadata.Diagnostic

Diagnostic information from configuration processing.

Protobuf type google.cloud.apigateway.v1.OperationMetadata.Diagnostic

OperationMetadata.Diagnostic.Builder

Diagnostic information from configuration processing.

Protobuf type google.cloud.apigateway.v1.OperationMetadata.Diagnostic

UpdateApiConfigRequest

Request message for ApiGatewayService.UpdateApiConfig

Protobuf type google.cloud.apigateway.v1.UpdateApiConfigRequest

UpdateApiConfigRequest.Builder

Request message for ApiGatewayService.UpdateApiConfig

Protobuf type google.cloud.apigateway.v1.UpdateApiConfigRequest

UpdateApiRequest

Request message for ApiGatewayService.UpdateApi

Protobuf type google.cloud.apigateway.v1.UpdateApiRequest

UpdateApiRequest.Builder

Request message for ApiGatewayService.UpdateApi

Protobuf type google.cloud.apigateway.v1.UpdateApiRequest

UpdateGatewayRequest

Request message for ApiGatewayService.UpdateGateway

Protobuf type google.cloud.apigateway.v1.UpdateGatewayRequest

UpdateGatewayRequest.Builder

Request message for ApiGatewayService.UpdateGateway

Protobuf type google.cloud.apigateway.v1.UpdateGatewayRequest

Interfaces

ApiConfig.FileOrBuilder

ApiConfig.GrpcServiceDefinitionOrBuilder

ApiConfig.OpenApiDocumentOrBuilder

ApiConfigOrBuilder

ApiOrBuilder

CreateApiConfigRequestOrBuilder

CreateApiRequestOrBuilder

CreateGatewayRequestOrBuilder

DeleteApiConfigRequestOrBuilder

DeleteApiRequestOrBuilder

DeleteGatewayRequestOrBuilder

GatewayOrBuilder

GetApiConfigRequestOrBuilder

GetApiRequestOrBuilder

GetGatewayRequestOrBuilder

ListApiConfigsRequestOrBuilder

ListApiConfigsResponseOrBuilder

ListApisRequestOrBuilder

ListApisResponseOrBuilder

ListGatewaysRequestOrBuilder

ListGatewaysResponseOrBuilder

OperationMetadata.DiagnosticOrBuilder

OperationMetadataOrBuilder

UpdateApiConfigRequestOrBuilder

UpdateApiRequestOrBuilder

UpdateGatewayRequestOrBuilder

Enums

Api.State

All the possible API states.

Protobuf enum google.cloud.apigateway.v1.Api.State

ApiConfig.State

All the possible API Config states.

Protobuf enum google.cloud.apigateway.v1.ApiConfig.State

Gateway.State

All the possible Gateway states.

Protobuf enum google.cloud.apigateway.v1.Gateway.State

GetApiConfigRequest.ConfigView

Enum to control which fields should be included in the response.

Protobuf enum google.cloud.apigateway.v1.GetApiConfigRequest.ConfigView