| GitHub Repository | Product Reference |
Service Description: Provides methods for handling ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
ChildPublisherName name = ChildPublisherName.of("[NETWORK_CODE]", "[CHILD_PUBLISHER]");
ChildPublisher response = childPublisherServiceClient.getChildPublisher(name);
}
Note: close() needs to be called on the ChildPublisherServiceClient 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 |
|---|---|---|
GetChildPublisher |
Retrieves a ChildPublisher object. |
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.
|
ListChildPublishers |
Lists ChildPublisher objects. |
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.
|
CreateChildPublisher |
Creates a ChildPublisher object. |
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.
|
BatchCreateChildPublishers |
Creates ChildPublisher objects. |
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.
|
UpdateChildPublisher |
Updates a ChildPublisher object. |
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.
|
BatchUpdateChildPublishers |
Batch updates ChildPublisher objects. |
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.
|
BatchResendChildPublisherInvitationEmails |
Batch resends invitation emails to ChildPublishers. Only expired and pending ChildPublishers can be sent invitation emails. Rejected, withdrawn, and accepted ChildPublishers will be ignored. |
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.
|
BatchRenegotiateChildPublisherAgreements |
Batch renegotiates ChildPublisher agreements (i.e., invite with updated terms). Only the agreements of rejected or withdrawn ChildPublishers can be renegotiated. Expired, pending, and accepted ChildPublishers will be ignored. |
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.
|
BatchRejectChildPublishers |
Batch rejects ChildPublishers. Only pending or active ChildPublishers can be rejected. Expired, rejected, and withdrawn ChildPublishers will be ignored. This method is only intended to be called in response to a child user rejecting an invitation and exists to support the rejection of ChildPublishers that are not yet associated with an Ad Manager network. To sever the relationship from the parent publisher's side, use [BatchWithdrawChildPublisher][]. |
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.
|
BatchWithdrawChildPublishers |
Batch withdraws ChildPublishers. Only expired, pending, and accepted ChildPublishers can be withdrawn. Rejected or withdrawn ChildPublishers will be ignored. |
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 ChildPublisherServiceSettings 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
ChildPublisherServiceSettings childPublisherServiceSettings =
ChildPublisherServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create(childPublisherServiceSettings);
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
ChildPublisherServiceSettings childPublisherServiceSettings =
ChildPublisherServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create(childPublisherServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final ChildPublisherServiceClient create()Constructs an instance of ChildPublisherServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
ChildPublisherServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(ChildPublisherServiceSettings settings)
public static final ChildPublisherServiceClient create(ChildPublisherServiceSettings settings)Constructs an instance of ChildPublisherServiceClient, 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 |
ChildPublisherServiceSettings |
| Returns | |
|---|---|
| Type | Description |
ChildPublisherServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(ChildPublisherServiceStub stub)
public static final ChildPublisherServiceClient create(ChildPublisherServiceStub stub)Constructs an instance of ChildPublisherServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(ChildPublisherServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
ChildPublisherServiceStub |
| Returns | |
|---|---|
| Type | Description |
ChildPublisherServiceClient |
|
Constructors
ChildPublisherServiceClient(ChildPublisherServiceSettings settings)
protected ChildPublisherServiceClient(ChildPublisherServiceSettings settings)Constructs an instance of ChildPublisherServiceClient, 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 |
ChildPublisherServiceSettings |
ChildPublisherServiceClient(ChildPublisherServiceStub stub)
protected ChildPublisherServiceClient(ChildPublisherServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
ChildPublisherServiceStub |
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 |
|
batchCreateChildPublishers(@Nullable NetworkName parent, List<CreateChildPublisherRequest> requests)
public final BatchCreateChildPublishersResponse batchCreateChildPublishers(@Nullable NetworkName parent, List<CreateChildPublisherRequest> requests)Creates ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<CreateChildPublisherRequest> requests = new ArrayList<>();
BatchCreateChildPublishersResponse response =
childPublisherServiceClient.batchCreateChildPublishers(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where
ChildPublishers will be created. Format:
|
requests |
List<CreateChildPublisherRequest>Required. The ChildPublisher objects to create. A maximum of 100 objects can be created in a batch. |
| Returns | |
|---|---|
| Type | Description |
BatchCreateChildPublishersResponse |
|
batchCreateChildPublishers(BatchCreateChildPublishersRequest request)
public final BatchCreateChildPublishersResponse batchCreateChildPublishers(BatchCreateChildPublishersRequest request)Creates ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchCreateChildPublishersRequest request =
BatchCreateChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateChildPublisherRequest>())
.build();
BatchCreateChildPublishersResponse response =
childPublisherServiceClient.batchCreateChildPublishers(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchCreateChildPublishersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchCreateChildPublishersResponse |
|
batchCreateChildPublishers(String parent, List<CreateChildPublisherRequest> requests)
public final BatchCreateChildPublishersResponse batchCreateChildPublishers(String parent, List<CreateChildPublisherRequest> requests)Creates ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<CreateChildPublisherRequest> requests = new ArrayList<>();
BatchCreateChildPublishersResponse response =
childPublisherServiceClient.batchCreateChildPublishers(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where
ChildPublishers will be created. Format:
|
requests |
List<CreateChildPublisherRequest>Required. The ChildPublisher objects to create. A maximum of 100 objects can be created in a batch. |
| Returns | |
|---|---|
| Type | Description |
BatchCreateChildPublishersResponse |
|
batchCreateChildPublishersCallable()
public final UnaryCallable<BatchCreateChildPublishersRequest,BatchCreateChildPublishersResponse> batchCreateChildPublishersCallable()Creates ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchCreateChildPublishersRequest request =
BatchCreateChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<CreateChildPublisherRequest>())
.build();
ApiFuture<BatchCreateChildPublishersResponse> future =
childPublisherServiceClient.batchCreateChildPublishersCallable().futureCall(request);
// Do something.
BatchCreateChildPublishersResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchCreateChildPublishersRequest,BatchCreateChildPublishersResponse> |
|
batchRejectChildPublishers(@Nullable NetworkName parent, List<String> names)
public final BatchRejectChildPublishersResponse batchRejectChildPublishers(@Nullable NetworkName parent, List<String> names)Batch rejects ChildPublishers.
Only pending or active ChildPublishers can be rejected. Expired, rejected, and withdrawn ChildPublishers will be ignored.
This method is only intended to be called in response to a child user rejecting an invitation and exists to support the rejection of ChildPublishers that are not yet associated with an Ad Manager network.
To sever the relationship from the parent publisher's side, use [BatchWithdrawChildPublisher][].
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchRejectChildPublishersResponse response =
childPublisherServiceClient.batchRejectChildPublishers(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. Format: |
names |
List<String>Required. Resource names of the
ChildPublishers to reject. Format:
|
| Returns | |
|---|---|
| Type | Description |
BatchRejectChildPublishersResponse |
|
batchRejectChildPublishers(BatchRejectChildPublishersRequest request)
public final BatchRejectChildPublishersResponse batchRejectChildPublishers(BatchRejectChildPublishersRequest request)Batch rejects ChildPublishers.
Only pending or active ChildPublishers can be rejected. Expired, rejected, and withdrawn ChildPublishers will be ignored.
This method is only intended to be called in response to a child user rejecting an invitation and exists to support the rejection of ChildPublishers that are not yet associated with an Ad Manager network.
To sever the relationship from the parent publisher's side, use [BatchWithdrawChildPublisher][].
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchRejectChildPublishersRequest request =
BatchRejectChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchRejectChildPublishersResponse response =
childPublisherServiceClient.batchRejectChildPublishers(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchRejectChildPublishersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchRejectChildPublishersResponse |
|
batchRejectChildPublishers(String parent, List<String> names)
public final BatchRejectChildPublishersResponse batchRejectChildPublishers(String parent, List<String> names)Batch rejects ChildPublishers.
Only pending or active ChildPublishers can be rejected. Expired, rejected, and withdrawn ChildPublishers will be ignored.
This method is only intended to be called in response to a child user rejecting an invitation and exists to support the rejection of ChildPublishers that are not yet associated with an Ad Manager network.
To sever the relationship from the parent publisher's side, use [BatchWithdrawChildPublisher][].
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchRejectChildPublishersResponse response =
childPublisherServiceClient.batchRejectChildPublishers(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. Resource names of the
ChildPublishers to reject. Format:
|
| Returns | |
|---|---|
| Type | Description |
BatchRejectChildPublishersResponse |
|
batchRejectChildPublishersCallable()
public final UnaryCallable<BatchRejectChildPublishersRequest,BatchRejectChildPublishersResponse> batchRejectChildPublishersCallable()Batch rejects ChildPublishers.
Only pending or active ChildPublishers can be rejected. Expired, rejected, and withdrawn ChildPublishers will be ignored.
This method is only intended to be called in response to a child user rejecting an invitation and exists to support the rejection of ChildPublishers that are not yet associated with an Ad Manager network.
To sever the relationship from the parent publisher's side, use [BatchWithdrawChildPublisher][].
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchRejectChildPublishersRequest request =
BatchRejectChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchRejectChildPublishersResponse> future =
childPublisherServiceClient.batchRejectChildPublishersCallable().futureCall(request);
// Do something.
BatchRejectChildPublishersResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchRejectChildPublishersRequest,BatchRejectChildPublishersResponse> |
|
batchRenegotiateChildPublisherAgreements(@Nullable NetworkName parent, List<RenegotiateChildPublisherAgreementRequest> requests)
public final BatchRenegotiateChildPublisherAgreementsResponse batchRenegotiateChildPublisherAgreements(@Nullable NetworkName parent, List<RenegotiateChildPublisherAgreementRequest> requests)Batch renegotiates ChildPublisher agreements (i.e., invite with updated terms).
Only the agreements of rejected or withdrawn ChildPublishers can be renegotiated. Expired, pending, and accepted ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<RenegotiateChildPublisherAgreementRequest> requests = new ArrayList<>();
BatchRenegotiateChildPublisherAgreementsResponse response =
childPublisherServiceClient.batchRenegotiateChildPublisherAgreements(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. Format: |
requests |
List<RenegotiateChildPublisherAgreementRequest>Required. The requests to renegotiate ChildPublisher agreements. |
| Returns | |
|---|---|
| Type | Description |
BatchRenegotiateChildPublisherAgreementsResponse |
|
batchRenegotiateChildPublisherAgreements(BatchRenegotiateChildPublisherAgreementsRequest request)
public final BatchRenegotiateChildPublisherAgreementsResponse batchRenegotiateChildPublisherAgreements(BatchRenegotiateChildPublisherAgreementsRequest request)Batch renegotiates ChildPublisher agreements (i.e., invite with updated terms).
Only the agreements of rejected or withdrawn ChildPublishers can be renegotiated. Expired, pending, and accepted ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchRenegotiateChildPublisherAgreementsRequest request =
BatchRenegotiateChildPublisherAgreementsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<RenegotiateChildPublisherAgreementRequest>())
.build();
BatchRenegotiateChildPublisherAgreementsResponse response =
childPublisherServiceClient.batchRenegotiateChildPublisherAgreements(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchRenegotiateChildPublisherAgreementsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchRenegotiateChildPublisherAgreementsResponse |
|
batchRenegotiateChildPublisherAgreements(String parent, List<RenegotiateChildPublisherAgreementRequest> requests)
public final BatchRenegotiateChildPublisherAgreementsResponse batchRenegotiateChildPublisherAgreements(String parent, List<RenegotiateChildPublisherAgreementRequest> requests)Batch renegotiates ChildPublisher agreements (i.e., invite with updated terms).
Only the agreements of rejected or withdrawn ChildPublishers can be renegotiated. Expired, pending, and accepted ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<RenegotiateChildPublisherAgreementRequest> requests = new ArrayList<>();
BatchRenegotiateChildPublisherAgreementsResponse response =
childPublisherServiceClient.batchRenegotiateChildPublisherAgreements(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
requests |
List<RenegotiateChildPublisherAgreementRequest>Required. The requests to renegotiate ChildPublisher agreements. |
| Returns | |
|---|---|
| Type | Description |
BatchRenegotiateChildPublisherAgreementsResponse |
|
batchRenegotiateChildPublisherAgreementsCallable()
public final UnaryCallable<BatchRenegotiateChildPublisherAgreementsRequest,BatchRenegotiateChildPublisherAgreementsResponse> batchRenegotiateChildPublisherAgreementsCallable()Batch renegotiates ChildPublisher agreements (i.e., invite with updated terms).
Only the agreements of rejected or withdrawn ChildPublishers can be renegotiated. Expired, pending, and accepted ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchRenegotiateChildPublisherAgreementsRequest request =
BatchRenegotiateChildPublisherAgreementsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<RenegotiateChildPublisherAgreementRequest>())
.build();
ApiFuture<BatchRenegotiateChildPublisherAgreementsResponse> future =
childPublisherServiceClient
.batchRenegotiateChildPublisherAgreementsCallable()
.futureCall(request);
// Do something.
BatchRenegotiateChildPublisherAgreementsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchRenegotiateChildPublisherAgreementsRequest,BatchRenegotiateChildPublisherAgreementsResponse> |
|
batchResendChildPublisherInvitationEmails(@Nullable NetworkName parent, List<String> names)
public final BatchResendChildPublisherInvitationEmailsResponse batchResendChildPublisherInvitationEmails(@Nullable NetworkName parent, List<String> names)Batch resends invitation emails to ChildPublishers.
Only expired and pending ChildPublishers can be sent invitation emails. Rejected, withdrawn, and accepted ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchResendChildPublisherInvitationEmailsResponse response =
childPublisherServiceClient.batchResendChildPublisherInvitationEmails(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. Format: |
names |
List<String>Required. Resource names of the
ChildPublishers that should be resent invitation
emails. Format: |
| Returns | |
|---|---|
| Type | Description |
BatchResendChildPublisherInvitationEmailsResponse |
|
batchResendChildPublisherInvitationEmails(BatchResendChildPublisherInvitationEmailsRequest request)
public final BatchResendChildPublisherInvitationEmailsResponse batchResendChildPublisherInvitationEmails(BatchResendChildPublisherInvitationEmailsRequest request)Batch resends invitation emails to ChildPublishers.
Only expired and pending ChildPublishers can be sent invitation emails. Rejected, withdrawn, and accepted ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchResendChildPublisherInvitationEmailsRequest request =
BatchResendChildPublisherInvitationEmailsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchResendChildPublisherInvitationEmailsResponse response =
childPublisherServiceClient.batchResendChildPublisherInvitationEmails(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchResendChildPublisherInvitationEmailsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchResendChildPublisherInvitationEmailsResponse |
|
batchResendChildPublisherInvitationEmails(String parent, List<String> names)
public final BatchResendChildPublisherInvitationEmailsResponse batchResendChildPublisherInvitationEmails(String parent, List<String> names)Batch resends invitation emails to ChildPublishers.
Only expired and pending ChildPublishers can be sent invitation emails. Rejected, withdrawn, and accepted ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchResendChildPublisherInvitationEmailsResponse response =
childPublisherServiceClient.batchResendChildPublisherInvitationEmails(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. Resource names of the
ChildPublishers that should be resent invitation
emails. Format: |
| Returns | |
|---|---|
| Type | Description |
BatchResendChildPublisherInvitationEmailsResponse |
|
batchResendChildPublisherInvitationEmailsCallable()
public final UnaryCallable<BatchResendChildPublisherInvitationEmailsRequest,BatchResendChildPublisherInvitationEmailsResponse> batchResendChildPublisherInvitationEmailsCallable()Batch resends invitation emails to ChildPublishers.
Only expired and pending ChildPublishers can be sent invitation emails. Rejected, withdrawn, and accepted ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchResendChildPublisherInvitationEmailsRequest request =
BatchResendChildPublisherInvitationEmailsRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchResendChildPublisherInvitationEmailsResponse> future =
childPublisherServiceClient
.batchResendChildPublisherInvitationEmailsCallable()
.futureCall(request);
// Do something.
BatchResendChildPublisherInvitationEmailsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchResendChildPublisherInvitationEmailsRequest,BatchResendChildPublisherInvitationEmailsResponse> |
|
batchUpdateChildPublishers(@Nullable NetworkName parent, List<UpdateChildPublisherRequest> requests)
public final BatchUpdateChildPublishersResponse batchUpdateChildPublishers(@Nullable NetworkName parent, List<UpdateChildPublisherRequest> requests)Batch updates ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<UpdateChildPublisherRequest> requests = new ArrayList<>();
BatchUpdateChildPublishersResponse response =
childPublisherServiceClient.batchUpdateChildPublishers(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where
ChildPublishers will be updated. Format:
|
requests |
List<UpdateChildPublisherRequest>Required. The ChildPublisher objects to update. A maximum of 100 objects can be updated in a batch. |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateChildPublishersResponse |
|
batchUpdateChildPublishers(BatchUpdateChildPublishersRequest request)
public final BatchUpdateChildPublishersResponse batchUpdateChildPublishers(BatchUpdateChildPublishersRequest request)Batch updates ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchUpdateChildPublishersRequest request =
BatchUpdateChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateChildPublisherRequest>())
.build();
BatchUpdateChildPublishersResponse response =
childPublisherServiceClient.batchUpdateChildPublishers(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchUpdateChildPublishersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateChildPublishersResponse |
|
batchUpdateChildPublishers(String parent, List<UpdateChildPublisherRequest> requests)
public final BatchUpdateChildPublishersResponse batchUpdateChildPublishers(String parent, List<UpdateChildPublisherRequest> requests)Batch updates ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<UpdateChildPublisherRequest> requests = new ArrayList<>();
BatchUpdateChildPublishersResponse response =
childPublisherServiceClient.batchUpdateChildPublishers(parent, requests);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where
ChildPublishers will be updated. Format:
|
requests |
List<UpdateChildPublisherRequest>Required. The ChildPublisher objects to update. A maximum of 100 objects can be updated in a batch. |
| Returns | |
|---|---|
| Type | Description |
BatchUpdateChildPublishersResponse |
|
batchUpdateChildPublishersCallable()
public final UnaryCallable<BatchUpdateChildPublishersRequest,BatchUpdateChildPublishersResponse> batchUpdateChildPublishersCallable()Batch updates ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchUpdateChildPublishersRequest request =
BatchUpdateChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllRequests(new ArrayList<UpdateChildPublisherRequest>())
.build();
ApiFuture<BatchUpdateChildPublishersResponse> future =
childPublisherServiceClient.batchUpdateChildPublishersCallable().futureCall(request);
// Do something.
BatchUpdateChildPublishersResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchUpdateChildPublishersRequest,BatchUpdateChildPublishersResponse> |
|
batchWithdrawChildPublishers(@Nullable NetworkName parent, List<String> names)
public final BatchWithdrawChildPublishersResponse batchWithdrawChildPublishers(@Nullable NetworkName parent, List<String> names)Batch withdraws ChildPublishers.
Only expired, pending, and accepted ChildPublishers can be withdrawn. Rejected or withdrawn ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
List<String> names = new ArrayList<>();
BatchWithdrawChildPublishersResponse response =
childPublisherServiceClient.batchWithdrawChildPublishers(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. Format: |
names |
List<String>Required. Resource names of the
ChildPublishers to withdraw. Format:
|
| Returns | |
|---|---|
| Type | Description |
BatchWithdrawChildPublishersResponse |
|
batchWithdrawChildPublishers(BatchWithdrawChildPublishersRequest request)
public final BatchWithdrawChildPublishersResponse batchWithdrawChildPublishers(BatchWithdrawChildPublishersRequest request)Batch withdraws ChildPublishers.
Only expired, pending, and accepted ChildPublishers can be withdrawn. Rejected or withdrawn ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchWithdrawChildPublishersRequest request =
BatchWithdrawChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
BatchWithdrawChildPublishersResponse response =
childPublisherServiceClient.batchWithdrawChildPublishers(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchWithdrawChildPublishersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BatchWithdrawChildPublishersResponse |
|
batchWithdrawChildPublishers(String parent, List<String> names)
public final BatchWithdrawChildPublishersResponse batchWithdrawChildPublishers(String parent, List<String> names)Batch withdraws ChildPublishers.
Only expired, pending, and accepted ChildPublishers can be withdrawn. Rejected or withdrawn ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
List<String> names = new ArrayList<>();
BatchWithdrawChildPublishersResponse response =
childPublisherServiceClient.batchWithdrawChildPublishers(parent, names);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. Format: |
names |
List<String>Required. Resource names of the
ChildPublishers to withdraw. Format:
|
| Returns | |
|---|---|
| Type | Description |
BatchWithdrawChildPublishersResponse |
|
batchWithdrawChildPublishersCallable()
public final UnaryCallable<BatchWithdrawChildPublishersRequest,BatchWithdrawChildPublishersResponse> batchWithdrawChildPublishersCallable()Batch withdraws ChildPublishers.
Only expired, pending, and accepted ChildPublishers can be withdrawn. Rejected or withdrawn ChildPublishers will be ignored.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
BatchWithdrawChildPublishersRequest request =
BatchWithdrawChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.addAllNames(new ArrayList<String>())
.build();
ApiFuture<BatchWithdrawChildPublishersResponse> future =
childPublisherServiceClient.batchWithdrawChildPublishersCallable().futureCall(request);
// Do something.
BatchWithdrawChildPublishersResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchWithdrawChildPublishersRequest,BatchWithdrawChildPublishersResponse> |
|
close()
public final void close()createChildPublisher(@Nullable NetworkName parent, ChildPublisher childPublisher)
public final ChildPublisher createChildPublisher(@Nullable NetworkName parent, ChildPublisher childPublisher)Creates a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
ChildPublisher childPublisher = ChildPublisher.newBuilder().build();
ChildPublisher response =
childPublisherServiceClient.createChildPublisher(parent, childPublisher);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.NetworkNameRequired. The parent resource where this
ChildPublisher will be created. Format:
|
childPublisher |
ChildPublisherRequired. The ChildPublisher to create. |
| Returns | |
|---|---|
| Type | Description |
ChildPublisher |
|
createChildPublisher(CreateChildPublisherRequest request)
public final ChildPublisher createChildPublisher(CreateChildPublisherRequest request)Creates a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
CreateChildPublisherRequest request =
CreateChildPublisherRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setChildPublisher(ChildPublisher.newBuilder().build())
.build();
ChildPublisher response = childPublisherServiceClient.createChildPublisher(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateChildPublisherRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ChildPublisher |
|
createChildPublisher(String parent, ChildPublisher childPublisher)
public final ChildPublisher createChildPublisher(String parent, ChildPublisher childPublisher)Creates a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
ChildPublisher childPublisher = ChildPublisher.newBuilder().build();
ChildPublisher response =
childPublisherServiceClient.createChildPublisher(parent, childPublisher);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this
ChildPublisher will be created. Format:
|
childPublisher |
ChildPublisherRequired. The ChildPublisher to create. |
| Returns | |
|---|---|
| Type | Description |
ChildPublisher |
|
createChildPublisherCallable()
public final UnaryCallable<CreateChildPublisherRequest,ChildPublisher> createChildPublisherCallable()Creates a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
CreateChildPublisherRequest request =
CreateChildPublisherRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setChildPublisher(ChildPublisher.newBuilder().build())
.build();
ApiFuture<ChildPublisher> future =
childPublisherServiceClient.createChildPublisherCallable().futureCall(request);
// Do something.
ChildPublisher response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateChildPublisherRequest,ChildPublisher> |
|
getChildPublisher(@Nullable ChildPublisherName name)
public final ChildPublisher getChildPublisher(@Nullable ChildPublisherName name)Retrieves a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
ChildPublisherName name = ChildPublisherName.of("[NETWORK_CODE]", "[CHILD_PUBLISHER]");
ChildPublisher response = childPublisherServiceClient.getChildPublisher(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.ChildPublisherNameRequired. The resource name of the
ChildPublisher. Format:
|
| Returns | |
|---|---|
| Type | Description |
ChildPublisher |
|
getChildPublisher(GetChildPublisherRequest request)
public final ChildPublisher getChildPublisher(GetChildPublisherRequest request)Retrieves a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
GetChildPublisherRequest request =
GetChildPublisherRequest.newBuilder()
.setName(ChildPublisherName.of("[NETWORK_CODE]", "[CHILD_PUBLISHER]").toString())
.build();
ChildPublisher response = childPublisherServiceClient.getChildPublisher(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetChildPublisherRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ChildPublisher |
|
getChildPublisher(String name)
public final ChildPublisher getChildPublisher(String name)Retrieves a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
String name = ChildPublisherName.of("[NETWORK_CODE]", "[CHILD_PUBLISHER]").toString();
ChildPublisher response = childPublisherServiceClient.getChildPublisher(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the
ChildPublisher. Format:
|
| Returns | |
|---|---|
| Type | Description |
ChildPublisher |
|
getChildPublisherCallable()
public final UnaryCallable<GetChildPublisherRequest,ChildPublisher> getChildPublisherCallable()Retrieves a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
GetChildPublisherRequest request =
GetChildPublisherRequest.newBuilder()
.setName(ChildPublisherName.of("[NETWORK_CODE]", "[CHILD_PUBLISHER]").toString())
.build();
ApiFuture<ChildPublisher> future =
childPublisherServiceClient.getChildPublisherCallable().futureCall(request);
// Do something.
ChildPublisher response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetChildPublisherRequest,ChildPublisher> |
|
getSettings()
public final @Nullable ChildPublisherServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.ads.admanager.v1.ChildPublisherServiceSettings |
|
getStub()
public ChildPublisherServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
ChildPublisherServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listChildPublishers(@Nullable NetworkName parent)
public final ChildPublisherServiceClient.ListChildPublishersPagedResponse listChildPublishers(@Nullable NetworkName parent)Lists ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
NetworkName parent = NetworkName.of("[NETWORK_CODE]");
for (ChildPublisher element :
childPublisherServiceClient.listChildPublishers(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
ChildPublishers. Format:
|
| Returns | |
|---|---|
| Type | Description |
ChildPublisherServiceClient.ListChildPublishersPagedResponse |
|
listChildPublishers(ListChildPublishersRequest request)
public final ChildPublisherServiceClient.ListChildPublishersPagedResponse listChildPublishers(ListChildPublishersRequest request)Lists ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
ListChildPublishersRequest request =
ListChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
for (ChildPublisher element :
childPublisherServiceClient.listChildPublishers(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListChildPublishersRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ChildPublisherServiceClient.ListChildPublishersPagedResponse |
|
listChildPublishers(String parent)
public final ChildPublisherServiceClient.ListChildPublishersPagedResponse listChildPublishers(String parent)Lists ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
String parent = NetworkName.of("[NETWORK_CODE]").toString();
for (ChildPublisher element :
childPublisherServiceClient.listChildPublishers(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of
ChildPublishers. Format:
|
| Returns | |
|---|---|
| Type | Description |
ChildPublisherServiceClient.ListChildPublishersPagedResponse |
|
listChildPublishersCallable()
public final UnaryCallable<ListChildPublishersRequest,ListChildPublishersResponse> listChildPublishersCallable()Lists ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
ListChildPublishersRequest request =
ListChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
while (true) {
ListChildPublishersResponse response =
childPublisherServiceClient.listChildPublishersCallable().call(request);
for (ChildPublisher element : response.getChildPublishersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListChildPublishersRequest,ListChildPublishersResponse> |
|
listChildPublishersPagedCallable()
public final UnaryCallable<ListChildPublishersRequest,ChildPublisherServiceClient.ListChildPublishersPagedResponse> listChildPublishersPagedCallable()Lists ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
ListChildPublishersRequest request =
ListChildPublishersRequest.newBuilder()
.setParent(NetworkName.of("[NETWORK_CODE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.setSkip(3532159)
.build();
ApiFuture<ChildPublisher> future =
childPublisherServiceClient.listChildPublishersPagedCallable().futureCall(request);
// Do something.
for (ChildPublisher element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListChildPublishersRequest,ListChildPublishersPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateChildPublisher(ChildPublisher childPublisher, FieldMask updateMask)
public final ChildPublisher updateChildPublisher(ChildPublisher childPublisher, FieldMask updateMask)Updates a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
ChildPublisher childPublisher = ChildPublisher.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
ChildPublisher response =
childPublisherServiceClient.updateChildPublisher(childPublisher, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
childPublisher |
ChildPublisherRequired. The ChildPublisher to update. The ChildPublisher's |
updateMask |
FieldMaskOptional. The list of fields to update. |
| Returns | |
|---|---|
| Type | Description |
ChildPublisher |
|
updateChildPublisher(UpdateChildPublisherRequest request)
public final ChildPublisher updateChildPublisher(UpdateChildPublisherRequest request)Updates a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
UpdateChildPublisherRequest request =
UpdateChildPublisherRequest.newBuilder()
.setChildPublisher(ChildPublisher.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ChildPublisher response = childPublisherServiceClient.updateChildPublisher(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateChildPublisherRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ChildPublisher |
|
updateChildPublisherCallable()
public final UnaryCallable<UpdateChildPublisherRequest,ChildPublisher> updateChildPublisherCallable()Updates a ChildPublisher 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 (ChildPublisherServiceClient childPublisherServiceClient =
ChildPublisherServiceClient.create()) {
UpdateChildPublisherRequest request =
UpdateChildPublisherRequest.newBuilder()
.setChildPublisher(ChildPublisher.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<ChildPublisher> future =
childPublisherServiceClient.updateChildPublisherCallable().futureCall(request);
// Do something.
ChildPublisher response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateChildPublisherRequest,ChildPublisher> |
|