Class DeveloperConnectClient (0.3.0)

GitHub RepositoryProduct Reference

Service Description: Service describing handlers for resources

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

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

Methods
Method Description Method Variants

ListConnections

Lists Connections in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listConnections(ListConnectionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listConnections(LocationName parent)

  • listConnections(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listConnectionsPagedCallable()

  • listConnectionsCallable()

GetConnection

Gets details of a single Connection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getConnection(GetConnectionRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getConnection(ConnectionName name)

  • getConnection(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getConnectionCallable()

CreateConnection

Creates a new Connection in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createConnectionAsync(CreateConnectionRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createConnectionAsync(LocationName parent, Connection connection, String connectionId)

  • createConnectionAsync(String parent, Connection connection, String connectionId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createConnectionOperationCallable()

  • createConnectionCallable()

UpdateConnection

Updates the parameters of a single Connection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateConnectionAsync(UpdateConnectionRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateConnectionAsync(Connection connection, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateConnectionOperationCallable()

  • updateConnectionCallable()

DeleteConnection

Deletes a single Connection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteConnectionAsync(DeleteConnectionRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteConnectionAsync(ConnectionName name)

  • deleteConnectionAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteConnectionOperationCallable()

  • deleteConnectionCallable()

CreateGitRepositoryLink

Creates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. All other Connections will have events forwarded to Cloud Build.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createGitRepositoryLinkAsync(CreateGitRepositoryLinkRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createGitRepositoryLinkAsync(ConnectionName parent, GitRepositoryLink gitRepositoryLink, String gitRepositoryLinkId)

  • createGitRepositoryLinkAsync(String parent, GitRepositoryLink gitRepositoryLink, String gitRepositoryLinkId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createGitRepositoryLinkOperationCallable()

  • createGitRepositoryLinkCallable()

DeleteGitRepositoryLink

Deletes a single GitRepositoryLink.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteGitRepositoryLinkAsync(DeleteGitRepositoryLinkRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteGitRepositoryLinkAsync(GitRepositoryLinkName name)

  • deleteGitRepositoryLinkAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteGitRepositoryLinkOperationCallable()

  • deleteGitRepositoryLinkCallable()

ListGitRepositoryLinks

Lists GitRepositoryLinks in a given project, location, and connection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listGitRepositoryLinks(ListGitRepositoryLinksRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listGitRepositoryLinks(ConnectionName parent)

  • listGitRepositoryLinks(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listGitRepositoryLinksPagedCallable()

  • listGitRepositoryLinksCallable()

GetGitRepositoryLink

Gets details of a single GitRepositoryLink.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getGitRepositoryLink(GetGitRepositoryLinkRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getGitRepositoryLink(GitRepositoryLinkName name)

  • getGitRepositoryLink(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getGitRepositoryLinkCallable()

FetchReadWriteToken

Fetches read/write token of a given gitRepositoryLink.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchReadWriteToken(FetchReadWriteTokenRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • fetchReadWriteToken(GitRepositoryLinkName gitRepositoryLink)

  • fetchReadWriteToken(String gitRepositoryLink)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchReadWriteTokenCallable()

FetchReadToken

Fetches read token of a given gitRepositoryLink.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchReadToken(FetchReadTokenRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • fetchReadToken(GitRepositoryLinkName gitRepositoryLink)

  • fetchReadToken(String gitRepositoryLink)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchReadTokenCallable()

FetchLinkableGitRepositories

FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchLinkableGitRepositories(FetchLinkableGitRepositoriesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • fetchLinkableGitRepositories(ConnectionName connection)

  • fetchLinkableGitRepositories(String connection)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchLinkableGitRepositoriesPagedCallable()

  • fetchLinkableGitRepositoriesCallable()

FetchGitHubInstallations

FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection. For github.com, only installations accessible to the authorizer token are returned. For GitHub Enterprise, all installations are returned.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchGitHubInstallations(FetchGitHubInstallationsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • fetchGitHubInstallations(ConnectionName connection)

  • fetchGitHubInstallations(String connection)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchGitHubInstallationsCallable()

FetchGitRefs

Fetch the list of branches or tags for a given repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchGitRefs(FetchGitRefsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • fetchGitRefs(GitRepositoryLinkName gitRepositoryLink, FetchGitRefsRequest.RefType refType)

  • fetchGitRefs(String gitRepositoryLink, FetchGitRefsRequest.RefType refType)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchGitRefsPagedCallable()

  • fetchGitRefsCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

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 DeveloperConnectSettings 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
 DeveloperConnectSettings developerConnectSettings =
     DeveloperConnectSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DeveloperConnectClient developerConnectClient =
     DeveloperConnectClient.create(developerConnectSettings);
 

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
 DeveloperConnectSettings developerConnectSettings =
     DeveloperConnectSettings.newBuilder().setEndpoint(myEndpoint).build();
 DeveloperConnectClient developerConnectClient =
     DeveloperConnectClient.create(developerConnectSettings);
 

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
 DeveloperConnectSettings developerConnectSettings =
     DeveloperConnectSettings.newHttpJsonBuilder().build();
 DeveloperConnectClient developerConnectClient =
     DeveloperConnectClient.create(developerConnectSettings);
 

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

Inheritance

java.lang.Object > DeveloperConnectClient

Static Methods

create()

public static final DeveloperConnectClient create()

Constructs an instance of DeveloperConnectClient with default settings.

Returns
Type Description
DeveloperConnectClient
Exceptions
Type Description
IOException

create(DeveloperConnectSettings settings)

public static final DeveloperConnectClient create(DeveloperConnectSettings settings)

Constructs an instance of DeveloperConnectClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings DeveloperConnectSettings
Returns
Type Description
DeveloperConnectClient
Exceptions
Type Description
IOException

create(DeveloperConnectStub stub)

public static final DeveloperConnectClient create(DeveloperConnectStub stub)

Constructs an instance of DeveloperConnectClient, using the given stub for making calls. This is for advanced usage - prefer using create(DeveloperConnectSettings).

Parameter
Name Description
stub DeveloperConnectStub
Returns
Type Description
DeveloperConnectClient

Constructors

DeveloperConnectClient(DeveloperConnectSettings settings)

protected DeveloperConnectClient(DeveloperConnectSettings settings)

Constructs an instance of DeveloperConnectClient, 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.

Parameter
Name Description
settings DeveloperConnectSettings

DeveloperConnectClient(DeveloperConnectStub stub)

protected DeveloperConnectClient(DeveloperConnectStub stub)
Parameter
Name Description
stub DeveloperConnectStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createConnectionAsync(CreateConnectionRequest request)

public final OperationFuture<Connection,OperationMetadata> createConnectionAsync(CreateConnectionRequest request)

Creates a new Connection in a given project and location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   CreateConnectionRequest request =
       CreateConnectionRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setConnectionId("connectionId1923106969")
           .setConnection(Connection.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   Connection response = developerConnectClient.createConnectionAsync(request).get();
 }
 
Parameter
Name Description
request CreateConnectionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Connection,OperationMetadata>

createConnectionAsync(LocationName parent, Connection connection, String connectionId)

public final OperationFuture<Connection,OperationMetadata> createConnectionAsync(LocationName parent, Connection connection, String connectionId)

Creates a new Connection in a given project and location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Connection connection = Connection.newBuilder().build();
   String connectionId = "connectionId1923106969";
   Connection response =
       developerConnectClient.createConnectionAsync(parent, connection, connectionId).get();
 }
 
Parameters
Name Description
parent LocationName

Required. Value for parent.

connection Connection

Required. The resource being created

connectionId String

Required. Id of the requesting object If auto-generating Id server-side, remove this field and connection_id from the method_signature of Create RPC

Returns
Type Description
OperationFuture<Connection,OperationMetadata>

createConnectionAsync(String parent, Connection connection, String connectionId)

public final OperationFuture<Connection,OperationMetadata> createConnectionAsync(String parent, Connection connection, String connectionId)

Creates a new Connection in a given project and location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Connection connection = Connection.newBuilder().build();
   String connectionId = "connectionId1923106969";
   Connection response =
       developerConnectClient.createConnectionAsync(parent, connection, connectionId).get();
 }
 
Parameters
Name Description
parent String

Required. Value for parent.

connection Connection

Required. The resource being created

connectionId String

Required. Id of the requesting object If auto-generating Id server-side, remove this field and connection_id from the method_signature of Create RPC

Returns
Type Description
OperationFuture<Connection,OperationMetadata>

createConnectionCallable()

public final UnaryCallable<CreateConnectionRequest,Operation> createConnectionCallable()

Creates a new Connection in a given project and location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   CreateConnectionRequest request =
       CreateConnectionRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setConnectionId("connectionId1923106969")
           .setConnection(Connection.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   ApiFuture<Operation> future =
       developerConnectClient.createConnectionCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateConnectionRequest,Operation>

createConnectionOperationCallable()

public final OperationCallable<CreateConnectionRequest,Connection,OperationMetadata> createConnectionOperationCallable()

Creates a new Connection in a given project and location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   CreateConnectionRequest request =
       CreateConnectionRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setConnectionId("connectionId1923106969")
           .setConnection(Connection.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   OperationFuture<Connection, OperationMetadata> future =
       developerConnectClient.createConnectionOperationCallable().futureCall(request);
   // Do something.
   Connection response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateConnectionRequest,Connection,OperationMetadata>
public final OperationFuture<GitRepositoryLink,OperationMetadata> createGitRepositoryLinkAsync(ConnectionName parent, GitRepositoryLink gitRepositoryLink, String gitRepositoryLinkId)

Creates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. All other Connections will have events forwarded to Cloud Build.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ConnectionName parent = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
   GitRepositoryLink gitRepositoryLink = GitRepositoryLink.newBuilder().build();
   String gitRepositoryLinkId = "gitRepositoryLinkId684669585";
   GitRepositoryLink response =
       developerConnectClient
           .createGitRepositoryLinkAsync(parent, gitRepositoryLink, gitRepositoryLinkId)
           .get();
 }
 
Parameters
Name Description
parent ConnectionName

Required. Value for parent.

gitRepositoryLink GitRepositoryLink

Required. The resource being created

gitRepositoryLinkId String

Required. The ID to use for the repository, which will become the final component of the repository's resource name. This ID should be unique in the connection. Allows alphanumeric characters and any of -._~%!$&amp;'()&#42;+,;=@.

Returns
Type Description
OperationFuture<GitRepositoryLink,OperationMetadata>

createGitRepositoryLinkAsync(CreateGitRepositoryLinkRequest request)

public final OperationFuture<GitRepositoryLink,OperationMetadata> createGitRepositoryLinkAsync(CreateGitRepositoryLinkRequest request)

Creates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. All other Connections will have events forwarded to Cloud Build.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   CreateGitRepositoryLinkRequest request =
       CreateGitRepositoryLinkRequest.newBuilder()
           .setParent(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setGitRepositoryLink(GitRepositoryLink.newBuilder().build())
           .setGitRepositoryLinkId("gitRepositoryLinkId684669585")
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   GitRepositoryLink response =
       developerConnectClient.createGitRepositoryLinkAsync(request).get();
 }
 
Parameter
Name Description
request CreateGitRepositoryLinkRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<GitRepositoryLink,OperationMetadata>
public final OperationFuture<GitRepositoryLink,OperationMetadata> createGitRepositoryLinkAsync(String parent, GitRepositoryLink gitRepositoryLink, String gitRepositoryLinkId)

Creates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. All other Connections will have events forwarded to Cloud Build.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String parent = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString();
   GitRepositoryLink gitRepositoryLink = GitRepositoryLink.newBuilder().build();
   String gitRepositoryLinkId = "gitRepositoryLinkId684669585";
   GitRepositoryLink response =
       developerConnectClient
           .createGitRepositoryLinkAsync(parent, gitRepositoryLink, gitRepositoryLinkId)
           .get();
 }
 
Parameters
Name Description
parent String

Required. Value for parent.

gitRepositoryLink GitRepositoryLink

Required. The resource being created

gitRepositoryLinkId String

Required. The ID to use for the repository, which will become the final component of the repository's resource name. This ID should be unique in the connection. Allows alphanumeric characters and any of -._~%!$&amp;'()&#42;+,;=@.

Returns
Type Description
OperationFuture<GitRepositoryLink,OperationMetadata>

createGitRepositoryLinkCallable()

public final UnaryCallable<CreateGitRepositoryLinkRequest,Operation> createGitRepositoryLinkCallable()

Creates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. All other Connections will have events forwarded to Cloud Build.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   CreateGitRepositoryLinkRequest request =
       CreateGitRepositoryLinkRequest.newBuilder()
           .setParent(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setGitRepositoryLink(GitRepositoryLink.newBuilder().build())
           .setGitRepositoryLinkId("gitRepositoryLinkId684669585")
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   ApiFuture<Operation> future =
       developerConnectClient.createGitRepositoryLinkCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateGitRepositoryLinkRequest,Operation>

createGitRepositoryLinkOperationCallable()

public final OperationCallable<CreateGitRepositoryLinkRequest,GitRepositoryLink,OperationMetadata> createGitRepositoryLinkOperationCallable()

Creates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. All other Connections will have events forwarded to Cloud Build.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   CreateGitRepositoryLinkRequest request =
       CreateGitRepositoryLinkRequest.newBuilder()
           .setParent(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setGitRepositoryLink(GitRepositoryLink.newBuilder().build())
           .setGitRepositoryLinkId("gitRepositoryLinkId684669585")
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   OperationFuture<GitRepositoryLink, OperationMetadata> future =
       developerConnectClient.createGitRepositoryLinkOperationCallable().futureCall(request);
   // Do something.
   GitRepositoryLink response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateGitRepositoryLinkRequest,GitRepositoryLink,OperationMetadata>

deleteConnectionAsync(ConnectionName name)

public final OperationFuture<Empty,OperationMetadata> deleteConnectionAsync(ConnectionName name)

Deletes a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
   developerConnectClient.deleteConnectionAsync(name).get();
 }
 
Parameter
Name Description
name ConnectionName

Required. Name of the resource

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteConnectionAsync(DeleteConnectionRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteConnectionAsync(DeleteConnectionRequest request)

Deletes a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   DeleteConnectionRequest request =
       DeleteConnectionRequest.newBuilder()
           .setName(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   developerConnectClient.deleteConnectionAsync(request).get();
 }
 
Parameter
Name Description
request DeleteConnectionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteConnectionAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteConnectionAsync(String name)

Deletes a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString();
   developerConnectClient.deleteConnectionAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Name of the resource

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteConnectionCallable()

public final UnaryCallable<DeleteConnectionRequest,Operation> deleteConnectionCallable()

Deletes a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   DeleteConnectionRequest request =
       DeleteConnectionRequest.newBuilder()
           .setName(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   ApiFuture<Operation> future =
       developerConnectClient.deleteConnectionCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteConnectionRequest,Operation>

deleteConnectionOperationCallable()

public final OperationCallable<DeleteConnectionRequest,Empty,OperationMetadata> deleteConnectionOperationCallable()

Deletes a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   DeleteConnectionRequest request =
       DeleteConnectionRequest.newBuilder()
           .setName(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       developerConnectClient.deleteConnectionOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteConnectionRequest,Empty,OperationMetadata>

deleteGitRepositoryLinkAsync(DeleteGitRepositoryLinkRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteGitRepositoryLinkAsync(DeleteGitRepositoryLinkRequest request)

Deletes a single GitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   DeleteGitRepositoryLinkRequest request =
       DeleteGitRepositoryLinkRequest.newBuilder()
           .setName(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   developerConnectClient.deleteGitRepositoryLinkAsync(request).get();
 }
 
Parameter
Name Description
request DeleteGitRepositoryLinkRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGitRepositoryLinkAsync(GitRepositoryLinkName name)

public final OperationFuture<Empty,OperationMetadata> deleteGitRepositoryLinkAsync(GitRepositoryLinkName name)

Deletes a single GitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GitRepositoryLinkName name =
       GitRepositoryLinkName.of(
           "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]");
   developerConnectClient.deleteGitRepositoryLinkAsync(name).get();
 }
 
Parameter
Name Description
name GitRepositoryLinkName

Required. Name of the resource

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGitRepositoryLinkAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteGitRepositoryLinkAsync(String name)

Deletes a single GitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String name =
       GitRepositoryLinkName.of(
               "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
           .toString();
   developerConnectClient.deleteGitRepositoryLinkAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Name of the resource

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGitRepositoryLinkCallable()

public final UnaryCallable<DeleteGitRepositoryLinkRequest,Operation> deleteGitRepositoryLinkCallable()

Deletes a single GitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   DeleteGitRepositoryLinkRequest request =
       DeleteGitRepositoryLinkRequest.newBuilder()
           .setName(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   ApiFuture<Operation> future =
       developerConnectClient.deleteGitRepositoryLinkCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteGitRepositoryLinkRequest,Operation>

deleteGitRepositoryLinkOperationCallable()

public final OperationCallable<DeleteGitRepositoryLinkRequest,Empty,OperationMetadata> deleteGitRepositoryLinkOperationCallable()

Deletes a single GitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   DeleteGitRepositoryLinkRequest request =
       DeleteGitRepositoryLinkRequest.newBuilder()
           .setName(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setEtag("etag3123477")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       developerConnectClient.deleteGitRepositoryLinkOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteGitRepositoryLinkRequest,Empty,OperationMetadata>

fetchGitHubInstallations(ConnectionName connection)

public final FetchGitHubInstallationsResponse fetchGitHubInstallations(ConnectionName connection)

FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection. For github.com, only installations accessible to the authorizer token are returned. For GitHub Enterprise, all installations are returned.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ConnectionName connection = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
   FetchGitHubInstallationsResponse response =
       developerConnectClient.fetchGitHubInstallations(connection);
 }
 
Parameter
Name Description
connection ConnectionName

Required. The resource name of the connection in the format projects/*/locations/*/connections/*.

Returns
Type Description
FetchGitHubInstallationsResponse

fetchGitHubInstallations(FetchGitHubInstallationsRequest request)

public final FetchGitHubInstallationsResponse fetchGitHubInstallations(FetchGitHubInstallationsRequest request)

FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection. For github.com, only installations accessible to the authorizer token are returned. For GitHub Enterprise, all installations are returned.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchGitHubInstallationsRequest request =
       FetchGitHubInstallationsRequest.newBuilder()
           .setConnection(
               ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .build();
   FetchGitHubInstallationsResponse response =
       developerConnectClient.fetchGitHubInstallations(request);
 }
 
Parameter
Name Description
request FetchGitHubInstallationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
FetchGitHubInstallationsResponse

fetchGitHubInstallations(String connection)

public final FetchGitHubInstallationsResponse fetchGitHubInstallations(String connection)

FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection. For github.com, only installations accessible to the authorizer token are returned. For GitHub Enterprise, all installations are returned.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String connection = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString();
   FetchGitHubInstallationsResponse response =
       developerConnectClient.fetchGitHubInstallations(connection);
 }
 
Parameter
Name Description
connection String

Required. The resource name of the connection in the format projects/*/locations/*/connections/*.

Returns
Type Description
FetchGitHubInstallationsResponse

fetchGitHubInstallationsCallable()

public final UnaryCallable<FetchGitHubInstallationsRequest,FetchGitHubInstallationsResponse> fetchGitHubInstallationsCallable()

FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection. For github.com, only installations accessible to the authorizer token are returned. For GitHub Enterprise, all installations are returned.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchGitHubInstallationsRequest request =
       FetchGitHubInstallationsRequest.newBuilder()
           .setConnection(
               ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .build();
   ApiFuture<FetchGitHubInstallationsResponse> future =
       developerConnectClient.fetchGitHubInstallationsCallable().futureCall(request);
   // Do something.
   FetchGitHubInstallationsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<FetchGitHubInstallationsRequest,FetchGitHubInstallationsResponse>

fetchGitRefs(FetchGitRefsRequest request)

public final DeveloperConnectClient.FetchGitRefsPagedResponse fetchGitRefs(FetchGitRefsRequest request)

Fetch the list of branches or tags for a given repository.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchGitRefsRequest request =
       FetchGitRefsRequest.newBuilder()
           .setGitRepositoryLink(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (String element : developerConnectClient.fetchGitRefs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request FetchGitRefsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
DeveloperConnectClient.FetchGitRefsPagedResponse

fetchGitRefs(GitRepositoryLinkName gitRepositoryLink, FetchGitRefsRequest.RefType refType)

public final DeveloperConnectClient.FetchGitRefsPagedResponse fetchGitRefs(GitRepositoryLinkName gitRepositoryLink, FetchGitRefsRequest.RefType refType)

Fetch the list of branches or tags for a given repository.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GitRepositoryLinkName gitRepositoryLink =
       GitRepositoryLinkName.of(
           "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]");
   FetchGitRefsRequest.RefType refType = FetchGitRefsRequest.RefType.forNumber(0);
   for (String element :
       developerConnectClient.fetchGitRefs(gitRepositoryLink, refType).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
Name Description
gitRepositoryLink GitRepositoryLinkName

Required. The resource name of GitRepositoryLink in the format projects/*/locations/*/connections/*/gitRepositoryLinks/*.

refType FetchGitRefsRequest.RefType

Required. Type of refs to fetch.

Returns
Type Description
DeveloperConnectClient.FetchGitRefsPagedResponse

fetchGitRefs(String gitRepositoryLink, FetchGitRefsRequest.RefType refType)

public final DeveloperConnectClient.FetchGitRefsPagedResponse fetchGitRefs(String gitRepositoryLink, FetchGitRefsRequest.RefType refType)

Fetch the list of branches or tags for a given repository.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String gitRepositoryLink =
       GitRepositoryLinkName.of(
               "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
           .toString();
   FetchGitRefsRequest.RefType refType = FetchGitRefsRequest.RefType.forNumber(0);
   for (String element :
       developerConnectClient.fetchGitRefs(gitRepositoryLink, refType).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
Name Description
gitRepositoryLink String

Required. The resource name of GitRepositoryLink in the format projects/*/locations/*/connections/*/gitRepositoryLinks/*.

refType FetchGitRefsRequest.RefType

Required. Type of refs to fetch.

Returns
Type Description
DeveloperConnectClient.FetchGitRefsPagedResponse

fetchGitRefsCallable()

public final UnaryCallable<FetchGitRefsRequest,FetchGitRefsResponse> fetchGitRefsCallable()

Fetch the list of branches or tags for a given repository.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchGitRefsRequest request =
       FetchGitRefsRequest.newBuilder()
           .setGitRepositoryLink(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     FetchGitRefsResponse response = developerConnectClient.fetchGitRefsCallable().call(request);
     for (String element : response.getRefNamesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<FetchGitRefsRequest,FetchGitRefsResponse>

fetchGitRefsPagedCallable()

public final UnaryCallable<FetchGitRefsRequest,DeveloperConnectClient.FetchGitRefsPagedResponse> fetchGitRefsPagedCallable()

Fetch the list of branches or tags for a given repository.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchGitRefsRequest request =
       FetchGitRefsRequest.newBuilder()
           .setGitRepositoryLink(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<String> future =
       developerConnectClient.fetchGitRefsPagedCallable().futureCall(request);
   // Do something.
   for (String element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<FetchGitRefsRequest,FetchGitRefsPagedResponse>

fetchLinkableGitRepositories(ConnectionName connection)

public final DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse fetchLinkableGitRepositories(ConnectionName connection)

FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ConnectionName connection = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
   for (LinkableGitRepository element :
       developerConnectClient.fetchLinkableGitRepositories(connection).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
connection ConnectionName

Required. The name of the Connection. Format: projects/*/locations/*/connections/*.

Returns
Type Description
DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse

fetchLinkableGitRepositories(FetchLinkableGitRepositoriesRequest request)

public final DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse fetchLinkableGitRepositories(FetchLinkableGitRepositoriesRequest request)

FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchLinkableGitRepositoriesRequest request =
       FetchLinkableGitRepositoriesRequest.newBuilder()
           .setConnection(
               ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (LinkableGitRepository element :
       developerConnectClient.fetchLinkableGitRepositories(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request FetchLinkableGitRepositoriesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse

fetchLinkableGitRepositories(String connection)

public final DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse fetchLinkableGitRepositories(String connection)

FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String connection = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString();
   for (LinkableGitRepository element :
       developerConnectClient.fetchLinkableGitRepositories(connection).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
connection String

Required. The name of the Connection. Format: projects/*/locations/*/connections/*.

Returns
Type Description
DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse

fetchLinkableGitRepositoriesCallable()

public final UnaryCallable<FetchLinkableGitRepositoriesRequest,FetchLinkableGitRepositoriesResponse> fetchLinkableGitRepositoriesCallable()

FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchLinkableGitRepositoriesRequest request =
       FetchLinkableGitRepositoriesRequest.newBuilder()
           .setConnection(
               ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     FetchLinkableGitRepositoriesResponse response =
         developerConnectClient.fetchLinkableGitRepositoriesCallable().call(request);
     for (LinkableGitRepository element : response.getLinkableGitRepositoriesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<FetchLinkableGitRepositoriesRequest,FetchLinkableGitRepositoriesResponse>

fetchLinkableGitRepositoriesPagedCallable()

public final UnaryCallable<FetchLinkableGitRepositoriesRequest,DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse> fetchLinkableGitRepositoriesPagedCallable()

FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchLinkableGitRepositoriesRequest request =
       FetchLinkableGitRepositoriesRequest.newBuilder()
           .setConnection(
               ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<LinkableGitRepository> future =
       developerConnectClient.fetchLinkableGitRepositoriesPagedCallable().futureCall(request);
   // Do something.
   for (LinkableGitRepository element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<FetchLinkableGitRepositoriesRequest,FetchLinkableGitRepositoriesPagedResponse>

fetchReadToken(FetchReadTokenRequest request)

public final FetchReadTokenResponse fetchReadToken(FetchReadTokenRequest request)

Fetches read token of a given gitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchReadTokenRequest request =
       FetchReadTokenRequest.newBuilder()
           .setGitRepositoryLink(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .build();
   FetchReadTokenResponse response = developerConnectClient.fetchReadToken(request);
 }
 
Parameter
Name Description
request FetchReadTokenRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
FetchReadTokenResponse

fetchReadToken(GitRepositoryLinkName gitRepositoryLink)

public final FetchReadTokenResponse fetchReadToken(GitRepositoryLinkName gitRepositoryLink)

Fetches read token of a given gitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GitRepositoryLinkName gitRepositoryLink =
       GitRepositoryLinkName.of(
           "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]");
   FetchReadTokenResponse response = developerConnectClient.fetchReadToken(gitRepositoryLink);
 }
 
Parameter
Name Description
gitRepositoryLink GitRepositoryLinkName

Required. The resource name of the gitRepositoryLink in the format projects/*/locations/*/connections/*/gitRepositoryLinks/*.

Returns
Type Description
FetchReadTokenResponse

fetchReadToken(String gitRepositoryLink)

public final FetchReadTokenResponse fetchReadToken(String gitRepositoryLink)

Fetches read token of a given gitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String gitRepositoryLink =
       GitRepositoryLinkName.of(
               "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
           .toString();
   FetchReadTokenResponse response = developerConnectClient.fetchReadToken(gitRepositoryLink);
 }
 
Parameter
Name Description
gitRepositoryLink String

Required. The resource name of the gitRepositoryLink in the format projects/*/locations/*/connections/*/gitRepositoryLinks/*.

Returns
Type Description
FetchReadTokenResponse

fetchReadTokenCallable()

public final UnaryCallable<FetchReadTokenRequest,FetchReadTokenResponse> fetchReadTokenCallable()

Fetches read token of a given gitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchReadTokenRequest request =
       FetchReadTokenRequest.newBuilder()
           .setGitRepositoryLink(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .build();
   ApiFuture<FetchReadTokenResponse> future =
       developerConnectClient.fetchReadTokenCallable().futureCall(request);
   // Do something.
   FetchReadTokenResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<FetchReadTokenRequest,FetchReadTokenResponse>

fetchReadWriteToken(FetchReadWriteTokenRequest request)

public final FetchReadWriteTokenResponse fetchReadWriteToken(FetchReadWriteTokenRequest request)

Fetches read/write token of a given gitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchReadWriteTokenRequest request =
       FetchReadWriteTokenRequest.newBuilder()
           .setGitRepositoryLink(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .build();
   FetchReadWriteTokenResponse response = developerConnectClient.fetchReadWriteToken(request);
 }
 
Parameter
Name Description
request FetchReadWriteTokenRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
FetchReadWriteTokenResponse

fetchReadWriteToken(GitRepositoryLinkName gitRepositoryLink)

public final FetchReadWriteTokenResponse fetchReadWriteToken(GitRepositoryLinkName gitRepositoryLink)

Fetches read/write token of a given gitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GitRepositoryLinkName gitRepositoryLink =
       GitRepositoryLinkName.of(
           "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]");
   FetchReadWriteTokenResponse response =
       developerConnectClient.fetchReadWriteToken(gitRepositoryLink);
 }
 
Parameter
Name Description
gitRepositoryLink GitRepositoryLinkName

Required. The resource name of the gitRepositoryLink in the format projects/*/locations/*/connections/*/gitRepositoryLinks/*.

Returns
Type Description
FetchReadWriteTokenResponse

fetchReadWriteToken(String gitRepositoryLink)

public final FetchReadWriteTokenResponse fetchReadWriteToken(String gitRepositoryLink)

Fetches read/write token of a given gitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String gitRepositoryLink =
       GitRepositoryLinkName.of(
               "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
           .toString();
   FetchReadWriteTokenResponse response =
       developerConnectClient.fetchReadWriteToken(gitRepositoryLink);
 }
 
Parameter
Name Description
gitRepositoryLink String

Required. The resource name of the gitRepositoryLink in the format projects/*/locations/*/connections/*/gitRepositoryLinks/*.

Returns
Type Description
FetchReadWriteTokenResponse

fetchReadWriteTokenCallable()

public final UnaryCallable<FetchReadWriteTokenRequest,FetchReadWriteTokenResponse> fetchReadWriteTokenCallable()

Fetches read/write token of a given gitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   FetchReadWriteTokenRequest request =
       FetchReadWriteTokenRequest.newBuilder()
           .setGitRepositoryLink(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .build();
   ApiFuture<FetchReadWriteTokenResponse> future =
       developerConnectClient.fetchReadWriteTokenCallable().futureCall(request);
   // Do something.
   FetchReadWriteTokenResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<FetchReadWriteTokenRequest,FetchReadWriteTokenResponse>

getConnection(ConnectionName name)

public final Connection getConnection(ConnectionName name)

Gets details of a single Connection.

Sample code:


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

Required. Name of the resource

Returns
Type Description
Connection

getConnection(GetConnectionRequest request)

public final Connection getConnection(GetConnectionRequest request)

Gets details of a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GetConnectionRequest request =
       GetConnectionRequest.newBuilder()
           .setName(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .build();
   Connection response = developerConnectClient.getConnection(request);
 }
 
Parameter
Name Description
request GetConnectionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Connection

getConnection(String name)

public final Connection getConnection(String name)

Gets details of a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString();
   Connection response = developerConnectClient.getConnection(name);
 }
 
Parameter
Name Description
name String

Required. Name of the resource

Returns
Type Description
Connection

getConnectionCallable()

public final UnaryCallable<GetConnectionRequest,Connection> getConnectionCallable()

Gets details of a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GetConnectionRequest request =
       GetConnectionRequest.newBuilder()
           .setName(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .build();
   ApiFuture<Connection> future =
       developerConnectClient.getConnectionCallable().futureCall(request);
   // Do something.
   Connection response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetConnectionRequest,Connection>
public final GitRepositoryLink getGitRepositoryLink(GetGitRepositoryLinkRequest request)

Gets details of a single GitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GetGitRepositoryLinkRequest request =
       GetGitRepositoryLinkRequest.newBuilder()
           .setName(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .build();
   GitRepositoryLink response = developerConnectClient.getGitRepositoryLink(request);
 }
 
Parameter
Name Description
request GetGitRepositoryLinkRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GitRepositoryLink
public final GitRepositoryLink getGitRepositoryLink(GitRepositoryLinkName name)

Gets details of a single GitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GitRepositoryLinkName name =
       GitRepositoryLinkName.of(
           "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]");
   GitRepositoryLink response = developerConnectClient.getGitRepositoryLink(name);
 }
 
Parameter
Name Description
name GitRepositoryLinkName

Required. Name of the resource

Returns
Type Description
GitRepositoryLink
public final GitRepositoryLink getGitRepositoryLink(String name)

Gets details of a single GitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String name =
       GitRepositoryLinkName.of(
               "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
           .toString();
   GitRepositoryLink response = developerConnectClient.getGitRepositoryLink(name);
 }
 
Parameter
Name Description
name String

Required. Name of the resource

Returns
Type Description
GitRepositoryLink

getGitRepositoryLinkCallable()

public final UnaryCallable<GetGitRepositoryLinkRequest,GitRepositoryLink> getGitRepositoryLinkCallable()

Gets details of a single GitRepositoryLink.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GetGitRepositoryLinkRequest request =
       GetGitRepositoryLinkRequest.newBuilder()
           .setName(
               GitRepositoryLinkName.of(
                       "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]")
                   .toString())
           .build();
   ApiFuture<GitRepositoryLink> future =
       developerConnectClient.getGitRepositoryLinkCallable().futureCall(request);
   // Do something.
   GitRepositoryLink response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetGitRepositoryLinkRequest,GitRepositoryLink>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = developerConnectClient.getLocation(request);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future = developerConnectClient.getLocationCallable().futureCall(request);
   // Do something.
   Location response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getSettings()

public final DeveloperConnectSettings getSettings()
Returns
Type Description
DeveloperConnectSettings

getStub()

public DeveloperConnectStub getStub()
Returns
Type Description
DeveloperConnectStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listConnections(ListConnectionsRequest request)

public final DeveloperConnectClient.ListConnectionsPagedResponse listConnections(ListConnectionsRequest request)

Lists Connections in a given project and location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ListConnectionsRequest request =
       ListConnectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Connection element : developerConnectClient.listConnections(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListConnectionsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
DeveloperConnectClient.ListConnectionsPagedResponse

listConnections(LocationName parent)

public final DeveloperConnectClient.ListConnectionsPagedResponse listConnections(LocationName parent)

Lists Connections in a given project and location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Connection element : developerConnectClient.listConnections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. Parent value for ListConnectionsRequest

Returns
Type Description
DeveloperConnectClient.ListConnectionsPagedResponse

listConnections(String parent)

public final DeveloperConnectClient.ListConnectionsPagedResponse listConnections(String parent)

Lists Connections in a given project and location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Connection element : developerConnectClient.listConnections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. Parent value for ListConnectionsRequest

Returns
Type Description
DeveloperConnectClient.ListConnectionsPagedResponse

listConnectionsCallable()

public final UnaryCallable<ListConnectionsRequest,ListConnectionsResponse> listConnectionsCallable()

Lists Connections in a given project and location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ListConnectionsRequest request =
       ListConnectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListConnectionsResponse response =
         developerConnectClient.listConnectionsCallable().call(request);
     for (Connection element : response.getConnectionsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListConnectionsRequest,ListConnectionsResponse>

listConnectionsPagedCallable()

public final UnaryCallable<ListConnectionsRequest,DeveloperConnectClient.ListConnectionsPagedResponse> listConnectionsPagedCallable()

Lists Connections in a given project and location.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ListConnectionsRequest request =
       ListConnectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Connection> future =
       developerConnectClient.listConnectionsPagedCallable().futureCall(request);
   // Do something.
   for (Connection element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListConnectionsRequest,ListConnectionsPagedResponse>
public final DeveloperConnectClient.ListGitRepositoryLinksPagedResponse listGitRepositoryLinks(ConnectionName parent)

Lists GitRepositoryLinks in a given project, location, and connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ConnectionName parent = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
   for (GitRepositoryLink element :
       developerConnectClient.listGitRepositoryLinks(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent ConnectionName

Required. Parent value for ListGitRepositoryLinksRequest

Returns
Type Description
DeveloperConnectClient.ListGitRepositoryLinksPagedResponse
public final DeveloperConnectClient.ListGitRepositoryLinksPagedResponse listGitRepositoryLinks(ListGitRepositoryLinksRequest request)

Lists GitRepositoryLinks in a given project, location, and connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ListGitRepositoryLinksRequest request =
       ListGitRepositoryLinksRequest.newBuilder()
           .setParent(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (GitRepositoryLink element :
       developerConnectClient.listGitRepositoryLinks(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListGitRepositoryLinksRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
DeveloperConnectClient.ListGitRepositoryLinksPagedResponse
public final DeveloperConnectClient.ListGitRepositoryLinksPagedResponse listGitRepositoryLinks(String parent)

Lists GitRepositoryLinks in a given project, location, and connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   String parent = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString();
   for (GitRepositoryLink element :
       developerConnectClient.listGitRepositoryLinks(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. Parent value for ListGitRepositoryLinksRequest

Returns
Type Description
DeveloperConnectClient.ListGitRepositoryLinksPagedResponse

listGitRepositoryLinksCallable()

public final UnaryCallable<ListGitRepositoryLinksRequest,ListGitRepositoryLinksResponse> listGitRepositoryLinksCallable()

Lists GitRepositoryLinks in a given project, location, and connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ListGitRepositoryLinksRequest request =
       ListGitRepositoryLinksRequest.newBuilder()
           .setParent(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListGitRepositoryLinksResponse response =
         developerConnectClient.listGitRepositoryLinksCallable().call(request);
     for (GitRepositoryLink element : response.getGitRepositoryLinksList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListGitRepositoryLinksRequest,ListGitRepositoryLinksResponse>

listGitRepositoryLinksPagedCallable()

public final UnaryCallable<ListGitRepositoryLinksRequest,DeveloperConnectClient.ListGitRepositoryLinksPagedResponse> listGitRepositoryLinksPagedCallable()

Lists GitRepositoryLinks in a given project, location, and connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ListGitRepositoryLinksRequest request =
       ListGitRepositoryLinksRequest.newBuilder()
           .setParent(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<GitRepositoryLink> future =
       developerConnectClient.listGitRepositoryLinksPagedCallable().futureCall(request);
   // Do something.
   for (GitRepositoryLink element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListGitRepositoryLinksRequest,ListGitRepositoryLinksPagedResponse>

listLocations(ListLocationsRequest request)

public final DeveloperConnectClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Location element : developerConnectClient.listLocations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
DeveloperConnectClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLocationsResponse response =
         developerConnectClient.listLocationsCallable().call(request);
     for (Location element : response.getLocationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,DeveloperConnectClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Location> future =
       developerConnectClient.listLocationsPagedCallable().futureCall(request);
   // Do something.
   for (Location element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateConnectionAsync(Connection connection, FieldMask updateMask)

public final OperationFuture<Connection,OperationMetadata> updateConnectionAsync(Connection connection, FieldMask updateMask)

Updates the parameters of a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   Connection connection = Connection.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Connection response =
       developerConnectClient.updateConnectionAsync(connection, updateMask).get();
 }
 
Parameters
Name Description
connection Connection

Required. The resource being updated

updateMask FieldMask

Required. Field mask is used to specify the fields to be overwritten in the Connection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Returns
Type Description
OperationFuture<Connection,OperationMetadata>

updateConnectionAsync(UpdateConnectionRequest request)

public final OperationFuture<Connection,OperationMetadata> updateConnectionAsync(UpdateConnectionRequest request)

Updates the parameters of a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   UpdateConnectionRequest request =
       UpdateConnectionRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnection(Connection.newBuilder().build())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .build();
   Connection response = developerConnectClient.updateConnectionAsync(request).get();
 }
 
Parameter
Name Description
request UpdateConnectionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Connection,OperationMetadata>

updateConnectionCallable()

public final UnaryCallable<UpdateConnectionRequest,Operation> updateConnectionCallable()

Updates the parameters of a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   UpdateConnectionRequest request =
       UpdateConnectionRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnection(Connection.newBuilder().build())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .build();
   ApiFuture<Operation> future =
       developerConnectClient.updateConnectionCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateConnectionRequest,Operation>

updateConnectionOperationCallable()

public final OperationCallable<UpdateConnectionRequest,Connection,OperationMetadata> updateConnectionOperationCallable()

Updates the parameters of a single Connection.

Sample code:


 // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
   UpdateConnectionRequest request =
       UpdateConnectionRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setConnection(Connection.newBuilder().build())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .setValidateOnly(true)
           .build();
   OperationFuture<Connection, OperationMetadata> future =
       developerConnectClient.updateConnectionOperationCallable().futureCall(request);
   // Do something.
   Connection response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateConnectionRequest,Connection,OperationMetadata>