Class DeveloperConnectClient

java.lang.Object
com.google.cloud.developerconnect.v1.DeveloperConnectClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class DeveloperConnectClient extends Object implements BackgroundResource
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. Connections that use Gemini Code Assist will have events forwarded to Gemini Code Assist 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()

ListAccountConnectors

Lists AccountConnectors in a given project and location.

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

  • listAccountConnectors(ListAccountConnectorsRequest request)

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

  • listAccountConnectors(LocationName parent)

  • listAccountConnectors(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.

  • listAccountConnectorsPagedCallable()

  • listAccountConnectorsCallable()

GetAccountConnector

Gets details of a single AccountConnector.

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

  • getAccountConnector(GetAccountConnectorRequest request)

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

  • getAccountConnector(AccountConnectorName name)

  • getAccountConnector(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.

  • getAccountConnectorCallable()

CreateAccountConnector

Creates a new AccountConnector in a given project and location.

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

  • createAccountConnectorAsync(CreateAccountConnectorRequest request)

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

  • createAccountConnectorAsync(LocationName parent, AccountConnector accountConnector, String accountConnectorId)

  • createAccountConnectorAsync(String parent, AccountConnector accountConnector, String accountConnectorId)

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

  • createAccountConnectorOperationCallable()

  • createAccountConnectorCallable()

UpdateAccountConnector

Updates the parameters of a single AccountConnector.

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

  • updateAccountConnectorAsync(UpdateAccountConnectorRequest request)

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

  • updateAccountConnectorAsync(AccountConnector accountConnector, 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.

  • updateAccountConnectorOperationCallable()

  • updateAccountConnectorCallable()

DeleteAccountConnector

Deletes a single AccountConnector.

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

  • deleteAccountConnectorAsync(DeleteAccountConnectorRequest request)

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

  • deleteAccountConnectorAsync(AccountConnectorName name)

  • deleteAccountConnectorAsync(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.

  • deleteAccountConnectorOperationCallable()

  • deleteAccountConnectorCallable()

FetchAccessToken

Fetches OAuth access token based on end user credentials.

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

  • fetchAccessToken(FetchAccessTokenRequest request)

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

  • fetchAccessToken(AccountConnectorName accountConnector)

  • fetchAccessToken(String accountConnector)

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

  • fetchAccessTokenCallable()

ListUsers

Lists Users in a given project, location, and account_connector.

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

  • listUsers(ListUsersRequest request)

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

  • listUsers(AccountConnectorName parent)

  • listUsers(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.

  • listUsersPagedCallable()

  • listUsersCallable()

DeleteUser

Deletes a single User.

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

  • deleteUserAsync(DeleteUserRequest request)

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

  • deleteUserAsync(UserName name)

  • deleteUserAsync(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.

  • deleteUserOperationCallable()

  • deleteUserCallable()

FetchSelf

Fetch the User based on the user credentials.

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

  • fetchSelf(FetchSelfRequest request)

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

  • fetchSelf(AccountConnectorName name)

  • fetchSelf(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.

  • fetchSelfCallable()

DeleteSelf

Delete the User based on the user credentials.

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

  • deleteSelfAsync(DeleteSelfRequest request)

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

  • deleteSelfAsync(AccountConnectorName name)

  • deleteSelfAsync(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.

  • deleteSelfOperationCallable()

  • deleteSelfCallable()

StartOAuth

Starts OAuth flow for an account connector.

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

  • startOAuth(StartOAuthRequest request)

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

  • startOAuth(AccountConnectorName accountConnector)

  • startOAuth(String accountConnector)

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

  • startOAuthCallable()

FinishOAuth

Finishes OAuth flow for an account connector.

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

  • finishOAuth(FinishOAuthRequest request)

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

  • finishOAuth(AccountConnectorName accountConnector)

  • finishOAuth(String accountConnector)

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

  • finishOAuthCallable()

ListLocations

Lists information about the supported locations for this service.This method can be called in two ways:

* **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

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.

  • Constructor Details

    • DeveloperConnectClient

      protected DeveloperConnectClient(DeveloperConnectSettings settings) throws IOException
      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.
      Throws:
      IOException
    • DeveloperConnectClient

      protected DeveloperConnectClient(DeveloperConnectStub stub)
  • Method Details

    • create

      public static final DeveloperConnectClient create() throws IOException
      Constructs an instance of DeveloperConnectClient with default settings.
      Throws:
      IOException
    • create

      public static final DeveloperConnectClient create(DeveloperConnectSettings settings) throws IOException
      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.
      Throws:
      IOException
    • create

      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).
    • getSettings

      public final DeveloperConnectSettings getSettings()
    • getStub

      public DeveloperConnectStub getStub()
    • 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.
    • getHttpJsonOperationsClient

      @BetaApi 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.
    • listConnections

      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);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListConnectionsRequest
      Throws:
      ApiException - if the remote call fails
    • listConnections

      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);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListConnectionsRequest
      Throws:
      ApiException - if the remote call fails
    • listConnections

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • getConnection

      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);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getConnection

      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);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getConnection

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • createConnectionAsync

      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:
      parent - Required. Value for parent.
      connection - Required. The resource being created
      connectionId - 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
      Throws:
      ApiException - if the remote call fails
    • createConnectionAsync

      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:
      parent - Required. Value for parent.
      connection - Required. The resource being created
      connectionId - 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
      Throws:
      ApiException - if the remote call fails
    • createConnectionAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • updateConnectionAsync

      public final OperationFuture<Connection,OperationMetadata> updateConnectionAsync(Connection connection, com.google.protobuf.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:
      connection - Required. The resource being updated
      updateMask - 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.
      Throws:
      ApiException - if the remote call fails
    • updateConnectionAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • deleteConnectionAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteConnectionAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteConnectionAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteConnectionOperationCallable

      public final OperationCallable<DeleteConnectionRequest,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • createGitRepositoryLinkAsync

      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. Connections that use Gemini Code Assist will have events forwarded to Gemini Code Assist 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:
      parent - Required. Value for parent.
      gitRepositoryLink - Required. The resource being created
      gitRepositoryLinkId - 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 -._~%!$&'()*+,;=@.
      Throws:
      ApiException - if the remote call fails
    • createGitRepositoryLinkAsync

      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. Connections that use Gemini Code Assist will have events forwarded to Gemini Code Assist 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:
      parent - Required. Value for parent.
      gitRepositoryLink - Required. The resource being created
      gitRepositoryLinkId - 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 -._~%!$&'()*+,;=@.
      Throws:
      ApiException - if the remote call fails
    • createGitRepositoryLinkAsync

      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. Connections that use Gemini Code Assist will have events forwarded to Gemini Code Assist 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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. Connections that use Gemini Code Assist will have events forwarded to Gemini Code Assist 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();
       }
       
    • 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. Connections that use Gemini Code Assist will have events forwarded to Gemini Code Assist 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();
       }
       
    • deleteGitRepositoryLinkAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteGitRepositoryLinkAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteGitRepositoryLinkAsync

      public final OperationFuture<com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteGitRepositoryLinkOperationCallable

      public final OperationCallable<DeleteGitRepositoryLinkRequest,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • listGitRepositoryLinks

      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);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListGitRepositoryLinksRequest
      Throws:
      ApiException - if the remote call fails
    • listGitRepositoryLinks

      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);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListGitRepositoryLinksRequest
      Throws:
      ApiException - if the remote call fails
    • listGitRepositoryLinks

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • getGitRepositoryLink

      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);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getGitRepositoryLink

      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);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getGitRepositoryLink

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • fetchReadWriteToken

      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);
       }
       
      Parameters:
      gitRepositoryLink - Required. The resource name of the gitRepositoryLink in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchReadWriteToken

      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);
       }
       
      Parameters:
      gitRepositoryLink - Required. The resource name of the gitRepositoryLink in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchReadWriteToken

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • fetchReadToken

      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);
       }
       
      Parameters:
      gitRepositoryLink - Required. The resource name of the gitRepositoryLink in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchReadToken

      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);
       }
       
      Parameters:
      gitRepositoryLink - Required. The resource name of the gitRepositoryLink in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchReadToken

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • fetchLinkableGitRepositories

      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);
         }
       }
       
      Parameters:
      connection - Required. The name of the Connection. Format: `projects/*/locations/*/connections/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchLinkableGitRepositories

      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);
         }
       }
       
      Parameters:
      connection - Required. The name of the Connection. Format: `projects/*/locations/*/connections/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchLinkableGitRepositories

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • fetchGitHubInstallations

      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);
       }
       
      Parameters:
      connection - Required. The resource name of the connection in the format `projects/*/locations/*/connections/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchGitHubInstallations

      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);
       }
       
      Parameters:
      connection - Required. The resource name of the connection in the format `projects/*/locations/*/connections/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchGitHubInstallations

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • fetchGitRefs

      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:
      gitRepositoryLink - Required. The resource name of GitRepositoryLink in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
      refType - Required. Type of refs to fetch.
      Throws:
      ApiException - if the remote call fails
    • fetchGitRefs

      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:
      gitRepositoryLink - Required. The resource name of GitRepositoryLink in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
      refType - Required. Type of refs to fetch.
      Throws:
      ApiException - if the remote call fails
    • fetchGitRefs

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • listAccountConnectors

      public final DeveloperConnectClient.ListAccountConnectorsPagedResponse listAccountConnectors(LocationName parent)
      Lists AccountConnectors 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 (AccountConnector element :
             developerConnectClient.listAccountConnectors(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListAccountConnectorsRequest
      Throws:
      ApiException - if the remote call fails
    • listAccountConnectors

      public final DeveloperConnectClient.ListAccountConnectorsPagedResponse listAccountConnectors(String parent)
      Lists AccountConnectors 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 (AccountConnector element :
             developerConnectClient.listAccountConnectors(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListAccountConnectorsRequest
      Throws:
      ApiException - if the remote call fails
    • listAccountConnectors

      Lists AccountConnectors 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()) {
         ListAccountConnectorsRequest request =
             ListAccountConnectorsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (AccountConnector element :
             developerConnectClient.listAccountConnectors(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listAccountConnectorsPagedCallable

      Lists AccountConnectors 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()) {
         ListAccountConnectorsRequest request =
             ListAccountConnectorsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<AccountConnector> future =
             developerConnectClient.listAccountConnectorsPagedCallable().futureCall(request);
         // Do something.
         for (AccountConnector element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listAccountConnectorsCallable

      public final UnaryCallable<ListAccountConnectorsRequest,ListAccountConnectorsResponse> listAccountConnectorsCallable()
      Lists AccountConnectors 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()) {
         ListAccountConnectorsRequest request =
             ListAccountConnectorsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListAccountConnectorsResponse response =
               developerConnectClient.listAccountConnectorsCallable().call(request);
           for (AccountConnector element : response.getAccountConnectorsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getAccountConnector

      public final AccountConnector getAccountConnector(AccountConnectorName name)
      Gets details of a single AccountConnector.

      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()) {
         AccountConnectorName name =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
         AccountConnector response = developerConnectClient.getAccountConnector(name);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getAccountConnector

      public final AccountConnector getAccountConnector(String name)
      Gets details of a single AccountConnector.

      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 =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
         AccountConnector response = developerConnectClient.getAccountConnector(name);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getAccountConnector

      public final AccountConnector getAccountConnector(GetAccountConnectorRequest request)
      Gets details of a single AccountConnector.

      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()) {
         GetAccountConnectorRequest request =
             GetAccountConnectorRequest.newBuilder()
                 .setName(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         AccountConnector response = developerConnectClient.getAccountConnector(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getAccountConnectorCallable

      public final UnaryCallable<GetAccountConnectorRequest,AccountConnector> getAccountConnectorCallable()
      Gets details of a single AccountConnector.

      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()) {
         GetAccountConnectorRequest request =
             GetAccountConnectorRequest.newBuilder()
                 .setName(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         ApiFuture<AccountConnector> future =
             developerConnectClient.getAccountConnectorCallable().futureCall(request);
         // Do something.
         AccountConnector response = future.get();
       }
       
    • createAccountConnectorAsync

      public final OperationFuture<AccountConnector,OperationMetadata> createAccountConnectorAsync(LocationName parent, AccountConnector accountConnector, String accountConnectorId)
      Creates a new AccountConnector 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]");
         AccountConnector accountConnector = AccountConnector.newBuilder().build();
         String accountConnectorId = "accountConnectorId-605811237";
         AccountConnector response =
             developerConnectClient
                 .createAccountConnectorAsync(parent, accountConnector, accountConnectorId)
                 .get();
       }
       
      Parameters:
      parent - Required. Location resource name as the account_connector’s parent.
      accountConnector - Required. The AccountConnector to create.
      accountConnectorId - Required. The ID to use for the AccountConnector, which will become the final component of the AccountConnector's resource name. Its format should adhere to https://google.aip.dev/122#resource-id-segments Names must be unique per-project per-location.
      Throws:
      ApiException - if the remote call fails
    • createAccountConnectorAsync

      public final OperationFuture<AccountConnector,OperationMetadata> createAccountConnectorAsync(String parent, AccountConnector accountConnector, String accountConnectorId)
      Creates a new AccountConnector 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();
         AccountConnector accountConnector = AccountConnector.newBuilder().build();
         String accountConnectorId = "accountConnectorId-605811237";
         AccountConnector response =
             developerConnectClient
                 .createAccountConnectorAsync(parent, accountConnector, accountConnectorId)
                 .get();
       }
       
      Parameters:
      parent - Required. Location resource name as the account_connector’s parent.
      accountConnector - Required. The AccountConnector to create.
      accountConnectorId - Required. The ID to use for the AccountConnector, which will become the final component of the AccountConnector's resource name. Its format should adhere to https://google.aip.dev/122#resource-id-segments Names must be unique per-project per-location.
      Throws:
      ApiException - if the remote call fails
    • createAccountConnectorAsync

      public final OperationFuture<AccountConnector,OperationMetadata> createAccountConnectorAsync(CreateAccountConnectorRequest request)
      Creates a new AccountConnector 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()) {
         CreateAccountConnectorRequest request =
             CreateAccountConnectorRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setAccountConnectorId("accountConnectorId-605811237")
                 .setAccountConnector(AccountConnector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .build();
         AccountConnector response = developerConnectClient.createAccountConnectorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createAccountConnectorOperationCallable

      public final OperationCallable<CreateAccountConnectorRequest,AccountConnector,OperationMetadata> createAccountConnectorOperationCallable()
      Creates a new AccountConnector 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()) {
         CreateAccountConnectorRequest request =
             CreateAccountConnectorRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setAccountConnectorId("accountConnectorId-605811237")
                 .setAccountConnector(AccountConnector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .build();
         OperationFuture<AccountConnector, OperationMetadata> future =
             developerConnectClient.createAccountConnectorOperationCallable().futureCall(request);
         // Do something.
         AccountConnector response = future.get();
       }
       
    • createAccountConnectorCallable

      public final UnaryCallable<CreateAccountConnectorRequest,Operation> createAccountConnectorCallable()
      Creates a new AccountConnector 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()) {
         CreateAccountConnectorRequest request =
             CreateAccountConnectorRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setAccountConnectorId("accountConnectorId-605811237")
                 .setAccountConnector(AccountConnector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future =
             developerConnectClient.createAccountConnectorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateAccountConnectorAsync

      public final OperationFuture<AccountConnector,OperationMetadata> updateAccountConnectorAsync(AccountConnector accountConnector, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single AccountConnector.

      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()) {
         AccountConnector accountConnector = AccountConnector.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         AccountConnector response =
             developerConnectClient.updateAccountConnectorAsync(accountConnector, updateMask).get();
       }
       
      Parameters:
      accountConnector - Required. The AccountConnector to update.
      updateMask - Optional. The list of fields to be updated.
      Throws:
      ApiException - if the remote call fails
    • updateAccountConnectorAsync

      public final OperationFuture<AccountConnector,OperationMetadata> updateAccountConnectorAsync(UpdateAccountConnectorRequest request)
      Updates the parameters of a single AccountConnector.

      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()) {
         UpdateAccountConnectorRequest request =
             UpdateAccountConnectorRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAccountConnector(AccountConnector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         AccountConnector response = developerConnectClient.updateAccountConnectorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateAccountConnectorOperationCallable

      public final OperationCallable<UpdateAccountConnectorRequest,AccountConnector,OperationMetadata> updateAccountConnectorOperationCallable()
      Updates the parameters of a single AccountConnector.

      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()) {
         UpdateAccountConnectorRequest request =
             UpdateAccountConnectorRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAccountConnector(AccountConnector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         OperationFuture<AccountConnector, OperationMetadata> future =
             developerConnectClient.updateAccountConnectorOperationCallable().futureCall(request);
         // Do something.
         AccountConnector response = future.get();
       }
       
    • updateAccountConnectorCallable

      public final UnaryCallable<UpdateAccountConnectorRequest,Operation> updateAccountConnectorCallable()
      Updates the parameters of a single AccountConnector.

      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()) {
         UpdateAccountConnectorRequest request =
             UpdateAccountConnectorRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAccountConnector(AccountConnector.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future =
             developerConnectClient.updateAccountConnectorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteAccountConnectorAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAccountConnectorAsync(AccountConnectorName name)
      Deletes a single AccountConnector.

      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()) {
         AccountConnectorName name =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
         developerConnectClient.deleteAccountConnectorAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteAccountConnectorAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAccountConnectorAsync(String name)
      Deletes a single AccountConnector.

      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 =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
         developerConnectClient.deleteAccountConnectorAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteAccountConnectorAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAccountConnectorAsync(DeleteAccountConnectorRequest request)
      Deletes a single AccountConnector.

      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()) {
         DeleteAccountConnectorRequest request =
             DeleteAccountConnectorRequest.newBuilder()
                 .setName(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setEtag("etag3123477")
                 .setForce(true)
                 .build();
         developerConnectClient.deleteAccountConnectorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteAccountConnectorOperationCallable

      public final OperationCallable<DeleteAccountConnectorRequest,com.google.protobuf.Empty,OperationMetadata> deleteAccountConnectorOperationCallable()
      Deletes a single AccountConnector.

      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()) {
         DeleteAccountConnectorRequest request =
             DeleteAccountConnectorRequest.newBuilder()
                 .setName(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setEtag("etag3123477")
                 .setForce(true)
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             developerConnectClient.deleteAccountConnectorOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteAccountConnectorCallable

      public final UnaryCallable<DeleteAccountConnectorRequest,Operation> deleteAccountConnectorCallable()
      Deletes a single AccountConnector.

      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()) {
         DeleteAccountConnectorRequest request =
             DeleteAccountConnectorRequest.newBuilder()
                 .setName(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setEtag("etag3123477")
                 .setForce(true)
                 .build();
         ApiFuture<Operation> future =
             developerConnectClient.deleteAccountConnectorCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • fetchAccessToken

      public final FetchAccessTokenResponse fetchAccessToken(AccountConnectorName accountConnector)
      Fetches OAuth access token based on end user credentials.

      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()) {
         AccountConnectorName accountConnector =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
         FetchAccessTokenResponse response = developerConnectClient.fetchAccessToken(accountConnector);
       }
       
      Parameters:
      accountConnector - Required. The resource name of the AccountConnector in the format `projects/*/locations/*/accountConnectors/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchAccessToken

      public final FetchAccessTokenResponse fetchAccessToken(String accountConnector)
      Fetches OAuth access token based on end user credentials.

      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 accountConnector =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
         FetchAccessTokenResponse response = developerConnectClient.fetchAccessToken(accountConnector);
       }
       
      Parameters:
      accountConnector - Required. The resource name of the AccountConnector in the format `projects/*/locations/*/accountConnectors/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchAccessToken

      public final FetchAccessTokenResponse fetchAccessToken(FetchAccessTokenRequest request)
      Fetches OAuth access token based on end user credentials.

      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()) {
         FetchAccessTokenRequest request =
             FetchAccessTokenRequest.newBuilder()
                 .setAccountConnector(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         FetchAccessTokenResponse response = developerConnectClient.fetchAccessToken(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • fetchAccessTokenCallable

      public final UnaryCallable<FetchAccessTokenRequest,FetchAccessTokenResponse> fetchAccessTokenCallable()
      Fetches OAuth access token based on end user credentials.

      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()) {
         FetchAccessTokenRequest request =
             FetchAccessTokenRequest.newBuilder()
                 .setAccountConnector(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         ApiFuture<FetchAccessTokenResponse> future =
             developerConnectClient.fetchAccessTokenCallable().futureCall(request);
         // Do something.
         FetchAccessTokenResponse response = future.get();
       }
       
    • listUsers

      Lists Users in a given project, location, and account_connector.

      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()) {
         AccountConnectorName parent =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
         for (User element : developerConnectClient.listUsers(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListUsersRequest
      Throws:
      ApiException - if the remote call fails
    • listUsers

      public final DeveloperConnectClient.ListUsersPagedResponse listUsers(String parent)
      Lists Users in a given project, location, and account_connector.

      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 =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
         for (User element : developerConnectClient.listUsers(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListUsersRequest
      Throws:
      ApiException - if the remote call fails
    • listUsers

      Lists Users in a given project, location, and account_connector.

      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()) {
         ListUsersRequest request =
             ListUsersRequest.newBuilder()
                 .setParent(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (User element : developerConnectClient.listUsers(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listUsersPagedCallable

      Lists Users in a given project, location, and account_connector.

      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()) {
         ListUsersRequest request =
             ListUsersRequest.newBuilder()
                 .setParent(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<User> future = developerConnectClient.listUsersPagedCallable().futureCall(request);
         // Do something.
         for (User element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listUsersCallable

      public final UnaryCallable<ListUsersRequest,ListUsersResponse> listUsersCallable()
      Lists Users in a given project, location, and account_connector.

      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()) {
         ListUsersRequest request =
             ListUsersRequest.newBuilder()
                 .setParent(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListUsersResponse response = developerConnectClient.listUsersCallable().call(request);
           for (User element : response.getUsersList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • deleteUserAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteUserAsync(UserName name)
      Deletes a single User.

      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()) {
         UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]");
         developerConnectClient.deleteUserAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteUserAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteUserAsync(String name)
      Deletes a single User.

      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 =
             UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]").toString();
         developerConnectClient.deleteUserAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteUserAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteUserAsync(DeleteUserRequest request)
      Deletes a single User.

      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()) {
         DeleteUserRequest request =
             DeleteUserRequest.newBuilder()
                 .setName(
                     UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setEtag("etag3123477")
                 .build();
         developerConnectClient.deleteUserAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteUserOperationCallable

      public final OperationCallable<DeleteUserRequest,com.google.protobuf.Empty,OperationMetadata> deleteUserOperationCallable()
      Deletes a single User.

      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()) {
         DeleteUserRequest request =
             DeleteUserRequest.newBuilder()
                 .setName(
                     UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setEtag("etag3123477")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             developerConnectClient.deleteUserOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteUserCallable

      public final UnaryCallable<DeleteUserRequest,Operation> deleteUserCallable()
      Deletes a single User.

      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()) {
         DeleteUserRequest request =
             DeleteUserRequest.newBuilder()
                 .setName(
                     UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setEtag("etag3123477")
                 .build();
         ApiFuture<Operation> future = developerConnectClient.deleteUserCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • fetchSelf

      public final User fetchSelf(AccountConnectorName name)
      Fetch the User based on the user credentials.

      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()) {
         AccountConnectorName name =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
         User response = developerConnectClient.fetchSelf(name);
       }
       
      Parameters:
      name - Required. Name of the AccountConnector resource
      Throws:
      ApiException - if the remote call fails
    • fetchSelf

      public final User fetchSelf(String name)
      Fetch the User based on the user credentials.

      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 =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
         User response = developerConnectClient.fetchSelf(name);
       }
       
      Parameters:
      name - Required. Name of the AccountConnector resource
      Throws:
      ApiException - if the remote call fails
    • fetchSelf

      public final User fetchSelf(FetchSelfRequest request)
      Fetch the User based on the user credentials.

      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()) {
         FetchSelfRequest request =
             FetchSelfRequest.newBuilder()
                 .setName(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         User response = developerConnectClient.fetchSelf(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • fetchSelfCallable

      public final UnaryCallable<FetchSelfRequest,User> fetchSelfCallable()
      Fetch the User based on the user credentials.

      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()) {
         FetchSelfRequest request =
             FetchSelfRequest.newBuilder()
                 .setName(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         ApiFuture<User> future = developerConnectClient.fetchSelfCallable().futureCall(request);
         // Do something.
         User response = future.get();
       }
       
    • deleteSelfAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSelfAsync(AccountConnectorName name)
      Delete the User based on the user credentials.

      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()) {
         AccountConnectorName name =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
         developerConnectClient.deleteSelfAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the AccountConnector resource
      Throws:
      ApiException - if the remote call fails
    • deleteSelfAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSelfAsync(String name)
      Delete the User based on the user credentials.

      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 =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
         developerConnectClient.deleteSelfAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the AccountConnector resource
      Throws:
      ApiException - if the remote call fails
    • deleteSelfAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSelfAsync(DeleteSelfRequest request)
      Delete the User based on the user credentials.

      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()) {
         DeleteSelfRequest request =
             DeleteSelfRequest.newBuilder()
                 .setName(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         developerConnectClient.deleteSelfAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteSelfOperationCallable

      public final OperationCallable<DeleteSelfRequest,com.google.protobuf.Empty,OperationMetadata> deleteSelfOperationCallable()
      Delete the User based on the user credentials.

      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()) {
         DeleteSelfRequest request =
             DeleteSelfRequest.newBuilder()
                 .setName(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             developerConnectClient.deleteSelfOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteSelfCallable

      public final UnaryCallable<DeleteSelfRequest,Operation> deleteSelfCallable()
      Delete the User based on the user credentials.

      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()) {
         DeleteSelfRequest request =
             DeleteSelfRequest.newBuilder()
                 .setName(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         ApiFuture<Operation> future = developerConnectClient.deleteSelfCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • startOAuth

      public final StartOAuthResponse startOAuth(AccountConnectorName accountConnector)
      Starts OAuth flow for an account connector.

      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()) {
         AccountConnectorName accountConnector =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
         StartOAuthResponse response = developerConnectClient.startOAuth(accountConnector);
       }
       
      Parameters:
      accountConnector - Required. The resource name of the AccountConnector in the format `projects/*/locations/*/accountConnectors/*`.
      Throws:
      ApiException - if the remote call fails
    • startOAuth

      public final StartOAuthResponse startOAuth(String accountConnector)
      Starts OAuth flow for an account connector.

      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 accountConnector =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
         StartOAuthResponse response = developerConnectClient.startOAuth(accountConnector);
       }
       
      Parameters:
      accountConnector - Required. The resource name of the AccountConnector in the format `projects/*/locations/*/accountConnectors/*`.
      Throws:
      ApiException - if the remote call fails
    • startOAuth

      public final StartOAuthResponse startOAuth(StartOAuthRequest request)
      Starts OAuth flow for an account connector.

      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()) {
         StartOAuthRequest request =
             StartOAuthRequest.newBuilder()
                 .setAccountConnector(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         StartOAuthResponse response = developerConnectClient.startOAuth(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • startOAuthCallable

      public final UnaryCallable<StartOAuthRequest,StartOAuthResponse> startOAuthCallable()
      Starts OAuth flow for an account connector.

      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()) {
         StartOAuthRequest request =
             StartOAuthRequest.newBuilder()
                 .setAccountConnector(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         ApiFuture<StartOAuthResponse> future =
             developerConnectClient.startOAuthCallable().futureCall(request);
         // Do something.
         StartOAuthResponse response = future.get();
       }
       
    • finishOAuth

      public final FinishOAuthResponse finishOAuth(AccountConnectorName accountConnector)
      Finishes OAuth flow for an account connector.

      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()) {
         AccountConnectorName accountConnector =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
         FinishOAuthResponse response = developerConnectClient.finishOAuth(accountConnector);
       }
       
      Parameters:
      accountConnector - Required. The resource name of the AccountConnector in the format `projects/*/locations/*/accountConnectors/*`.
      Throws:
      ApiException - if the remote call fails
    • finishOAuth

      public final FinishOAuthResponse finishOAuth(String accountConnector)
      Finishes OAuth flow for an account connector.

      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 accountConnector =
             AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
         FinishOAuthResponse response = developerConnectClient.finishOAuth(accountConnector);
       }
       
      Parameters:
      accountConnector - Required. The resource name of the AccountConnector in the format `projects/*/locations/*/accountConnectors/*`.
      Throws:
      ApiException - if the remote call fails
    • finishOAuth

      public final FinishOAuthResponse finishOAuth(FinishOAuthRequest request)
      Finishes OAuth flow for an account connector.

      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()) {
         FinishOAuthRequest request =
             FinishOAuthRequest.newBuilder()
                 .setAccountConnector(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         FinishOAuthResponse response = developerConnectClient.finishOAuth(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • finishOAuthCallable

      public final UnaryCallable<FinishOAuthRequest,FinishOAuthResponse> finishOAuthCallable()
      Finishes OAuth flow for an account connector.

      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()) {
         FinishOAuthRequest request =
             FinishOAuthRequest.newBuilder()
                 .setAccountConnector(
                     AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
                         .toString())
                 .build();
         ApiFuture<FinishOAuthResponse> future =
             developerConnectClient.finishOAuthCallable().futureCall(request);
         // Do something.
         FinishOAuthResponse response = future.get();
       }
       
    • listLocations

      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

      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);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

      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;
           }
         }
       }
       
    • getLocation

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException