- 2.53.0 (latest)
- 2.52.0
- 2.51.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.6
- 2.2.1
- 2.1.12
public class GSuiteAddOnsClient implements BackgroundResource
Service Description: A service for managing Google Workspace Add-ons deployments.
A Google Workspace Add-on is a third-party embedded component that can be installed in Google Workspace Applications like Gmail, Calendar, Drive, and the Google Docs, Sheets, and Slides editors. Google Workspace Add-ons can display UI cards, receive contextual information from the host application, and perform actions in the host application (See: https://developers.google.com/gsuite/add-ons/overview for more information).
A Google Workspace Add-on deployment resource specifies metadata about the add-on, including a specification of the entry points in the host application that trigger add-on executions (see: https://developers.google.com/gsuite/add-ons/concepts/gsuite-manifests). Add-on deployments defined via the Google Workspace Add-ons API define their entrypoints using HTTPS URLs (See: https://developers.google.com/gsuite/add-ons/guides/alternate-runtimes),
A Google Workspace Add-on deployment can be installed in developer mode, which allows an add-on developer to test the experience an end-user would see when installing and running the add-on in their G Suite applications. When running in developer mode, more detailed error messages are exposed in the add-on UI to aid in debugging.
A Google Workspace Add-on deployment can be published to Google Workspace Marketplace, which allows other Google Workspace users to discover and install the add-on. See: https://developers.google.com/gsuite/add-ons/how-tos/publish-add-on-overview for details.
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 for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
AuthorizationName name = AuthorizationName.of("[PROJECT]");
Authorization response = gSuiteAddOnsClient.getAuthorization(name);
}
Note: close() needs to be called on the GSuiteAddOnsClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of GSuiteAddOnsSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
GSuiteAddOnsSettings gSuiteAddOnsSettings =
GSuiteAddOnsSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create(gSuiteAddOnsSettings);
To customize the endpoint:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
GSuiteAddOnsSettings gSuiteAddOnsSettings =
GSuiteAddOnsSettings.newBuilder().setEndpoint(myEndpoint).build();
GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create(gSuiteAddOnsSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final GSuiteAddOnsClient create()
Constructs an instance of GSuiteAddOnsClient with default settings.
Type | Description |
GSuiteAddOnsClient |
Type | Description |
IOException |
create(GSuiteAddOnsSettings settings)
public static final GSuiteAddOnsClient create(GSuiteAddOnsSettings settings)
Constructs an instance of GSuiteAddOnsClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | GSuiteAddOnsSettings |
Type | Description |
GSuiteAddOnsClient |
Type | Description |
IOException |
create(GSuiteAddOnsStub stub)
public static final GSuiteAddOnsClient create(GSuiteAddOnsStub stub)
Constructs an instance of GSuiteAddOnsClient, using the given stub for making calls. This is for advanced usage - prefer using create(GSuiteAddOnsSettings).
Name | Description |
stub | GSuiteAddOnsStub |
Type | Description |
GSuiteAddOnsClient |
Constructors
GSuiteAddOnsClient(GSuiteAddOnsSettings settings)
protected GSuiteAddOnsClient(GSuiteAddOnsSettings settings)
Constructs an instance of GSuiteAddOnsClient, 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.
Name | Description |
settings | GSuiteAddOnsSettings |
GSuiteAddOnsClient(GSuiteAddOnsStub stub)
protected GSuiteAddOnsClient(GSuiteAddOnsStub stub)
Name | Description |
stub | GSuiteAddOnsStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
createDeployment(CreateDeploymentRequest request)
public final Deployment createDeployment(CreateDeploymentRequest request)
Creates a deployment with the specified name and configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
CreateDeploymentRequest request =
CreateDeploymentRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setDeploymentId("deploymentId-136894784")
.setDeployment(Deployment.newBuilder().build())
.build();
Deployment response = gSuiteAddOnsClient.createDeployment(request);
}
Name | Description |
request | CreateDeploymentRequest The request object containing all of the parameters for the API call. |
Type | Description |
Deployment |
createDeployment(ProjectName parent, Deployment deployment, String deploymentId)
public final Deployment createDeployment(ProjectName parent, Deployment deployment, String deploymentId)
Creates a deployment with the specified name and configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Deployment deployment = Deployment.newBuilder().build();
String deploymentId = "deploymentId-136894784";
Deployment response = gSuiteAddOnsClient.createDeployment(parent, deployment, deploymentId);
}
Name | Description |
parent | ProjectName Required. Name of the project in which to create the deployment. Example: |
deployment | Deployment Required. The deployment to create (deployment.name cannot be set). |
deploymentId | String Required. The id to use for this deployment. The full name of the created
resource will be |
Type | Description |
Deployment |
createDeployment(String parent, Deployment deployment, String deploymentId)
public final Deployment createDeployment(String parent, Deployment deployment, String deploymentId)
Creates a deployment with the specified name and configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
String parent = ProjectName.of("[PROJECT]").toString();
Deployment deployment = Deployment.newBuilder().build();
String deploymentId = "deploymentId-136894784";
Deployment response = gSuiteAddOnsClient.createDeployment(parent, deployment, deploymentId);
}
Name | Description |
parent | String Required. Name of the project in which to create the deployment. Example: |
deployment | Deployment Required. The deployment to create (deployment.name cannot be set). |
deploymentId | String Required. The id to use for this deployment. The full name of the created
resource will be |
Type | Description |
Deployment |
createDeploymentCallable()
public final UnaryCallable<CreateDeploymentRequest,Deployment> createDeploymentCallable()
Creates a deployment with the specified name and configuration.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
CreateDeploymentRequest request =
CreateDeploymentRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setDeploymentId("deploymentId-136894784")
.setDeployment(Deployment.newBuilder().build())
.build();
ApiFuture<Deployment> future =
gSuiteAddOnsClient.createDeploymentCallable().futureCall(request);
// Do something.
Deployment response = future.get();
}
Type | Description |
UnaryCallable<CreateDeploymentRequest,Deployment> |
deleteDeployment(DeleteDeploymentRequest request)
public final void deleteDeployment(DeleteDeploymentRequest request)
Deletes the deployment with the given name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
DeleteDeploymentRequest request =
DeleteDeploymentRequest.newBuilder()
.setName(DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString())
.setEtag("etag3123477")
.build();
gSuiteAddOnsClient.deleteDeployment(request);
}
Name | Description |
request | DeleteDeploymentRequest The request object containing all of the parameters for the API call. |
deleteDeployment(DeploymentName name)
public final void deleteDeployment(DeploymentName name)
Deletes the deployment with the given name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
DeploymentName name = DeploymentName.of("[PROJECT]", "[DEPLOYMENT]");
gSuiteAddOnsClient.deleteDeployment(name);
}
Name | Description |
name | DeploymentName Required. The full resource name of the deployment to delete. Example: |
deleteDeployment(String name)
public final void deleteDeployment(String name)
Deletes the deployment with the given name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
String name = DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString();
gSuiteAddOnsClient.deleteDeployment(name);
}
Name | Description |
name | String Required. The full resource name of the deployment to delete. Example: |
deleteDeploymentCallable()
public final UnaryCallable<DeleteDeploymentRequest,Empty> deleteDeploymentCallable()
Deletes the deployment with the given name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
DeleteDeploymentRequest request =
DeleteDeploymentRequest.newBuilder()
.setName(DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future = gSuiteAddOnsClient.deleteDeploymentCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteDeploymentRequest,Empty> |
getAuthorization(AuthorizationName name)
public final Authorization getAuthorization(AuthorizationName name)
Gets the authorization information for deployments in a given project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
AuthorizationName name = AuthorizationName.of("[PROJECT]");
Authorization response = gSuiteAddOnsClient.getAuthorization(name);
}
Name | Description |
name | AuthorizationName Required. Name of the project for which to get the Google Workspace Add-ons authorization information. Example: |
Type | Description |
Authorization |
getAuthorization(GetAuthorizationRequest request)
public final Authorization getAuthorization(GetAuthorizationRequest request)
Gets the authorization information for deployments in a given project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
GetAuthorizationRequest request =
GetAuthorizationRequest.newBuilder()
.setName(AuthorizationName.of("[PROJECT]").toString())
.build();
Authorization response = gSuiteAddOnsClient.getAuthorization(request);
}
Name | Description |
request | GetAuthorizationRequest The request object containing all of the parameters for the API call. |
Type | Description |
Authorization |
getAuthorization(String name)
public final Authorization getAuthorization(String name)
Gets the authorization information for deployments in a given project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
String name = AuthorizationName.of("[PROJECT]").toString();
Authorization response = gSuiteAddOnsClient.getAuthorization(name);
}
Name | Description |
name | String Required. Name of the project for which to get the Google Workspace Add-ons authorization information. Example: |
Type | Description |
Authorization |
getAuthorizationCallable()
public final UnaryCallable<GetAuthorizationRequest,Authorization> getAuthorizationCallable()
Gets the authorization information for deployments in a given project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
GetAuthorizationRequest request =
GetAuthorizationRequest.newBuilder()
.setName(AuthorizationName.of("[PROJECT]").toString())
.build();
ApiFuture<Authorization> future =
gSuiteAddOnsClient.getAuthorizationCallable().futureCall(request);
// Do something.
Authorization response = future.get();
}
Type | Description |
UnaryCallable<GetAuthorizationRequest,Authorization> |
getDeployment(DeploymentName name)
public final Deployment getDeployment(DeploymentName name)
Gets the deployment with the specified name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
DeploymentName name = DeploymentName.of("[PROJECT]", "[DEPLOYMENT]");
Deployment response = gSuiteAddOnsClient.getDeployment(name);
}
Name | Description |
name | DeploymentName Required. The full resource name of the deployment to get. Example: |
Type | Description |
Deployment |
getDeployment(GetDeploymentRequest request)
public final Deployment getDeployment(GetDeploymentRequest request)
Gets the deployment with the specified name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
GetDeploymentRequest request =
GetDeploymentRequest.newBuilder()
.setName(DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString())
.build();
Deployment response = gSuiteAddOnsClient.getDeployment(request);
}
Name | Description |
request | GetDeploymentRequest The request object containing all of the parameters for the API call. |
Type | Description |
Deployment |
getDeployment(String name)
public final Deployment getDeployment(String name)
Gets the deployment with the specified name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
String name = DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString();
Deployment response = gSuiteAddOnsClient.getDeployment(name);
}
Name | Description |
name | String Required. The full resource name of the deployment to get. Example: |
Type | Description |
Deployment |
getDeploymentCallable()
public final UnaryCallable<GetDeploymentRequest,Deployment> getDeploymentCallable()
Gets the deployment with the specified name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
GetDeploymentRequest request =
GetDeploymentRequest.newBuilder()
.setName(DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString())
.build();
ApiFuture<Deployment> future = gSuiteAddOnsClient.getDeploymentCallable().futureCall(request);
// Do something.
Deployment response = future.get();
}
Type | Description |
UnaryCallable<GetDeploymentRequest,Deployment> |
getInstallStatus(GetInstallStatusRequest request)
public final InstallStatus getInstallStatus(GetInstallStatusRequest request)
Fetches the install status of a developer mode deployment.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
GetInstallStatusRequest request =
GetInstallStatusRequest.newBuilder()
.setName(InstallStatusName.of("[PROJECT]", "[DEPLOYMENT]").toString())
.build();
InstallStatus response = gSuiteAddOnsClient.getInstallStatus(request);
}
Name | Description |
request | GetInstallStatusRequest The request object containing all of the parameters for the API call. |
Type | Description |
InstallStatus |
getInstallStatus(InstallStatusName name)
public final InstallStatus getInstallStatus(InstallStatusName name)
Fetches the install status of a developer mode deployment.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
InstallStatusName name = InstallStatusName.of("[PROJECT]", "[DEPLOYMENT]");
InstallStatus response = gSuiteAddOnsClient.getInstallStatus(name);
}
Name | Description |
name | InstallStatusName Required. The full resource name of the deployment. Example: |
Type | Description |
InstallStatus |
getInstallStatus(String name)
public final InstallStatus getInstallStatus(String name)
Fetches the install status of a developer mode deployment.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
String name = InstallStatusName.of("[PROJECT]", "[DEPLOYMENT]").toString();
InstallStatus response = gSuiteAddOnsClient.getInstallStatus(name);
}
Name | Description |
name | String Required. The full resource name of the deployment. Example: |
Type | Description |
InstallStatus |
getInstallStatusCallable()
public final UnaryCallable<GetInstallStatusRequest,InstallStatus> getInstallStatusCallable()
Fetches the install status of a developer mode deployment.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
GetInstallStatusRequest request =
GetInstallStatusRequest.newBuilder()
.setName(InstallStatusName.of("[PROJECT]", "[DEPLOYMENT]").toString())
.build();
ApiFuture<InstallStatus> future =
gSuiteAddOnsClient.getInstallStatusCallable().futureCall(request);
// Do something.
InstallStatus response = future.get();
}
Type | Description |
UnaryCallable<GetInstallStatusRequest,InstallStatus> |
getSettings()
public final GSuiteAddOnsSettings getSettings()
Type | Description |
GSuiteAddOnsSettings |
getStub()
public GSuiteAddOnsStub getStub()
Type | Description |
GSuiteAddOnsStub |
installDeployment(DeploymentName name)
public final void installDeployment(DeploymentName name)
Installs a deployment in developer mode. See: https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
DeploymentName name = DeploymentName.of("[PROJECT]", "[DEPLOYMENT]");
gSuiteAddOnsClient.installDeployment(name);
}
Name | Description |
name | DeploymentName Required. The full resource name of the deployment to install. Example: |
installDeployment(InstallDeploymentRequest request)
public final void installDeployment(InstallDeploymentRequest request)
Installs a deployment in developer mode. See: https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
InstallDeploymentRequest request =
InstallDeploymentRequest.newBuilder()
.setName(DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString())
.build();
gSuiteAddOnsClient.installDeployment(request);
}
Name | Description |
request | InstallDeploymentRequest The request object containing all of the parameters for the API call. |
installDeployment(String name)
public final void installDeployment(String name)
Installs a deployment in developer mode. See: https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
String name = DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString();
gSuiteAddOnsClient.installDeployment(name);
}
Name | Description |
name | String Required. The full resource name of the deployment to install. Example: |
installDeploymentCallable()
public final UnaryCallable<InstallDeploymentRequest,Empty> installDeploymentCallable()
Installs a deployment in developer mode. See: https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
InstallDeploymentRequest request =
InstallDeploymentRequest.newBuilder()
.setName(DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString())
.build();
ApiFuture<Empty> future = gSuiteAddOnsClient.installDeploymentCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<InstallDeploymentRequest,Empty> |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listDeployments(ListDeploymentsRequest request)
public final GSuiteAddOnsClient.ListDeploymentsPagedResponse listDeployments(ListDeploymentsRequest request)
Lists all deployments in a particular project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
ListDeploymentsRequest request =
ListDeploymentsRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Deployment element : gSuiteAddOnsClient.listDeployments(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListDeploymentsRequest The request object containing all of the parameters for the API call. |
Type | Description |
GSuiteAddOnsClient.ListDeploymentsPagedResponse |
listDeployments(ProjectName parent)
public final GSuiteAddOnsClient.ListDeploymentsPagedResponse listDeployments(ProjectName parent)
Lists all deployments in a particular project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
for (Deployment element : gSuiteAddOnsClient.listDeployments(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | ProjectName Required. Name of the project in which to create the deployment. Example: |
Type | Description |
GSuiteAddOnsClient.ListDeploymentsPagedResponse |
listDeployments(String parent)
public final GSuiteAddOnsClient.ListDeploymentsPagedResponse listDeployments(String parent)
Lists all deployments in a particular project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
String parent = ProjectName.of("[PROJECT]").toString();
for (Deployment element : gSuiteAddOnsClient.listDeployments(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. Name of the project in which to create the deployment. Example: |
Type | Description |
GSuiteAddOnsClient.ListDeploymentsPagedResponse |
listDeploymentsCallable()
public final UnaryCallable<ListDeploymentsRequest,ListDeploymentsResponse> listDeploymentsCallable()
Lists all deployments in a particular project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
ListDeploymentsRequest request =
ListDeploymentsRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListDeploymentsResponse response =
gSuiteAddOnsClient.listDeploymentsCallable().call(request);
for (Deployment element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListDeploymentsRequest,ListDeploymentsResponse> |
listDeploymentsPagedCallable()
public final UnaryCallable<ListDeploymentsRequest,GSuiteAddOnsClient.ListDeploymentsPagedResponse> listDeploymentsPagedCallable()
Lists all deployments in a particular project.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
ListDeploymentsRequest request =
ListDeploymentsRequest.newBuilder()
.setParent(ProjectName.of("[PROJECT]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Deployment> future =
gSuiteAddOnsClient.listDeploymentsPagedCallable().futureCall(request);
// Do something.
for (Deployment element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListDeploymentsRequest,ListDeploymentsPagedResponse> |
replaceDeployment(Deployment deployment)
public final Deployment replaceDeployment(Deployment deployment)
Creates or replaces a deployment with the specified name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
Deployment deployment = Deployment.newBuilder().build();
Deployment response = gSuiteAddOnsClient.replaceDeployment(deployment);
}
Name | Description |
deployment | Deployment Required. The deployment to create or replace. |
Type | Description |
Deployment |
replaceDeployment(ReplaceDeploymentRequest request)
public final Deployment replaceDeployment(ReplaceDeploymentRequest request)
Creates or replaces a deployment with the specified name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
ReplaceDeploymentRequest request =
ReplaceDeploymentRequest.newBuilder()
.setDeployment(Deployment.newBuilder().build())
.build();
Deployment response = gSuiteAddOnsClient.replaceDeployment(request);
}
Name | Description |
request | ReplaceDeploymentRequest The request object containing all of the parameters for the API call. |
Type | Description |
Deployment |
replaceDeploymentCallable()
public final UnaryCallable<ReplaceDeploymentRequest,Deployment> replaceDeploymentCallable()
Creates or replaces a deployment with the specified name.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
ReplaceDeploymentRequest request =
ReplaceDeploymentRequest.newBuilder()
.setDeployment(Deployment.newBuilder().build())
.build();
ApiFuture<Deployment> future =
gSuiteAddOnsClient.replaceDeploymentCallable().futureCall(request);
// Do something.
Deployment response = future.get();
}
Type | Description |
UnaryCallable<ReplaceDeploymentRequest,Deployment> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
uninstallDeployment(DeploymentName name)
public final void uninstallDeployment(DeploymentName name)
Uninstalls a developer mode deployment. See: https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
DeploymentName name = DeploymentName.of("[PROJECT]", "[DEPLOYMENT]");
gSuiteAddOnsClient.uninstallDeployment(name);
}
Name | Description |
name | DeploymentName Required. The full resource name of the deployment to install. Example: |
uninstallDeployment(UninstallDeploymentRequest request)
public final void uninstallDeployment(UninstallDeploymentRequest request)
Uninstalls a developer mode deployment. See: https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
UninstallDeploymentRequest request =
UninstallDeploymentRequest.newBuilder()
.setName(DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString())
.build();
gSuiteAddOnsClient.uninstallDeployment(request);
}
Name | Description |
request | UninstallDeploymentRequest The request object containing all of the parameters for the API call. |
uninstallDeployment(String name)
public final void uninstallDeployment(String name)
Uninstalls a developer mode deployment. See: https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
String name = DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString();
gSuiteAddOnsClient.uninstallDeployment(name);
}
Name | Description |
name | String Required. The full resource name of the deployment to install. Example: |
uninstallDeploymentCallable()
public final UnaryCallable<UninstallDeploymentRequest,Empty> uninstallDeploymentCallable()
Uninstalls a developer mode deployment. See: https://developers.google.com/gsuite/add-ons/how-tos/testing-gsuite-addons.
Sample code:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (GSuiteAddOnsClient gSuiteAddOnsClient = GSuiteAddOnsClient.create()) {
UninstallDeploymentRequest request =
UninstallDeploymentRequest.newBuilder()
.setName(DeploymentName.of("[PROJECT]", "[DEPLOYMENT]").toString())
.build();
ApiFuture<Empty> future =
gSuiteAddOnsClient.uninstallDeploymentCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<UninstallDeploymentRequest,Empty> |