Package google.devtools.cloudbuild.v2 (3.14.0)

A client to Cloud Build API

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

RepositoryManagerClient

Service Description: Manages connections to source code repostiories.

Sample for RepositoryManagerClient:


 // 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 (RepositoryManagerClient repositoryManagerClient = RepositoryManagerClient.create()) {
   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
   Connection response = repositoryManagerClient.getConnection(name);
 }
 

Classes

BatchCreateRepositoriesRequest

Message for creating repositoritories in batch.

Protobuf type google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest

BatchCreateRepositoriesRequest.Builder

Message for creating repositoritories in batch.

Protobuf type google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest

BatchCreateRepositoriesResponse

Message for response of creating repositories in batch.

Protobuf type google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse

BatchCreateRepositoriesResponse.Builder

Message for response of creating repositories in batch.

Protobuf type google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse

CloudBuildProto

Connection

A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Server or GitLab.

Protobuf type google.devtools.cloudbuild.v2.Connection

Connection.Builder

A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Server or GitLab.

Protobuf type google.devtools.cloudbuild.v2.Connection

ConnectionName

ConnectionName.Builder

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

CreateConnectionRequest

Message for creating a Connection

Protobuf type google.devtools.cloudbuild.v2.CreateConnectionRequest

CreateConnectionRequest.Builder

Message for creating a Connection

Protobuf type google.devtools.cloudbuild.v2.CreateConnectionRequest

CreateRepositoryRequest

Message for creating a Repository.

Protobuf type google.devtools.cloudbuild.v2.CreateRepositoryRequest

CreateRepositoryRequest.Builder

Message for creating a Repository.

Protobuf type google.devtools.cloudbuild.v2.CreateRepositoryRequest

DeleteConnectionRequest

Message for deleting a Connection.

Protobuf type google.devtools.cloudbuild.v2.DeleteConnectionRequest

DeleteConnectionRequest.Builder

Message for deleting a Connection.

Protobuf type google.devtools.cloudbuild.v2.DeleteConnectionRequest

DeleteRepositoryRequest

Message for deleting a Repository.

Protobuf type google.devtools.cloudbuild.v2.DeleteRepositoryRequest

DeleteRepositoryRequest.Builder

Message for deleting a Repository.

Protobuf type google.devtools.cloudbuild.v2.DeleteRepositoryRequest

FetchLinkableRepositoriesRequest

Request message for FetchLinkableRepositories.

Protobuf type google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest

FetchLinkableRepositoriesRequest.Builder

Request message for FetchLinkableRepositories.

Protobuf type google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest

FetchLinkableRepositoriesResponse

Response message for FetchLinkableRepositories.

Protobuf type google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse

FetchLinkableRepositoriesResponse.Builder

Response message for FetchLinkableRepositories.

Protobuf type google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse

FetchReadTokenRequest

Message for fetching SCM read token.

Protobuf type google.devtools.cloudbuild.v2.FetchReadTokenRequest

FetchReadTokenRequest.Builder

Message for fetching SCM read token.

Protobuf type google.devtools.cloudbuild.v2.FetchReadTokenRequest

FetchReadTokenResponse

Message for responding to get read token.

Protobuf type google.devtools.cloudbuild.v2.FetchReadTokenResponse

FetchReadTokenResponse.Builder

Message for responding to get read token.

Protobuf type google.devtools.cloudbuild.v2.FetchReadTokenResponse

FetchReadWriteTokenRequest

Message for fetching SCM read/write token.

Protobuf type google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest

FetchReadWriteTokenRequest.Builder

Message for fetching SCM read/write token.

Protobuf type google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest

FetchReadWriteTokenResponse

Message for responding to get read/write token.

Protobuf type google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse

FetchReadWriteTokenResponse.Builder

Message for responding to get read/write token.

Protobuf type google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse

GetConnectionRequest

Message for getting the details of a Connection.

Protobuf type google.devtools.cloudbuild.v2.GetConnectionRequest

GetConnectionRequest.Builder

Message for getting the details of a Connection.

Protobuf type google.devtools.cloudbuild.v2.GetConnectionRequest

GetRepositoryRequest

Message for getting the details of a Repository.

Protobuf type google.devtools.cloudbuild.v2.GetRepositoryRequest

