| GitHub Repository | Product Reference |
Service Description: FeedsService contains procedures for managing Chronicle third-party feeds.
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 (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
FeedServiceAccount response = feedsServiceClient.fetchServiceAccountForCustomer(parent);
}
Note: close() needs to be called on the FeedsServiceClient 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 |
|---|---|---|
FetchServiceAccountForCustomer |
Fetch Chronicle's service account used for ingesting data from Cloud Storage buckets. |
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.
|
CreateFeed |
Creates a feed. |
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.
|
GetFeed |
Gets a feed. |
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.
|
DeleteFeed |
Deletes a feed. |
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.
|
EnableFeed |
Enable feed for ingestion. |
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.
|
DisableFeed |
Disable feed for ingestion. Make FeedState ARCHIVED. |
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.
|
ListFeeds |
Lists all feeds for the customer. |
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.
|
ListFeedPacks |
Lists Packs for which feeds can be configured. |
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.
|
GetFeedPack |
Gets a feed pack. |
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.
|
UpdateFeed |
Updates the full feed. |
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.
|
ListFeedSourceTypeSchemas |
List all FeedSourceTypeSchemas. |
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.
|
ListLogTypeSchemas |
List all LogTypeSchemas compatible with a given FeedSourceType. |
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.
|
ImportPushLogs |
Import logs coming from https push feeds. All log entries must be valid UTF-8. A single invalid event will cause the entire request to be rejected. |
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.
|
GenerateSecret |
Generates a new secret for https push feeds which do not support jwt tokens. Secrets once generated should be copied and stored in safe place to be used while configuring https push feeds.Please note that you can always generate a new secret again for a feed using this API but it will invalidate the previously generated secret for the feed. |
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 FeedsServiceSettings 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
FeedsServiceSettings feedsServiceSettings =
FeedsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
FeedsServiceClient feedsServiceClient = FeedsServiceClient.create(feedsServiceSettings);
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
FeedsServiceSettings feedsServiceSettings =
FeedsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
FeedsServiceClient feedsServiceClient = FeedsServiceClient.create(feedsServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
FeedsServiceSettings feedsServiceSettings = FeedsServiceSettings.newHttpJsonBuilder().build();
FeedsServiceClient feedsServiceClient = FeedsServiceClient.create(feedsServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final FeedsServiceClient create()Constructs an instance of FeedsServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(FeedsServiceSettings settings)
public static final FeedsServiceClient create(FeedsServiceSettings settings)Constructs an instance of FeedsServiceClient, 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 |
FeedsServiceSettings |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(FeedsServiceStub stub)
public static final FeedsServiceClient create(FeedsServiceStub stub)Constructs an instance of FeedsServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(FeedsServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
FeedsServiceStub |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient |
|
Constructors
FeedsServiceClient(FeedsServiceSettings settings)
protected FeedsServiceClient(FeedsServiceSettings settings)Constructs an instance of FeedsServiceClient, 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 |
FeedsServiceSettings |
FeedsServiceClient(FeedsServiceStub stub)
protected FeedsServiceClient(FeedsServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
FeedsServiceStub |
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 |
|
close()
public final void close()createFeed(@Nullable InstanceName parent, Feed feed)
public final Feed createFeed(@Nullable InstanceName parent, Feed feed)Creates a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Feed feed = Feed.newBuilder().build();
Feed response = feedsServiceClient.createFeed(parent, feed);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.InstanceNameRequired. The parent resource where this Feed will be created. Format: projects/{project}/locations/{location}/instances/{instance} |
feed |
FeedRequired. Feed to create. |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
createFeed(CreateFeedRequest request)
public final Feed createFeed(CreateFeedRequest request)Creates a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
CreateFeedRequest request =
CreateFeedRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setFeed(Feed.newBuilder().build())
.build();
Feed response = feedsServiceClient.createFeed(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateFeedRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
createFeed(String parent, Feed feed)
public final Feed createFeed(String parent, Feed feed)Creates a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
Feed feed = Feed.newBuilder().build();
Feed response = feedsServiceClient.createFeed(parent, feed);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this Feed will be created. Format: projects/{project}/locations/{location}/instances/{instance} |
feed |
FeedRequired. Feed to create. |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
createFeedCallable()
public final UnaryCallable<CreateFeedRequest,Feed> createFeedCallable()Creates a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
CreateFeedRequest request =
CreateFeedRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setFeed(Feed.newBuilder().build())
.build();
ApiFuture<Feed> future = feedsServiceClient.createFeedCallable().futureCall(request);
// Do something.
Feed response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateFeedRequest,Feed> |
|
deleteFeed(@Nullable FeedName name)
public final void deleteFeed(@Nullable FeedName name)Deletes a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
FeedName name = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]");
feedsServiceClient.deleteFeed(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.FeedNameRequired. The ID of the feed to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
deleteFeed(DeleteFeedRequest request)
public final void deleteFeed(DeleteFeedRequest request)Deletes a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
DeleteFeedRequest request =
DeleteFeedRequest.newBuilder()
.setName(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.setDeleteBacklog(true)
.build();
feedsServiceClient.deleteFeed(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteFeedRequestThe request object containing all of the parameters for the API call. |
deleteFeed(String name)
public final void deleteFeed(String name)Deletes a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String name = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString();
feedsServiceClient.deleteFeed(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The ID of the feed to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
deleteFeedCallable()
public final UnaryCallable<DeleteFeedRequest,Empty> deleteFeedCallable()Deletes a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
DeleteFeedRequest request =
DeleteFeedRequest.newBuilder()
.setName(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.setDeleteBacklog(true)
.build();
ApiFuture<Empty> future = feedsServiceClient.deleteFeedCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteFeedRequest,Empty> |
|
disableFeed(@Nullable FeedName name)
public final Feed disableFeed(@Nullable FeedName name)Disable feed for ingestion. Make FeedState ARCHIVED.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
FeedName name = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]");
Feed response = feedsServiceClient.disableFeed(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.FeedNameRequired. The name of the feed to disable. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
disableFeed(DisableFeedRequest request)
public final Feed disableFeed(DisableFeedRequest request)Disable feed for ingestion. Make FeedState ARCHIVED.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
DisableFeedRequest request =
DisableFeedRequest.newBuilder()
.setName(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.build();
Feed response = feedsServiceClient.disableFeed(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DisableFeedRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
disableFeed(String name)
public final Feed disableFeed(String name)Disable feed for ingestion. Make FeedState ARCHIVED.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String name = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString();
Feed response = feedsServiceClient.disableFeed(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the feed to disable. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
disableFeedCallable()
public final UnaryCallable<DisableFeedRequest,Feed> disableFeedCallable()Disable feed for ingestion. Make FeedState ARCHIVED.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
DisableFeedRequest request =
DisableFeedRequest.newBuilder()
.setName(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.build();
ApiFuture<Feed> future = feedsServiceClient.disableFeedCallable().futureCall(request);
// Do something.
Feed response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DisableFeedRequest,Feed> |
|
enableFeed(@Nullable FeedName name)
public final Feed enableFeed(@Nullable FeedName name)Enable feed for ingestion.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
FeedName name = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]");
Feed response = feedsServiceClient.enableFeed(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.FeedNameRequired. The name of the feed to enable. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
enableFeed(EnableFeedRequest request)
public final Feed enableFeed(EnableFeedRequest request)Enable feed for ingestion.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
EnableFeedRequest request =
EnableFeedRequest.newBuilder()
.setName(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.build();
Feed response = feedsServiceClient.enableFeed(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
EnableFeedRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
enableFeed(String name)
public final Feed enableFeed(String name)Enable feed for ingestion.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String name = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString();
Feed response = feedsServiceClient.enableFeed(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the feed to enable. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
enableFeedCallable()
public final UnaryCallable<EnableFeedRequest,Feed> enableFeedCallable()Enable feed for ingestion.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
EnableFeedRequest request =
EnableFeedRequest.newBuilder()
.setName(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.build();
ApiFuture<Feed> future = feedsServiceClient.enableFeedCallable().futureCall(request);
// Do something.
Feed response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<EnableFeedRequest,Feed> |
|
fetchServiceAccountForCustomer(@Nullable InstanceName parent)
public final FeedServiceAccount fetchServiceAccountForCustomer(@Nullable InstanceName parent)Fetch Chronicle's service account used for ingesting data from Cloud Storage buckets.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
FeedServiceAccount response = feedsServiceClient.fetchServiceAccountForCustomer(parent);
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.InstanceNameRequired. The parent resource where this FeedServiceAccount will be created. Format: projects/{project}/locations/{location}/instances/{instance} |
| Returns | |
|---|---|
| Type | Description |
FeedServiceAccount |
|
fetchServiceAccountForCustomer(FetchServiceAccountForCustomerRequest request)
public final FeedServiceAccount fetchServiceAccountForCustomer(FetchServiceAccountForCustomerRequest request)Fetch Chronicle's service account used for ingesting data from Cloud Storage buckets.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
FetchServiceAccountForCustomerRequest request =
FetchServiceAccountForCustomerRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
FeedServiceAccount response = feedsServiceClient.fetchServiceAccountForCustomer(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
FetchServiceAccountForCustomerRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FeedServiceAccount |
|
fetchServiceAccountForCustomer(String parent)
public final FeedServiceAccount fetchServiceAccountForCustomer(String parent)Fetch Chronicle's service account used for ingesting data from Cloud Storage buckets.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
FeedServiceAccount response = feedsServiceClient.fetchServiceAccountForCustomer(parent);
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this FeedServiceAccount will be created. Format: projects/{project}/locations/{location}/instances/{instance} |
| Returns | |
|---|---|
| Type | Description |
FeedServiceAccount |
|
fetchServiceAccountForCustomerCallable()
public final UnaryCallable<FetchServiceAccountForCustomerRequest,FeedServiceAccount> fetchServiceAccountForCustomerCallable()Fetch Chronicle's service account used for ingesting data from Cloud Storage buckets.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
FetchServiceAccountForCustomerRequest request =
FetchServiceAccountForCustomerRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
ApiFuture<FeedServiceAccount> future =
feedsServiceClient.fetchServiceAccountForCustomerCallable().futureCall(request);
// Do something.
FeedServiceAccount response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<FetchServiceAccountForCustomerRequest,FeedServiceAccount> |
|
generateSecret(@Nullable FeedName name)
public final GenerateSecretResponse generateSecret(@Nullable FeedName name)Generates a new secret for https push feeds which do not support jwt tokens. Secrets once generated should be copied and stored in safe place to be used while configuring https push feeds.Please note that you can always generate a new secret again for a feed using this API but it will invalidate the previously generated secret for the feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
FeedName name = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]");
GenerateSecretResponse response = feedsServiceClient.generateSecret(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.FeedNameRequired. The name of the feed to for which to generate secret. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
| Returns | |
|---|---|
| Type | Description |
GenerateSecretResponse |
|
generateSecret(GenerateSecretRequest request)
public final GenerateSecretResponse generateSecret(GenerateSecretRequest request)Generates a new secret for https push feeds which do not support jwt tokens. Secrets once generated should be copied and stored in safe place to be used while configuring https push feeds.Please note that you can always generate a new secret again for a feed using this API but it will invalidate the previously generated secret for the feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
GenerateSecretRequest request =
GenerateSecretRequest.newBuilder()
.setName(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.build();
GenerateSecretResponse response = feedsServiceClient.generateSecret(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GenerateSecretRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
GenerateSecretResponse |
|
generateSecret(String name)
public final GenerateSecretResponse generateSecret(String name)Generates a new secret for https push feeds which do not support jwt tokens. Secrets once generated should be copied and stored in safe place to be used while configuring https push feeds.Please note that you can always generate a new secret again for a feed using this API but it will invalidate the previously generated secret for the feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String name = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString();
GenerateSecretResponse response = feedsServiceClient.generateSecret(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the feed to for which to generate secret. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
| Returns | |
|---|---|
| Type | Description |
GenerateSecretResponse |
|
generateSecretCallable()
public final UnaryCallable<GenerateSecretRequest,GenerateSecretResponse> generateSecretCallable()Generates a new secret for https push feeds which do not support jwt tokens. Secrets once generated should be copied and stored in safe place to be used while configuring https push feeds.Please note that you can always generate a new secret again for a feed using this API but it will invalidate the previously generated secret for the feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
GenerateSecretRequest request =
GenerateSecretRequest.newBuilder()
.setName(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.build();
ApiFuture<GenerateSecretResponse> future =
feedsServiceClient.generateSecretCallable().futureCall(request);
// Do something.
GenerateSecretResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GenerateSecretRequest,GenerateSecretResponse> |
|
getFeed(@Nullable FeedName name)
public final Feed getFeed(@Nullable FeedName name)Gets a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
FeedName name = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]");
Feed response = feedsServiceClient.getFeed(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.FeedNameRequired. The ID of the feed to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
getFeed(GetFeedRequest request)
public final Feed getFeed(GetFeedRequest request)Gets a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
GetFeedRequest request =
GetFeedRequest.newBuilder()
.setName(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.build();
Feed response = feedsServiceClient.getFeed(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetFeedRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
getFeed(String name)
public final Feed getFeed(String name)Gets a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String name = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString();
Feed response = feedsServiceClient.getFeed(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The ID of the feed to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
getFeedCallable()
public final UnaryCallable<GetFeedRequest,Feed> getFeedCallable()Gets a feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
GetFeedRequest request =
GetFeedRequest.newBuilder()
.setName(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.build();
ApiFuture<Feed> future = feedsServiceClient.getFeedCallable().futureCall(request);
// Do something.
Feed response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetFeedRequest,Feed> |
|
getFeedPack(@Nullable FeedPackName name)
public final FeedPack getFeedPack(@Nullable FeedPackName name)Gets a feed pack.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
FeedPackName name = FeedPackName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED_PACK]");
FeedPack response = feedsServiceClient.getFeedPack(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.FeedPackNameRequired. The ID of the feed pack to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/feedPacks/{feedPack} |
| Returns | |
|---|---|
| Type | Description |
FeedPack |
|
getFeedPack(GetFeedPackRequest request)
public final FeedPack getFeedPack(GetFeedPackRequest request)Gets a feed pack.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
GetFeedPackRequest request =
GetFeedPackRequest.newBuilder()
.setName(
FeedPackName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED_PACK]")
.toString())
.build();
FeedPack response = feedsServiceClient.getFeedPack(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetFeedPackRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FeedPack |
|
getFeedPack(String name)
public final FeedPack getFeedPack(String name)Gets a feed pack.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String name =
FeedPackName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED_PACK]").toString();
FeedPack response = feedsServiceClient.getFeedPack(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The ID of the feed pack to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/feedPacks/{feedPack} |
| Returns | |
|---|---|
| Type | Description |
FeedPack |
|
getFeedPackCallable()
public final UnaryCallable<GetFeedPackRequest,FeedPack> getFeedPackCallable()Gets a feed pack.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
GetFeedPackRequest request =
GetFeedPackRequest.newBuilder()
.setName(
FeedPackName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED_PACK]")
.toString())
.build();
ApiFuture<FeedPack> future = feedsServiceClient.getFeedPackCallable().futureCall(request);
// Do something.
FeedPack response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetFeedPackRequest,FeedPack> |
|
getSettings()
public final @Nullable FeedsServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.FeedsServiceSettings |
|
getStub()
public FeedsServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
FeedsServiceStub |
|
importPushLogs(@Nullable FeedName parent)
public final HttpBody importPushLogs(@Nullable FeedName parent)Import logs coming from https push feeds. All log entries must be valid UTF-8. A single invalid event will cause the entire request to be rejected.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
FeedName parent = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]");
HttpBody response = feedsServiceClient.importPushLogs(parent);
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.FeedNameRequired. The parent, which owns this collection of logs. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
| Returns | |
|---|---|
| Type | Description |
com.google.api.HttpBody |
|
importPushLogs(ImportPushLogsRequest request)
public final HttpBody importPushLogs(ImportPushLogsRequest request)Import logs coming from https push feeds. All log entries must be valid UTF-8. A single invalid event will cause the entire request to be rejected.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ImportPushLogsRequest request =
ImportPushLogsRequest.newBuilder()
.setParent(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.setHttpBody(HttpBody.newBuilder().build())
.setSecret("secret-906277200")
.build();
HttpBody response = feedsServiceClient.importPushLogs(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
ImportPushLogsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.api.HttpBody |
|
importPushLogs(String parent)
public final HttpBody importPushLogs(String parent)Import logs coming from https push feeds. All log entries must be valid UTF-8. A single invalid event will cause the entire request to be rejected.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String parent = FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString();
HttpBody response = feedsServiceClient.importPushLogs(parent);
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of logs. Format: projects/{project}/locations/{location}/instances/{instance}/feeds/{feed} |
| Returns | |
|---|---|
| Type | Description |
com.google.api.HttpBody |
|
importPushLogsCallable()
public final UnaryCallable<ImportPushLogsRequest,HttpBody> importPushLogsCallable()Import logs coming from https push feeds. All log entries must be valid UTF-8. A single invalid event will cause the entire request to be rejected.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ImportPushLogsRequest request =
ImportPushLogsRequest.newBuilder()
.setParent(FeedName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED]").toString())
.setHttpBody(HttpBody.newBuilder().build())
.setSecret("secret-906277200")
.build();
ApiFuture<HttpBody> future = feedsServiceClient.importPushLogsCallable().futureCall(request);
// Do something.
HttpBody response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ImportPushLogsRequest,com.google.api.HttpBody> |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listFeedPacks(@Nullable InstanceName parent)
public final FeedsServiceClient.ListFeedPacksPagedResponse listFeedPacks(@Nullable InstanceName parent)Lists Packs for which feeds can be configured.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
for (FeedPack element : feedsServiceClient.listFeedPacks(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.InstanceNameRequired. The parent resource where this content pack will be created. Format: projects/{project}/locations/{location}/instances/{instance} |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListFeedPacksPagedResponse |
|
listFeedPacks(ListFeedPacksRequest request)
public final FeedsServiceClient.ListFeedPacksPagedResponse listFeedPacks(ListFeedPacksRequest request)Lists Packs for which feeds can be configured.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListFeedPacksRequest request =
ListFeedPacksRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (FeedPack element : feedsServiceClient.listFeedPacks(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListFeedPacksRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListFeedPacksPagedResponse |
|
listFeedPacks(String parent)
public final FeedsServiceClient.ListFeedPacksPagedResponse listFeedPacks(String parent)Lists Packs for which feeds can be configured.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
for (FeedPack element : feedsServiceClient.listFeedPacks(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this content pack will be created. Format: projects/{project}/locations/{location}/instances/{instance} |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListFeedPacksPagedResponse |
|
listFeedPacksCallable()
public final UnaryCallable<ListFeedPacksRequest,ListFeedPacksResponse> listFeedPacksCallable()Lists Packs for which feeds can be configured.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListFeedPacksRequest request =
ListFeedPacksRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListFeedPacksResponse response = feedsServiceClient.listFeedPacksCallable().call(request);
for (FeedPack element : response.getFeedPacksList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFeedPacksRequest,ListFeedPacksResponse> |
|
listFeedPacksPagedCallable()
public final UnaryCallable<ListFeedPacksRequest,FeedsServiceClient.ListFeedPacksPagedResponse> listFeedPacksPagedCallable()Lists Packs for which feeds can be configured.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListFeedPacksRequest request =
ListFeedPacksRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<FeedPack> future =
feedsServiceClient.listFeedPacksPagedCallable().futureCall(request);
// Do something.
for (FeedPack element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFeedPacksRequest,ListFeedPacksPagedResponse> |
|
listFeedSourceTypeSchemas(@Nullable InstanceName parent)
public final FeedsServiceClient.ListFeedSourceTypeSchemasPagedResponse listFeedSourceTypeSchemas(@Nullable InstanceName parent)List all FeedSourceTypeSchemas.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
for (FeedSourceTypeSchema element :
feedsServiceClient.listFeedSourceTypeSchemas(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.InstanceNameRequired. The parent, which owns this collection of FeedSourceTypeSchemas. Format: projects/{project}/locations/{location}/instances/{instance} |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListFeedSourceTypeSchemasPagedResponse |
|
listFeedSourceTypeSchemas(ListFeedSourceTypeSchemasRequest request)
public final FeedsServiceClient.ListFeedSourceTypeSchemasPagedResponse listFeedSourceTypeSchemas(ListFeedSourceTypeSchemasRequest request)List all FeedSourceTypeSchemas.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListFeedSourceTypeSchemasRequest request =
ListFeedSourceTypeSchemasRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (FeedSourceTypeSchema element :
feedsServiceClient.listFeedSourceTypeSchemas(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListFeedSourceTypeSchemasRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListFeedSourceTypeSchemasPagedResponse |
|
listFeedSourceTypeSchemas(String parent)
public final FeedsServiceClient.ListFeedSourceTypeSchemasPagedResponse listFeedSourceTypeSchemas(String parent)List all FeedSourceTypeSchemas.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
for (FeedSourceTypeSchema element :
feedsServiceClient.listFeedSourceTypeSchemas(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of FeedSourceTypeSchemas. Format: projects/{project}/locations/{location}/instances/{instance} |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListFeedSourceTypeSchemasPagedResponse |
|
listFeedSourceTypeSchemasCallable()
public final UnaryCallable<ListFeedSourceTypeSchemasRequest,ListFeedSourceTypeSchemasResponse> listFeedSourceTypeSchemasCallable()List all FeedSourceTypeSchemas.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListFeedSourceTypeSchemasRequest request =
ListFeedSourceTypeSchemasRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListFeedSourceTypeSchemasResponse response =
feedsServiceClient.listFeedSourceTypeSchemasCallable().call(request);
for (FeedSourceTypeSchema element : response.getFeedSourceTypeSchemasList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFeedSourceTypeSchemasRequest,ListFeedSourceTypeSchemasResponse> |
|
listFeedSourceTypeSchemasPagedCallable()
public final UnaryCallable<ListFeedSourceTypeSchemasRequest,FeedsServiceClient.ListFeedSourceTypeSchemasPagedResponse> listFeedSourceTypeSchemasPagedCallable()List all FeedSourceTypeSchemas.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListFeedSourceTypeSchemasRequest request =
ListFeedSourceTypeSchemasRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<FeedSourceTypeSchema> future =
feedsServiceClient.listFeedSourceTypeSchemasPagedCallable().futureCall(request);
// Do something.
for (FeedSourceTypeSchema element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFeedSourceTypeSchemasRequest,ListFeedSourceTypeSchemasPagedResponse> |
|
listFeeds(@Nullable InstanceName parent)
public final FeedsServiceClient.ListFeedsPagedResponse listFeeds(@Nullable InstanceName parent)Lists all feeds for the customer.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
for (Feed element : feedsServiceClient.listFeeds(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.InstanceNameRequired. The parent resource where this Feed will be created. Format: projects/{project}/locations/{location}/instances/{instance} |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListFeedsPagedResponse |
|
listFeeds(ListFeedsRequest request)
public final FeedsServiceClient.ListFeedsPagedResponse listFeeds(ListFeedsRequest request)Lists all feeds for the customer.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListFeedsRequest request =
ListFeedsRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Feed element : feedsServiceClient.listFeeds(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListFeedsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListFeedsPagedResponse |
|
listFeeds(String parent)
public final FeedsServiceClient.ListFeedsPagedResponse listFeeds(String parent)Lists all feeds for the customer.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
for (Feed element : feedsServiceClient.listFeeds(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource where this Feed will be created. Format: projects/{project}/locations/{location}/instances/{instance} |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListFeedsPagedResponse |
|
listFeedsCallable()
public final UnaryCallable<ListFeedsRequest,ListFeedsResponse> listFeedsCallable()Lists all feeds for the customer.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListFeedsRequest request =
ListFeedsRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListFeedsResponse response = feedsServiceClient.listFeedsCallable().call(request);
for (Feed element : response.getFeedsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFeedsRequest,ListFeedsResponse> |
|
listFeedsPagedCallable()
public final UnaryCallable<ListFeedsRequest,FeedsServiceClient.ListFeedsPagedResponse> listFeedsPagedCallable()Lists all feeds for the customer.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListFeedsRequest request =
ListFeedsRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Feed> future = feedsServiceClient.listFeedsPagedCallable().futureCall(request);
// Do something.
for (Feed element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFeedsRequest,ListFeedsPagedResponse> |
|
listLogTypeSchemas(@Nullable FeedSourceTypeSchemaName parent)
public final FeedsServiceClient.ListLogTypeSchemasPagedResponse listLogTypeSchemas(@Nullable FeedSourceTypeSchemaName parent)List all LogTypeSchemas compatible with a given FeedSourceType.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
FeedSourceTypeSchemaName parent =
FeedSourceTypeSchemaName.of(
"[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED_SOURCE_TYPE]");
for (LogTypeSchema element : feedsServiceClient.listLogTypeSchemas(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.chronicle.v1.FeedSourceTypeSchemaNameRequired. The parent, which owns this collection of LogTypeSchemas. Format: Format: projects/{project}/locations/{location}/instances/{instance}/feedSourceTypeSchemas/{feed_source_type} |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListLogTypeSchemasPagedResponse |
|
listLogTypeSchemas(ListLogTypeSchemasRequest request)
public final FeedsServiceClient.ListLogTypeSchemasPagedResponse listLogTypeSchemas(ListLogTypeSchemasRequest request)List all LogTypeSchemas compatible with a given FeedSourceType.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListLogTypeSchemasRequest request =
ListLogTypeSchemasRequest.newBuilder()
.setParent(
FeedSourceTypeSchemaName.of(
"[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED_SOURCE_TYPE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (LogTypeSchema element : feedsServiceClient.listLogTypeSchemas(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListLogTypeSchemasRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListLogTypeSchemasPagedResponse |
|
listLogTypeSchemas(String parent)
public final FeedsServiceClient.ListLogTypeSchemasPagedResponse listLogTypeSchemas(String parent)List all LogTypeSchemas compatible with a given FeedSourceType.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
String parent =
FeedSourceTypeSchemaName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED_SOURCE_TYPE]")
.toString();
for (LogTypeSchema element : feedsServiceClient.listLogTypeSchemas(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent, which owns this collection of LogTypeSchemas. Format: Format: projects/{project}/locations/{location}/instances/{instance}/feedSourceTypeSchemas/{feed_source_type} |
| Returns | |
|---|---|
| Type | Description |
FeedsServiceClient.ListLogTypeSchemasPagedResponse |
|
listLogTypeSchemasCallable()
public final UnaryCallable<ListLogTypeSchemasRequest,ListLogTypeSchemasResponse> listLogTypeSchemasCallable()List all LogTypeSchemas compatible with a given FeedSourceType.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListLogTypeSchemasRequest request =
ListLogTypeSchemasRequest.newBuilder()
.setParent(
FeedSourceTypeSchemaName.of(
"[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED_SOURCE_TYPE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLogTypeSchemasResponse response =
feedsServiceClient.listLogTypeSchemasCallable().call(request);
for (LogTypeSchema element : response.getLogTypeSchemasList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListLogTypeSchemasRequest,ListLogTypeSchemasResponse> |
|
listLogTypeSchemasPagedCallable()
public final UnaryCallable<ListLogTypeSchemasRequest,FeedsServiceClient.ListLogTypeSchemasPagedResponse> listLogTypeSchemasPagedCallable()List all LogTypeSchemas compatible with a given FeedSourceType.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
ListLogTypeSchemasRequest request =
ListLogTypeSchemasRequest.newBuilder()
.setParent(
FeedSourceTypeSchemaName.of(
"[PROJECT]", "[LOCATION]", "[INSTANCE]", "[FEED_SOURCE_TYPE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<LogTypeSchema> future =
feedsServiceClient.listLogTypeSchemasPagedCallable().futureCall(request);
// Do something.
for (LogTypeSchema element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListLogTypeSchemasRequest,ListLogTypeSchemasPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateFeed(Feed feed, FieldMask updateMask)
public final Feed updateFeed(Feed feed, FieldMask updateMask)Updates the full feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
Feed feed = Feed.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Feed response = feedsServiceClient.updateFeed(feed, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
feed |
FeedRequired. Feed to update. Updates full feed object. |
updateMask |
FieldMaskOptional. Specifies which fields to update. If empty, update the full feed.
To update the display name, pass only |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
updateFeed(UpdateFeedRequest request)
public final Feed updateFeed(UpdateFeedRequest request)Updates the full feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
UpdateFeedRequest request =
UpdateFeedRequest.newBuilder()
.setFeed(Feed.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Feed response = feedsServiceClient.updateFeed(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateFeedRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Feed |
|
updateFeedCallable()
public final UnaryCallable<UpdateFeedRequest,Feed> updateFeedCallable()Updates the full feed.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FeedsServiceClient feedsServiceClient = FeedsServiceClient.create()) {
UpdateFeedRequest request =
UpdateFeedRequest.newBuilder()
.setFeed(Feed.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Feed> future = feedsServiceClient.updateFeedCallable().futureCall(request);
// Do something.
Feed response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateFeedRequest,Feed> |
|