Class DeveloperConnectClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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().
| 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteConnection |
Deletes a single Connection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteGitRepositoryLink |
Deletes a single GitRepositoryLink. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAccountConnector |
Deletes a single AccountConnector. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteUser |
Deletes a single User. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of DeveloperConnectClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final DeveloperConnectClientcreate()Constructs an instance of DeveloperConnectClient with default settings.static final DeveloperConnectClientcreate(DeveloperConnectSettings settings) Constructs an instance of DeveloperConnectClient, using the given settings.static final DeveloperConnectClientcreate(DeveloperConnectStub stub) Constructs an instance of DeveloperConnectClient, using the given stub for making calls.Creates a new AccountConnector in a given project and location.createAccountConnectorAsync(LocationName parent, AccountConnector accountConnector, String accountConnectorId) Creates a new AccountConnector in a given project and location.createAccountConnectorAsync(String parent, AccountConnector accountConnector, String accountConnectorId) Creates a new AccountConnector in a given project and location.Creates a new AccountConnector in a given project and location.Creates a new AccountConnector in a given project and location.Creates a new Connection in a given project and location.createConnectionAsync(LocationName parent, Connection connection, String connectionId) Creates a new Connection in a given project and location.createConnectionAsync(String parent, Connection connection, String connectionId) Creates a new Connection in a given project and location.Creates a new Connection in a given project and location.Creates a new Connection in a given project and location.createGitRepositoryLinkAsync(ConnectionName parent, GitRepositoryLink gitRepositoryLink, String gitRepositoryLinkId) Creates a GitRepositoryLink.Creates a GitRepositoryLink.createGitRepositoryLinkAsync(String parent, GitRepositoryLink gitRepositoryLink, String gitRepositoryLinkId) Creates a GitRepositoryLink.Creates a GitRepositoryLink.Creates a GitRepositoryLink.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single AccountConnector.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single AccountConnector.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single AccountConnector.Deletes a single AccountConnector.final OperationCallable<DeleteAccountConnectorRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single AccountConnector.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single Connection.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single Connection.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteConnectionAsync(String name) Deletes a single Connection.Deletes a single Connection.final OperationCallable<DeleteConnectionRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Connection.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single GitRepositoryLink.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single GitRepositoryLink.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single GitRepositoryLink.Deletes a single GitRepositoryLink.final OperationCallable<DeleteGitRepositoryLinkRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single GitRepositoryLink.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Delete the User based on the user credentials.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSelfAsync(DeleteSelfRequest request) Delete the User based on the user credentials.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSelfAsync(String name) Delete the User based on the user credentials.Delete the User based on the user credentials.final OperationCallable<DeleteSelfRequest,com.google.protobuf.Empty, OperationMetadata> Delete the User based on the user credentials.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteUserAsync(DeleteUserRequest request) Deletes a single User.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteUserAsync(UserName name) Deletes a single User.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteUserAsync(String name) Deletes a single User.Deletes a single User.final OperationCallable<DeleteUserRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single User.final FetchAccessTokenResponsefetchAccessToken(AccountConnectorName accountConnector) Fetches OAuth access token based on end user credentials.final FetchAccessTokenResponsefetchAccessToken(FetchAccessTokenRequest request) Fetches OAuth access token based on end user credentials.final FetchAccessTokenResponsefetchAccessToken(String accountConnector) Fetches OAuth access token based on end user credentials.Fetches OAuth access token based on end user credentials.fetchGitHubInstallations(ConnectionName connection) FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection.FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection.fetchGitHubInstallations(String connection) FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection.FetchGitHubInstallations returns the list of GitHub Installations that are available to be added to a Connection.fetchGitRefs(FetchGitRefsRequest request) Fetch the list of branches or tags for a given repository.fetchGitRefs(GitRepositoryLinkName gitRepositoryLink, FetchGitRefsRequest.RefType refType) Fetch the list of branches or tags for a given repository.fetchGitRefs(String gitRepositoryLink, FetchGitRefsRequest.RefType refType) Fetch the list of branches or tags for a given repository.Fetch the list of branches or tags for a given repository.Fetch the list of branches or tags for a given repository.fetchLinkableGitRepositories(ConnectionName connection) FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.fetchLinkableGitRepositories(String connection) FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.final UnaryCallable<FetchLinkableGitRepositoriesRequest,DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse> FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.final FetchReadTokenResponsefetchReadToken(FetchReadTokenRequest request) Fetches read token of a given gitRepositoryLink.final FetchReadTokenResponsefetchReadToken(GitRepositoryLinkName gitRepositoryLink) Fetches read token of a given gitRepositoryLink.final FetchReadTokenResponsefetchReadToken(String gitRepositoryLink) Fetches read token of a given gitRepositoryLink.Fetches read token of a given gitRepositoryLink.Fetches read/write token of a given gitRepositoryLink.fetchReadWriteToken(GitRepositoryLinkName gitRepositoryLink) Fetches read/write token of a given gitRepositoryLink.fetchReadWriteToken(String gitRepositoryLink) Fetches read/write token of a given gitRepositoryLink.Fetches read/write token of a given gitRepositoryLink.final UserFetch the User based on the user credentials.final UserfetchSelf(FetchSelfRequest request) Fetch the User based on the user credentials.final UserFetch the User based on the user credentials.final UnaryCallable<FetchSelfRequest,User> Fetch the User based on the user credentials.final FinishOAuthResponsefinishOAuth(AccountConnectorName accountConnector) Finishes OAuth flow for an account connector.final FinishOAuthResponsefinishOAuth(FinishOAuthRequest request) Finishes OAuth flow for an account connector.final FinishOAuthResponsefinishOAuth(String accountConnector) Finishes OAuth flow for an account connector.Finishes OAuth flow for an account connector.final AccountConnectorGets details of a single AccountConnector.final AccountConnectorGets details of a single AccountConnector.final AccountConnectorgetAccountConnector(String name) Gets details of a single AccountConnector.Gets details of a single AccountConnector.final ConnectiongetConnection(ConnectionName name) Gets details of a single Connection.final ConnectiongetConnection(GetConnectionRequest request) Gets details of a single Connection.final ConnectiongetConnection(String name) Gets details of a single Connection.Gets details of a single Connection.final GitRepositoryLinkGets details of a single GitRepositoryLink.final GitRepositoryLinkGets details of a single GitRepositoryLink.final GitRepositoryLinkgetGitRepositoryLink(String name) Gets details of a single GitRepositoryLink.Gets details of a single GitRepositoryLink.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final DeveloperConnectSettingsgetStub()booleanbooleanLists AccountConnectors in a given project and location.listAccountConnectors(LocationName parent) Lists AccountConnectors in a given project and location.listAccountConnectors(String parent) Lists AccountConnectors in a given project and location.Lists AccountConnectors in a given project and location.final UnaryCallable<ListAccountConnectorsRequest,DeveloperConnectClient.ListAccountConnectorsPagedResponse> Lists AccountConnectors in a given project and location.listConnections(ListConnectionsRequest request) Lists Connections in a given project and location.listConnections(LocationName parent) Lists Connections in a given project and location.listConnections(String parent) Lists Connections in a given project and location.Lists Connections in a given project and location.Lists Connections in a given project and location.listGitRepositoryLinks(ConnectionName parent) Lists GitRepositoryLinks in a given project, location, and connection.Lists GitRepositoryLinks in a given project, location, and connection.listGitRepositoryLinks(String parent) Lists GitRepositoryLinks in a given project, location, and connection.Lists GitRepositoryLinks in a given project, location, and connection.final UnaryCallable<ListGitRepositoryLinksRequest,DeveloperConnectClient.ListGitRepositoryLinksPagedResponse> Lists GitRepositoryLinks in a given project, location, and connection.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.This method can be called in two ways:Lists information about the supported locations for this service.This method can be called in two ways:Lists information about the supported locations for this service.This method can be called in two ways:listUsers(AccountConnectorName parent) Lists Users in a given project, location, and account_connector.listUsers(ListUsersRequest request) Lists Users in a given project, location, and account_connector.Lists Users in a given project, location, and account_connector.Lists Users in a given project, location, and account_connector.Lists Users in a given project, location, and account_connector.voidshutdown()voidfinal StartOAuthResponsestartOAuth(AccountConnectorName accountConnector) Starts OAuth flow for an account connector.final StartOAuthResponsestartOAuth(StartOAuthRequest request) Starts OAuth flow for an account connector.final StartOAuthResponsestartOAuth(String accountConnector) Starts OAuth flow for an account connector.Starts OAuth flow for an account connector.updateAccountConnectorAsync(AccountConnector accountConnector, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single AccountConnector.Updates the parameters of a single AccountConnector.Updates the parameters of a single AccountConnector.Updates the parameters of a single AccountConnector.updateConnectionAsync(Connection connection, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Connection.Updates the parameters of a single Connection.Updates the parameters of a single Connection.Updates the parameters of a single Connection.
-
Constructor Details
-
DeveloperConnectClient
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
-
-
Method Details
-
create
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
Constructs an instance of DeveloperConnectClient, using the given stub for making calls. This is for advanced usage - prefer using create(DeveloperConnectSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listConnections
public final DeveloperConnectClient.ListConnectionsPagedResponse listConnections(LocationName parent) Lists Connections in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Connection element : developerConnectClient.listConnections(parent).iterateAll()) { // doThingsWith(element); } }- 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()) { 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
public final DeveloperConnectClient.ListConnectionsPagedResponse listConnections(ListConnectionsRequest request) Lists Connections in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { ListConnectionsRequest request = ListConnectionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Connection element : developerConnectClient.listConnections(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listConnectionsPagedCallable
public final UnaryCallable<ListConnectionsRequest,DeveloperConnectClient.ListConnectionsPagedResponse> listConnectionsPagedCallable()Lists Connections in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { ListConnectionsRequest request = ListConnectionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Connection> future = developerConnectClient.listConnectionsPagedCallable().futureCall(request); // Do something. for (Connection element : future.get().iterateAll()) { // doThingsWith(element); } } -
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
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
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
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
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 createdconnectionId- 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 createdconnectionId- 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, createConnectionOperationCallable()OperationMetadata> 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
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 updatedupdateMask- 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, updateConnectionOperationCallable()OperationMetadata> 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
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, deleteConnectionOperationCallable()OperationMetadata> 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
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 createdgitRepositoryLinkId- 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 createdgitRepositoryLinkId- 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, createGitRepositoryLinkOperationCallable()OperationMetadata> 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, deleteGitRepositoryLinkOperationCallable()OperationMetadata> 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
public final DeveloperConnectClient.ListGitRepositoryLinksPagedResponse listGitRepositoryLinks(ListGitRepositoryLinksRequest request) Lists GitRepositoryLinks in a given project, location, and connection.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { ListGitRepositoryLinksRequest request = ListGitRepositoryLinksRequest.newBuilder() .setParent(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (GitRepositoryLink element : developerConnectClient.listGitRepositoryLinks(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listGitRepositoryLinksPagedCallable
public final UnaryCallable<ListGitRepositoryLinksRequest,DeveloperConnectClient.ListGitRepositoryLinksPagedResponse> listGitRepositoryLinksPagedCallable()Lists GitRepositoryLinks in a given project, location, and connection.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { ListGitRepositoryLinksRequest request = ListGitRepositoryLinksRequest.newBuilder() .setParent(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<GitRepositoryLink> future = developerConnectClient.listGitRepositoryLinksPagedCallable().futureCall(request); // Do something. for (GitRepositoryLink element : future.get().iterateAll()) { // doThingsWith(element); } } -
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
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
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
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
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
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
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
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
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
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
public final DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse fetchLinkableGitRepositories(FetchLinkableGitRepositoriesRequest request) FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { FetchLinkableGitRepositoriesRequest request = FetchLinkableGitRepositoriesRequest.newBuilder() .setConnection( ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (LinkableGitRepository element : developerConnectClient.fetchLinkableGitRepositories(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
fetchLinkableGitRepositoriesPagedCallable
public final UnaryCallable<FetchLinkableGitRepositoriesRequest,DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse> fetchLinkableGitRepositoriesPagedCallable()FetchLinkableGitRepositories returns a list of git repositories from an SCM that are available to be added to a Connection.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { FetchLinkableGitRepositoriesRequest request = FetchLinkableGitRepositoriesRequest.newBuilder() .setConnection( ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<LinkableGitRepository> future = developerConnectClient.fetchLinkableGitRepositoriesPagedCallable().futureCall(request); // Do something. for (LinkableGitRepository element : future.get().iterateAll()) { // doThingsWith(element); } } -
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
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
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
public final DeveloperConnectClient.FetchGitRefsPagedResponse fetchGitRefs(GitRepositoryLinkName gitRepositoryLink, FetchGitRefsRequest.RefType refType) Fetch the list of branches or tags for a given repository.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { GitRepositoryLinkName gitRepositoryLink = GitRepositoryLinkName.of( "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]"); FetchGitRefsRequest.RefType refType = FetchGitRefsRequest.RefType.forNumber(0); for (String element : developerConnectClient.fetchGitRefs(gitRepositoryLink, refType).iterateAll()) { // doThingsWith(element); } }- Parameters:
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
public final DeveloperConnectClient.FetchGitRefsPagedResponse fetchGitRefs(FetchGitRefsRequest request) Fetch the list of branches or tags for a given repository.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { FetchGitRefsRequest request = FetchGitRefsRequest.newBuilder() .setGitRepositoryLink( GitRepositoryLinkName.of( "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]") .toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (String element : developerConnectClient.fetchGitRefs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
fetchGitRefsPagedCallable
public final UnaryCallable<FetchGitRefsRequest,DeveloperConnectClient.FetchGitRefsPagedResponse> fetchGitRefsPagedCallable()Fetch the list of branches or tags for a given repository.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { FetchGitRefsRequest request = FetchGitRefsRequest.newBuilder() .setGitRepositoryLink( GitRepositoryLinkName.of( "[PROJECT]", "[LOCATION]", "[CONNECTION]", "[GIT_REPOSITORY_LINK]") .toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<String> future = developerConnectClient.fetchGitRefsPagedCallable().futureCall(request); // Do something. for (String element : future.get().iterateAll()) { // doThingsWith(element); } } -
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
public final DeveloperConnectClient.ListAccountConnectorsPagedResponse listAccountConnectors(ListAccountConnectorsRequest request) 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
public final UnaryCallable<ListAccountConnectorsRequest,DeveloperConnectClient.ListAccountConnectorsPagedResponse> 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
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
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
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, createAccountConnectorOperationCallable()OperationMetadata> 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, updateAccountConnectorOperationCallable()OperationMetadata> 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, deleteAccountConnectorOperationCallable()OperationMetadata> 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
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
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
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
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
public final UnaryCallable<ListUsersRequest,DeveloperConnectClient.ListUsersPagedResponse> 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
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, deleteUserOperationCallable()OperationMetadata> 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
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
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
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
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
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, deleteSelfOperationCallable()OperationMetadata> 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
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
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
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
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
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
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
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
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
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
public final DeveloperConnectClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) 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
public final UnaryCallable<ListLocationsRequest,DeveloperConnectClient.ListLocationsPagedResponse> 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
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
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
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:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-