GetRepositoryRequest.Builder

Message for getting the details of a Repository.

Protobuf type google.devtools.cloudbuild.v2.GetRepositoryRequest

GitHubConfig

Configuration for connections to github.com.

Protobuf type google.devtools.cloudbuild.v2.GitHubConfig

GitHubConfig.Builder

Configuration for connections to github.com.

Protobuf type google.devtools.cloudbuild.v2.GitHubConfig

GitHubEnterpriseConfig

Configuration for connections to an instance of GitHub Enterprise.

Protobuf type google.devtools.cloudbuild.v2.GitHubEnterpriseConfig

GitHubEnterpriseConfig.Builder

Configuration for connections to an instance of GitHub Enterprise.

Protobuf type google.devtools.cloudbuild.v2.GitHubEnterpriseConfig

InstallationState

Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections.

Protobuf type google.devtools.cloudbuild.v2.InstallationState

InstallationState.Builder

Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections.

Protobuf type google.devtools.cloudbuild.v2.InstallationState

ListConnectionsRequest

Message for requesting list of Connections.

Protobuf type google.devtools.cloudbuild.v2.ListConnectionsRequest

ListConnectionsRequest.Builder

Message for requesting list of Connections.

Protobuf type google.devtools.cloudbuild.v2.ListConnectionsRequest

ListConnectionsResponse

Message for response to listing Connections.

Protobuf type google.devtools.cloudbuild.v2.ListConnectionsResponse

ListConnectionsResponse.Builder

Message for response to listing Connections.

Protobuf type google.devtools.cloudbuild.v2.ListConnectionsResponse

ListRepositoriesRequest

Message for requesting list of Repositories.

Protobuf type google.devtools.cloudbuild.v2.ListRepositoriesRequest

ListRepositoriesRequest.Builder

Message for requesting list of Repositories.

Protobuf type google.devtools.cloudbuild.v2.ListRepositoriesRequest

ListRepositoriesResponse

Message for response to listing Repositories.

Protobuf type google.devtools.cloudbuild.v2.ListRepositoriesResponse

ListRepositoriesResponse.Builder

Message for response to listing Repositories.

Protobuf type google.devtools.cloudbuild.v2.ListRepositoriesResponse

LocationName

LocationName.Builder

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

OAuthCredential

Represents an OAuth token of the account that authorized the Connection, and associated metadata.

Protobuf type google.devtools.cloudbuild.v2.OAuthCredential

OAuthCredential.Builder

Represents an OAuth token of the account that authorized the Connection, and associated metadata.

Protobuf type google.devtools.cloudbuild.v2.OAuthCredential

OperationMetadata

Represents the metadata of the long-running operation.

Protobuf type google.devtools.cloudbuild.v2.OperationMetadata

OperationMetadata.Builder

Represents the metadata of the long-running operation.

Protobuf type google.devtools.cloudbuild.v2.OperationMetadata

Repository

A repository associated to a parent connection.

Protobuf type google.devtools.cloudbuild.v2.Repository

Repository.Builder

A repository associated to a parent connection.

Protobuf type google.devtools.cloudbuild.v2.Repository

RepositoryManagerClient

Service Description: Manages connections to source code repostiories.

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 (RepositoryManagerClient repositoryManagerClient = RepositoryManagerClient.create()) {
   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
   Connection response = repositoryManagerClient.getConnection(name);
 }
 

Note: close() needs to be called on the RepositoryManagerClient 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 RepositoryManagerSettings 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
 RepositoryManagerSettings repositoryManagerSettings =
     RepositoryManagerSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 RepositoryManagerClient repositoryManagerClient =
     RepositoryManagerClient.create(repositoryManagerSettings);
 

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
 RepositoryManagerSettings repositoryManagerSettings =
     RepositoryManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
 RepositoryManagerClient repositoryManagerClient =
     RepositoryManagerClient.create(repositoryManagerSettings);
 

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
 RepositoryManagerSettings repositoryManagerSettings =
     RepositoryManagerSettings.newHttpJsonBuilder().build();
 RepositoryManagerClient repositoryManagerClient =
     RepositoryManagerClient.create(repositoryManagerSettings);
 

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

RepositoryManagerClient.FetchLinkableRepositoriesFixedSizeCollection

RepositoryManagerClient.FetchLinkableRepositoriesPage

RepositoryManagerClient.FetchLinkableRepositoriesPagedResponse

RepositoryManagerClient.ListConnectionsFixedSizeCollection

RepositoryManagerClient.ListConnectionsPage

RepositoryManagerClient.ListConnectionsPagedResponse

RepositoryManagerClient.ListRepositoriesFixedSizeCollection

RepositoryManagerClient.ListRepositoriesPage

RepositoryManagerClient.ListRepositoriesPagedResponse

RepositoryManagerGrpc

Manages connections to source code repostiories.

RepositoryManagerGrpc.RepositoryManagerBlockingStub

Manages connections to source code repostiories.

RepositoryManagerGrpc.RepositoryManagerFutureStub

Manages connections to source code repostiories.

RepositoryManagerGrpc.RepositoryManagerImplBase

Manages connections to source code repostiories.

RepositoryManagerGrpc.RepositoryManagerStub

Manages connections to source code repostiories.

RepositoryManagerProto

RepositoryManagerSettings

Settings class to configure an instance of RepositoryManagerClient.

The default instance has everything set to sensible defaults:

  • The default service address (cloudbuild.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 getConnection 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
 RepositoryManagerSettings.Builder repositoryManagerSettingsBuilder =
     RepositoryManagerSettings.newBuilder();
 repositoryManagerSettingsBuilder
     .getConnectionSettings()
     .setRetrySettings(
         repositoryManagerSettingsBuilder
             .getConnectionSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 RepositoryManagerSettings repositoryManagerSettings = repositoryManagerSettingsBuilder.build();
 

RepositoryManagerSettings.Builder

Builder for RepositoryManagerSettings.

RepositoryName

RepositoryName.Builder

Builder for projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}.

RunWorkflowCustomOperationMetadata

Represents the custom metadata of the RunWorkflow long-running operation.

Protobuf type google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata

RunWorkflowCustomOperationMetadata.Builder

Represents the custom metadata of the RunWorkflow long-running operation.

Protobuf type google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata

ServiceDirectoryConfig

ServiceDirectoryConfig represents Service Directory configuration for a connection.

Protobuf type google.devtools.cloudbuild.v2.ServiceDirectoryConfig

ServiceDirectoryConfig.Builder

ServiceDirectoryConfig represents Service Directory configuration for a connection.

Protobuf type google.devtools.cloudbuild.v2.ServiceDirectoryConfig

UpdateConnectionRequest

Message for updating a Connection.

Protobuf type google.devtools.cloudbuild.v2.UpdateConnectionRequest

UpdateConnectionRequest.Builder

Message for updating a Connection.

Protobuf type google.devtools.cloudbuild.v2.UpdateConnectionRequest

Interfaces

BatchCreateRepositoriesRequestOrBuilder

BatchCreateRepositoriesResponseOrBuilder

ConnectionOrBuilder

CreateConnectionRequestOrBuilder

CreateRepositoryRequestOrBuilder

DeleteConnectionRequestOrBuilder

DeleteRepositoryRequestOrBuilder

FetchLinkableRepositoriesRequestOrBuilder

FetchLinkableRepositoriesResponseOrBuilder

FetchReadTokenRequestOrBuilder

FetchReadTokenResponseOrBuilder

FetchReadWriteTokenRequestOrBuilder

FetchReadWriteTokenResponseOrBuilder

GetConnectionRequestOrBuilder

GetRepositoryRequestOrBuilder

GitHubConfigOrBuilder

GitHubEnterpriseConfigOrBuilder

InstallationStateOrBuilder

ListConnectionsRequestOrBuilder

ListConnectionsResponseOrBuilder

ListRepositoriesRequestOrBuilder

ListRepositoriesResponseOrBuilder

OAuthCredentialOrBuilder

OperationMetadataOrBuilder

RepositoryOrBuilder

RunWorkflowCustomOperationMetadataOrBuilder

ServiceDirectoryConfigOrBuilder

UpdateConnectionRequestOrBuilder

Enums

Connection.ConnectionConfigCase

InstallationState.Stage

Stage of the installation process.

Protobuf enum google.devtools.cloudbuild.v2.InstallationState.Stage