| GitHub Repository | Product Reference |
Service Description: Provides methods for handling Team objects.
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 (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
TeamName name = TeamName.of("[NETWORK_CODE]", "[TEAM]");
Team response = teamServiceClient.getTeam(name);
}
Note: close() needs to be called on the TeamServiceClient 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 |
|---|---|---|
GetTeam |
Retrieves a |
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.
|
ListTeams |
Lists |
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.
|
CreateTeam |
Creates a |
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.
|
BatchCreateTeams |
Creates |
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.
|
UpdateTeam |
Updates a |
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.
|
BatchUpdateTeams |
Batch updates |
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.
|
BatchActivateTeams |
Batch activates |
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.
|
BatchDeactivateTeams |
Batch deactivates |
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.
|
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 TeamServiceSettings 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
TeamServiceSettings teamServiceSettings =
TeamServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
TeamServiceClient teamServiceClient = TeamServiceClient.create(teamServiceSettings);
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
TeamServiceSettings teamServiceSettings =
TeamServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
TeamServiceClient teamServiceClient = TeamServiceClient.create(teamServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final TeamServiceClient create()Constructs an instance of TeamServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
TeamServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(TeamServiceSettings settings)
public static final TeamServiceClient create(TeamServiceSettings settings)Constructs an instance of TeamServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
TeamServiceSettings |
| Returns | |
|---|---|
| Type | Description |
TeamServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(TeamServiceStub stub)
public static final TeamServiceClient create(TeamServiceStub stub)Constructs an instance of TeamServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(TeamServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
TeamServiceStub |
| Returns | |
|---|---|
| Type | Description |
TeamServiceClient |
|
Constructors
TeamServiceClient(TeamServiceSettings settings)
protected TeamServiceClient(TeamServiceSettings settings)Constructs an instance of TeamServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Parameter | |
|---|---|
| Name | Description |
settings |
TeamServiceSettings |
TeamServiceClient(TeamServiceStub stub)
protected TeamServiceClient(TeamServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
TeamServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
batchActivateTeams(@Nullable NetworkName parent, List<String> names)
public final BatchActivateTeamsResponse batchActivateTeams(@Nullable NetworkName parent, List<String> names)Batch activates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchActivateTeamsResponse response = teamServiceClient.batchActivateTeams(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateTeamsResponse |
|
batchActivateTeams(BatchActivateTeamsRequest request)
public final BatchActivateTeamsResponse batchActivateTeams(BatchActivateTeamsRequest request)Batch activates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
BatchActivateTeamsRequest request =
BatchActivateTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchActivateTeamsResponse response = teamServiceClient.batchActivateTeams(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchActivateTeamsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchActivateTeamsResponse |
|
batchActivateTeams(String parent, List<String> names)
public final BatchActivateTeamsResponse batchActivateTeams(String parent, List<String> names)Batch activates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchActivateTeamsResponse response = teamServiceClient.batchActivateTeams(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchActivateTeamsResponse |
|
batchActivateTeamsCallable()
public final UnaryCallable<BatchActivateTeamsRequest,BatchActivateTeamsResponse> batchActivateTeamsCallable()Batch activates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
BatchActivateTeamsRequest request =
BatchActivateTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchActivateTeamsResponse> future =
teamServiceClient.batchActivateTeamsCallable().futureCall(request);
// Do something.
BatchActivateTeamsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchActivateTeamsRequest,BatchActivateTeamsResponse> |
|
batchCreateTeams(@Nullable NetworkName parent, List<CreateTeamRequest> requests)
public final BatchCreateTeamsResponse batchCreateTeams(@Nullable NetworkName parent, List<CreateTeamRequest> requests)Creates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<CreateTeamRequest> requests = new ArrayList<>();
BatchCreateTeamsResponse response = teamServiceClient.batchCreateTeams(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
requests |
List<CreateTeamRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateTeamsResponse |
|
batchCreateTeams(BatchCreateTeamsRequest request)
public final BatchCreateTeamsResponse batchCreateTeams(BatchCreateTeamsRequest request)Creates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
BatchCreateTeamsRequest request =
BatchCreateTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateTeamRequest>())
.build();
BatchCreateTeamsResponse response = teamServiceClient.batchCreateTeams(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchCreateTeamsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchCreateTeamsResponse |
|
batchCreateTeams(String parent, List<CreateTeamRequest> requests)
public final BatchCreateTeamsResponse batchCreateTeams(String parent, List<CreateTeamRequest> requests)Creates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<CreateTeamRequest> requests = new ArrayList<>();
BatchCreateTeamsResponse response = teamServiceClient.batchCreateTeams(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<CreateTeamRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchCreateTeamsResponse |
|
batchCreateTeamsCallable()
public final UnaryCallable<BatchCreateTeamsRequest,BatchCreateTeamsResponse> batchCreateTeamsCallable()Creates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
BatchCreateTeamsRequest request =
BatchCreateTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateTeamRequest>())
.build();
ApiFuture<BatchCreateTeamsResponse> future =
teamServiceClient.batchCreateTeamsCallable().futureCall(request);
// Do something.
BatchCreateTeamsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchCreateTeamsRequest,BatchCreateTeamsResponse> |
|
batchDeactivateTeams(@Nullable NetworkName parent, List<String> names)
public final BatchDeactivateTeamsResponse batchDeactivateTeams(@Nullable NetworkName parent, List<String> names)Batch deactivates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchDeactivateTeamsResponse response = teamServiceClient.batchDeactivateTeams(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateTeamsResponse |
|
batchDeactivateTeams(BatchDeactivateTeamsRequest request)
public final BatchDeactivateTeamsResponse batchDeactivateTeams(BatchDeactivateTeamsRequest request)Batch deactivates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
BatchDeactivateTeamsRequest request =
BatchDeactivateTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchDeactivateTeamsResponse response = teamServiceClient.batchDeactivateTeams(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchDeactivateTeamsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateTeamsResponse |
|
batchDeactivateTeams(String parent, List<String> names)
public final BatchDeactivateTeamsResponse batchDeactivateTeams(String parent, List<String> names)Batch deactivates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchDeactivateTeamsResponse response = teamServiceClient.batchDeactivateTeams(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. The resource names of the |
| Returns | |
|---|---|
| Type | Description |
BatchDeactivateTeamsResponse |
|
batchDeactivateTeamsCallable()
public final UnaryCallable<BatchDeactivateTeamsRequest,BatchDeactivateTeamsResponse> batchDeactivateTeamsCallable()Batch deactivates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
BatchDeactivateTeamsRequest request =
BatchDeactivateTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchDeactivateTeamsResponse> future =
teamServiceClient.batchDeactivateTeamsCallable().futureCall(request);
// Do something.
BatchDeactivateTeamsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchDeactivateTeamsRequest,BatchDeactivateTeamsResponse> |
|
batchUpdateTeams(@Nullable NetworkName parent, List<UpdateTeamRequest> requests)
public final BatchUpdateTeamsResponse batchUpdateTeams(@Nullable NetworkName parent, List<UpdateTeamRequest> requests)Batch updates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<UpdateTeamRequest> requests = new ArrayList<>();
BatchUpdateTeamsResponse response = teamServiceClient.batchUpdateTeams(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where |
requests |
List<UpdateTeamRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateTeamsResponse |
|
batchUpdateTeams(BatchUpdateTeamsRequest request)
public final BatchUpdateTeamsResponse batchUpdateTeams(BatchUpdateTeamsRequest request)Batch updates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
BatchUpdateTeamsRequest request =
BatchUpdateTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateTeamRequest>())
.build();
BatchUpdateTeamsResponse response = teamServiceClient.batchUpdateTeams(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchUpdateTeamsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateTeamsResponse |
|
batchUpdateTeams(String parent, List<UpdateTeamRequest> requests)
public final BatchUpdateTeamsResponse batchUpdateTeams(String parent, List<UpdateTeamRequest> requests)Batch updates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<UpdateTeamRequest> requests = new ArrayList<>();
BatchUpdateTeamsResponse response = teamServiceClient.batchUpdateTeams(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where |
requests |
List<UpdateTeamRequest>Required. The |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateTeamsResponse |
|
batchUpdateTeamsCallable()
public final UnaryCallable<BatchUpdateTeamsRequest,BatchUpdateTeamsResponse> batchUpdateTeamsCallable()Batch updates Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
BatchUpdateTeamsRequest request =
BatchUpdateTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateTeamRequest>())
.build();
ApiFuture<BatchUpdateTeamsResponse> future =
teamServiceClient.batchUpdateTeamsCallable().futureCall(request);
// Do something.
BatchUpdateTeamsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchUpdateTeamsRequest,BatchUpdateTeamsResponse> |
|
close()
public final void close()createTeam(@Nullable NetworkName parent, Team team)
public final Team createTeam(@Nullable NetworkName parent, Team team)Creates a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
Team team = Team.newBuilder().build();
Team response = teamServiceClient.createTeam(parent, team);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where this |
team |
TeamRequired. The |
| Returns | |
|---|---|
| Type | Description |
Team |
|
createTeam(CreateTeamRequest request)
public final Team createTeam(CreateTeamRequest request)Creates a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
CreateTeamRequest request =
CreateTeamRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setTeam(Team.newBuilder().build())
.build();
Team response = teamServiceClient.createTeam(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateTeamRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Team |
|
createTeam(String parent, Team team)
public final Team createTeam(String parent, Team team)Creates a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
Team team = Team.newBuilder().build();
Team response = teamServiceClient.createTeam(parent, team);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this |
team |
TeamRequired. The |
| Returns | |
|---|---|
| Type | Description |
Team |
|
createTeamCallable()
public final UnaryCallable<CreateTeamRequest,Team> createTeamCallable()Creates a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
CreateTeamRequest request =
CreateTeamRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setTeam(Team.newBuilder().build())
.build();
ApiFuture<Team> future = teamServiceClient.createTeamCallable().futureCall(request);
// Do something.
Team response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateTeamRequest,Team> |
|
getSettings()
public final @Nullable TeamServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.TeamServiceSettings |
|
getStub()
public TeamServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
TeamServiceStub |
|
getTeam(@Nullable TeamName name)
public final Team getTeam(@Nullable TeamName name)Retrieves a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
TeamName name = TeamName.of("[NETWORK_CODE]", "[TEAM]");
Team response = teamServiceClient.getTeam(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.TeamNameRequired. The resource name of the Team. Format:
|
| Returns | |
|---|---|
| Type | Description |
Team |
|
getTeam(GetTeamRequest request)
public final Team getTeam(GetTeamRequest request)Retrieves a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
GetTeamRequest request =
GetTeamRequest.newBuilder()
.setName(TeamName.of("[NETWORK_CODE]", "[TEAM]").toString())
.build();
Team response = teamServiceClient.getTeam(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetTeamRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Team |
|
getTeam(String name)
public final Team getTeam(String name)Retrieves a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
String name = TeamName.of("[NETWORK_CODE]", "[TEAM]").toString();
Team response = teamServiceClient.getTeam(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the Team. Format:
|
| Returns | |
|---|---|
| Type | Description |
Team |
|
getTeamCallable()
public final UnaryCallable<GetTeamRequest,Team> getTeamCallable()Retrieves a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
GetTeamRequest request =
GetTeamRequest.newBuilder()
.setName(TeamName.of("[NETWORK_CODE]", "[TEAM]").toString())
.build();
ApiFuture<Team> future = teamServiceClient.getTeamCallable().futureCall(request);
// Do something.
Team response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetTeamRequest,Team> |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listTeams(@Nullable NetworkName parent)
public final TeamServiceClient.ListTeamsPagedResponse listTeams(@Nullable NetworkName parent)Lists Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
for (Team element : teamServiceClient.listTeams(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent, which owns this collection of Teams. Format:
|
| Returns | |
|---|---|
| Type | Description |
TeamServiceClient.ListTeamsPagedResponse |
|
listTeams(ListTeamsRequest request)
public final TeamServiceClient.ListTeamsPagedResponse listTeams(ListTeamsRequest request)Lists Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
ListTeamsRequest request =
ListTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
for (Team element : teamServiceClient.listTeams(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListTeamsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
TeamServiceClient.ListTeamsPagedResponse |
|
listTeams(String parent)
public final TeamServiceClient.ListTeamsPagedResponse listTeams(String parent)Lists Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
for (Team element : teamServiceClient.listTeams(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of Teams. Format:
|
| Returns | |
|---|---|
| Type | Description |
TeamServiceClient.ListTeamsPagedResponse |
|
listTeamsCallable()
public final UnaryCallable<ListTeamsRequest,ListTeamsResponse> listTeamsCallable()Lists Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
ListTeamsRequest request =
ListTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
while (true) {
ListTeamsResponse response = teamServiceClient.listTeamsCallable().call(request);
for (Team element : response.getTeamsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListTeamsRequest,ListTeamsResponse> |
|
listTeamsPagedCallable()
public final UnaryCallable<ListTeamsRequest,TeamServiceClient.ListTeamsPagedResponse> listTeamsPagedCallable()Lists Team objects.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
ListTeamsRequest request =
ListTeamsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
ApiFuture<Team> future = teamServiceClient.listTeamsPagedCallable().futureCall(request);
// Do something.
for (Team element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListTeamsRequest,ListTeamsPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateTeam(Team team, FieldMask updateMask)
public final Team updateTeam(Team team, FieldMask updateMask)Updates a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
Team team = Team.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Team response = teamServiceClient.updateTeam(team, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
team |
TeamRequired. The The |
updateMask |
FieldMaskOptional. The list of fields to update. |
| Returns | |
|---|---|
| Type | Description |
Team |
|
updateTeam(UpdateTeamRequest request)
public final Team updateTeam(UpdateTeamRequest request)Updates a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
UpdateTeamRequest request =
UpdateTeamRequest.newBuilder()
.setTeam(Team.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Team response = teamServiceClient.updateTeam(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateTeamRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Team |
|
updateTeamCallable()
public final UnaryCallable<UpdateTeamRequest,Team> updateTeamCallable()Updates a Team object.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TeamServiceClient teamServiceClient = TeamServiceClient.create()) {
UpdateTeamRequest request =
UpdateTeamRequest.newBuilder()
.setTeam(Team.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Team> future = teamServiceClient.updateTeamCallable().futureCall(request);
// Do something.
Team response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateTeamRequest,Team> |
|