- 1.53.0 (latest)
- 1.52.0
- 1.51.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.2.4
public class EventarcClient implements BackgroundResource
Service Description: Eventarc allows users to subscribe to various events that are provided by Google Cloud services and forward them to supported destinations.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
TriggerName name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]");
Trigger response = eventarcClient.getTrigger(name);
}
Note: close() needs to be called on the EventarcClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of EventarcSettings 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
EventarcSettings eventarcSettings =
EventarcSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
EventarcClient eventarcClient = EventarcClient.create(eventarcSettings);
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
EventarcSettings eventarcSettings =
EventarcSettings.newBuilder().setEndpoint(myEndpoint).build();
EventarcClient eventarcClient = EventarcClient.create(eventarcSettings);
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
EventarcSettings eventarcSettings =
EventarcSettings.newBuilder()
.setTransportChannelProvider(
EventarcSettings.defaultHttpJsonTransportProviderBuilder().build())
.build();
EventarcClient eventarcClient = EventarcClient.create(eventarcSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final EventarcClient create()
Constructs an instance of EventarcClient with default settings.
Type | Description |
EventarcClient |
Type | Description |
IOException |
create(EventarcSettings settings)
public static final EventarcClient create(EventarcSettings settings)
Constructs an instance of EventarcClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | EventarcSettings |
Type | Description |
EventarcClient |
Type | Description |
IOException |
create(EventarcStub stub)
public static final EventarcClient create(EventarcStub stub)
Constructs an instance of EventarcClient, using the given stub for making calls. This is for advanced usage - prefer using create(EventarcSettings).
Name | Description |
stub | EventarcStub |
Type | Description |
EventarcClient |
Constructors
EventarcClient(EventarcSettings settings)
protected EventarcClient(EventarcSettings settings)
Constructs an instance of EventarcClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Name | Description |
settings | EventarcSettings |
EventarcClient(EventarcStub stub)
protected EventarcClient(EventarcStub stub)
Name | Description |
stub | EventarcStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
createChannelAsync(CreateChannelRequest request)
public final OperationFuture<Channel,OperationMetadata> createChannelAsync(CreateChannelRequest request)
Create a new channel in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelRequest request =
CreateChannelRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannel(Channel.newBuilder().build())
.setChannelId("channelId1461735806")
.setValidateOnly(true)
.build();
Channel response = eventarcClient.createChannelAsync(request).get();
}
Name | Description |
request | CreateChannelRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Channel,OperationMetadata> |
createChannelAsync(LocationName parent, Channel channel, String channelId)
public final OperationFuture<Channel,OperationMetadata> createChannelAsync(LocationName parent, Channel channel, String channelId)
Create a new channel in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Channel channel = Channel.newBuilder().build();
String channelId = "channelId1461735806";
Channel response = eventarcClient.createChannelAsync(parent, channel, channelId).get();
}
Name | Description |
parent | LocationName Required. The parent collection in which to add this channel. |
channel | Channel Required. The channel to create. |
channelId | String Required. The user-provided ID to be assigned to the channel. |
Type | Description |
OperationFuture<Channel,OperationMetadata> |
createChannelAsync(String parent, Channel channel, String channelId)
public final OperationFuture<Channel,OperationMetadata> createChannelAsync(String parent, Channel channel, String channelId)
Create a new channel in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Channel channel = Channel.newBuilder().build();
String channelId = "channelId1461735806";
Channel response = eventarcClient.createChannelAsync(parent, channel, channelId).get();
}
Name | Description |
parent | String Required. The parent collection in which to add this channel. |
channel | Channel Required. The channel to create. |
channelId | String Required. The user-provided ID to be assigned to the channel. |
Type | Description |
OperationFuture<Channel,OperationMetadata> |
createChannelCallable()
public final UnaryCallable<CreateChannelRequest,Operation> createChannelCallable()
Create a new channel in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelRequest request =
CreateChannelRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannel(Channel.newBuilder().build())
.setChannelId("channelId1461735806")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.createChannelCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateChannelRequest,Operation> |
createChannelConnectionAsync(CreateChannelConnectionRequest request)
public final OperationFuture<ChannelConnection,OperationMetadata> createChannelConnectionAsync(CreateChannelConnectionRequest request)
Create a new ChannelConnection in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelConnectionRequest request =
CreateChannelConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannelConnection(ChannelConnection.newBuilder().build())
.setChannelConnectionId("channelConnectionId-1246974660")
.build();
ChannelConnection response = eventarcClient.createChannelConnectionAsync(request).get();
}
Name | Description |
request | CreateChannelConnectionRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
createChannelConnectionAsync(LocationName parent, ChannelConnection channelConnection, String channelConnectionId)
public final OperationFuture<ChannelConnection,OperationMetadata> createChannelConnectionAsync(LocationName parent, ChannelConnection channelConnection, String channelConnectionId)
Create a new ChannelConnection in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ChannelConnection channelConnection = ChannelConnection.newBuilder().build();
String channelConnectionId = "channelConnectionId-1246974660";
ChannelConnection response =
eventarcClient
.createChannelConnectionAsync(parent, channelConnection, channelConnectionId)
.get();
}
Name | Description |
parent | LocationName Required. The parent collection in which to add this channel connection. |
channelConnection | ChannelConnection Required. Channel connection to create. |
channelConnectionId | String Required. The user-provided ID to be assigned to the channel connection. |
Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
createChannelConnectionAsync(String parent, ChannelConnection channelConnection, String channelConnectionId)
public final OperationFuture<ChannelConnection,OperationMetadata> createChannelConnectionAsync(String parent, ChannelConnection channelConnection, String channelConnectionId)
Create a new ChannelConnection in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ChannelConnection channelConnection = ChannelConnection.newBuilder().build();
String channelConnectionId = "channelConnectionId-1246974660";
ChannelConnection response =
eventarcClient
.createChannelConnectionAsync(parent, channelConnection, channelConnectionId)
.get();
}
Name | Description |
parent | String Required. The parent collection in which to add this channel connection. |
channelConnection | ChannelConnection Required. Channel connection to create. |
channelConnectionId | String Required. The user-provided ID to be assigned to the channel connection. |
Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
createChannelConnectionCallable()
public final UnaryCallable<CreateChannelConnectionRequest,Operation> createChannelConnectionCallable()
Create a new ChannelConnection in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelConnectionRequest request =
CreateChannelConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannelConnection(ChannelConnection.newBuilder().build())
.setChannelConnectionId("channelConnectionId-1246974660")
.build();
ApiFuture<Operation> future =
eventarcClient.createChannelConnectionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateChannelConnectionRequest,Operation> |
createChannelConnectionOperationCallable()
public final OperationCallable<CreateChannelConnectionRequest,ChannelConnection,OperationMetadata> createChannelConnectionOperationCallable()
Create a new ChannelConnection in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelConnectionRequest request =
CreateChannelConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannelConnection(ChannelConnection.newBuilder().build())
.setChannelConnectionId("channelConnectionId-1246974660")
.build();
OperationFuture<ChannelConnection, OperationMetadata> future =
eventarcClient.createChannelConnectionOperationCallable().futureCall(request);
// Do something.
ChannelConnection response = future.get();
}
Type | Description |
OperationCallable<CreateChannelConnectionRequest,ChannelConnection,OperationMetadata> |
createChannelOperationCallable()
public final OperationCallable<CreateChannelRequest,Channel,OperationMetadata> createChannelOperationCallable()
Create a new channel in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateChannelRequest request =
CreateChannelRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setChannel(Channel.newBuilder().build())
.setChannelId("channelId1461735806")
.setValidateOnly(true)
.build();
OperationFuture<Channel, OperationMetadata> future =
eventarcClient.createChannelOperationCallable().futureCall(request);
// Do something.
Channel response = future.get();
}
Type | Description |
OperationCallable<CreateChannelRequest,Channel,OperationMetadata> |
createTriggerAsync(CreateTriggerRequest request)
public final OperationFuture<Trigger,OperationMetadata> createTriggerAsync(CreateTriggerRequest request)
Create a new trigger in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateTriggerRequest request =
CreateTriggerRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTrigger(Trigger.newBuilder().build())
.setTriggerId("triggerId-648752909")
.setValidateOnly(true)
.build();
Trigger response = eventarcClient.createTriggerAsync(request).get();
}
Name | Description |
request | CreateTriggerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Trigger,OperationMetadata> |
createTriggerAsync(LocationName parent, Trigger trigger, String triggerId)
public final OperationFuture<Trigger,OperationMetadata> createTriggerAsync(LocationName parent, Trigger trigger, String triggerId)
Create a new trigger in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Trigger trigger = Trigger.newBuilder().build();
String triggerId = "triggerId-648752909";
Trigger response = eventarcClient.createTriggerAsync(parent, trigger, triggerId).get();
}
Name | Description |
parent | LocationName Required. The parent collection in which to add this trigger. |
trigger | Trigger Required. The trigger to create. |
triggerId | String Required. The user-provided ID to be assigned to the trigger. |
Type | Description |
OperationFuture<Trigger,OperationMetadata> |
createTriggerAsync(String parent, Trigger trigger, String triggerId)
public final OperationFuture<Trigger,OperationMetadata> createTriggerAsync(String parent, Trigger trigger, String triggerId)
Create a new trigger in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Trigger trigger = Trigger.newBuilder().build();
String triggerId = "triggerId-648752909";
Trigger response = eventarcClient.createTriggerAsync(parent, trigger, triggerId).get();
}
Name | Description |
parent | String Required. The parent collection in which to add this trigger. |
trigger | Trigger Required. The trigger to create. |
triggerId | String Required. The user-provided ID to be assigned to the trigger. |
Type | Description |
OperationFuture<Trigger,OperationMetadata> |
createTriggerCallable()
public final UnaryCallable<CreateTriggerRequest,Operation> createTriggerCallable()
Create a new trigger in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateTriggerRequest request =
CreateTriggerRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTrigger(Trigger.newBuilder().build())
.setTriggerId("triggerId-648752909")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.createTriggerCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateTriggerRequest,Operation> |
createTriggerOperationCallable()
public final OperationCallable<CreateTriggerRequest,Trigger,OperationMetadata> createTriggerOperationCallable()
Create a new trigger in a particular project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EventarcClient eventarcClient = EventarcClient.create()) {
CreateTriggerRequest request =
CreateTriggerRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTrigger(Trigger.newBuilder().build())
.setTriggerId("triggerId-648752909")
.setValidateOnly(true)
.build();
OperationFuture<Trigger, OperationMetadata> future =
eventarcClient.createTriggerOperationCallable().futureCall(request);
// Do something.
Trigger response = future.get();
}
Type | Description |
OperationCallable<CreateTriggerRequest,Trigger,OperationMetadata> |
deleteChannelAsync(ChannelName name)
public final OperationFuture<Channel,OperationMetadata> deleteChannelAsync(ChannelName name)
Delete a single channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
Channel response = eventarcClient.deleteChannelAsync(name).get();
}
Name | Description |
name | ChannelName Required. The name of the channel to be deleted. |
Type | Description |
OperationFuture<Channel,OperationMetadata> |
deleteChannelAsync(DeleteChannelRequest request)
public final OperationFuture<Channel,OperationMetadata> deleteChannelAsync(DeleteChannelRequest request)
Delete a single channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelRequest request =
DeleteChannelRequest.newBuilder()
.setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.setValidateOnly(true)
.build();
Channel response = eventarcClient.deleteChannelAsync(request).get();
}
Name | Description |
request | DeleteChannelRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Channel,OperationMetadata> |
deleteChannelAsync(String name)
public final OperationFuture<Channel,OperationMetadata> deleteChannelAsync(String name)
Delete a single channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
Channel response = eventarcClient.deleteChannelAsync(name).get();
}
Name | Description |
name | String Required. The name of the channel to be deleted. |
Type | Description |
OperationFuture<Channel,OperationMetadata> |
deleteChannelCallable()
public final UnaryCallable<DeleteChannelRequest,Operation> deleteChannelCallable()
Delete a single channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelRequest request =
DeleteChannelRequest.newBuilder()
.setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.deleteChannelCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<DeleteChannelRequest,Operation> |
deleteChannelConnectionAsync(ChannelConnectionName name)
public final OperationFuture<ChannelConnection,OperationMetadata> deleteChannelConnectionAsync(ChannelConnectionName name)
Delete a single ChannelConnection.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ChannelConnectionName name =
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]");
ChannelConnection response = eventarcClient.deleteChannelConnectionAsync(name).get();
}
Name | Description |
name | ChannelConnectionName Required. The name of the channel connection to delete. |
Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
deleteChannelConnectionAsync(DeleteChannelConnectionRequest request)
public final OperationFuture<ChannelConnection,OperationMetadata> deleteChannelConnectionAsync(DeleteChannelConnectionRequest request)
Delete a single ChannelConnection.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelConnectionRequest request =
DeleteChannelConnectionRequest.newBuilder()
.setName(
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
.toString())
.build();
ChannelConnection response = eventarcClient.deleteChannelConnectionAsync(request).get();
}
Name | Description |
request | DeleteChannelConnectionRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
deleteChannelConnectionAsync(String name)
public final OperationFuture<ChannelConnection,OperationMetadata> deleteChannelConnectionAsync(String name)
Delete a single ChannelConnection.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String name =
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]").toString();
ChannelConnection response = eventarcClient.deleteChannelConnectionAsync(name).get();
}
Name | Description |
name | String Required. The name of the channel connection to delete. |
Type | Description |
OperationFuture<ChannelConnection,OperationMetadata> |
deleteChannelConnectionCallable()
public final UnaryCallable<DeleteChannelConnectionRequest,Operation> deleteChannelConnectionCallable()
Delete a single ChannelConnection.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelConnectionRequest request =
DeleteChannelConnectionRequest.newBuilder()
.setName(
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
.toString())
.build();
ApiFuture<Operation> future =
eventarcClient.deleteChannelConnectionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<DeleteChannelConnectionRequest,Operation> |
deleteChannelConnectionOperationCallable()
public final OperationCallable<DeleteChannelConnectionRequest,ChannelConnection,OperationMetadata> deleteChannelConnectionOperationCallable()
Delete a single ChannelConnection.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelConnectionRequest request =
DeleteChannelConnectionRequest.newBuilder()
.setName(
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
.toString())
.build();
OperationFuture<ChannelConnection, OperationMetadata> future =
eventarcClient.deleteChannelConnectionOperationCallable().futureCall(request);
// Do something.
ChannelConnection response = future.get();
}
Type | Description |
OperationCallable<DeleteChannelConnectionRequest,ChannelConnection,OperationMetadata> |
deleteChannelOperationCallable()
public final OperationCallable<DeleteChannelRequest,Channel,OperationMetadata> deleteChannelOperationCallable()
Delete a single channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteChannelRequest request =
DeleteChannelRequest.newBuilder()
.setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.setValidateOnly(true)
.build();
OperationFuture<Channel, OperationMetadata> future =
eventarcClient.deleteChannelOperationCallable().futureCall(request);
// Do something.
Channel response = future.get();
}
Type | Description |
OperationCallable<DeleteChannelRequest,Channel,OperationMetadata> |
deleteTriggerAsync(DeleteTriggerRequest request)
public final OperationFuture<Trigger,OperationMetadata> deleteTriggerAsync(DeleteTriggerRequest request)
Delete a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteTriggerRequest request =
DeleteTriggerRequest.newBuilder()
.setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
.setEtag("etag3123477")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
Trigger response = eventarcClient.deleteTriggerAsync(request).get();
}
Name | Description |
request | DeleteTriggerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Trigger,OperationMetadata> |
deleteTriggerAsync(TriggerName name, boolean allowMissing)
public final OperationFuture<Trigger,OperationMetadata> deleteTriggerAsync(TriggerName name, boolean allowMissing)
Delete a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
TriggerName name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]");
boolean allowMissing = true;
Trigger response = eventarcClient.deleteTriggerAsync(name, allowMissing).get();
}
Name | Description |
name | TriggerName Required. The name of the trigger to be deleted. |
allowMissing | boolean If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server. |
Type | Description |
OperationFuture<Trigger,OperationMetadata> |
deleteTriggerAsync(String name, boolean allowMissing)
public final OperationFuture<Trigger,OperationMetadata> deleteTriggerAsync(String name, boolean allowMissing)
Delete a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString();
boolean allowMissing = true;
Trigger response = eventarcClient.deleteTriggerAsync(name, allowMissing).get();
}
Name | Description |
name | String Required. The name of the trigger to be deleted. |
allowMissing | boolean If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server. |
Type | Description |
OperationFuture<Trigger,OperationMetadata> |
deleteTriggerCallable()
public final UnaryCallable<DeleteTriggerRequest,Operation> deleteTriggerCallable()
Delete a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteTriggerRequest request =
DeleteTriggerRequest.newBuilder()
.setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
.setEtag("etag3123477")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.deleteTriggerCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<DeleteTriggerRequest,Operation> |
deleteTriggerOperationCallable()
public final OperationCallable<DeleteTriggerRequest,Trigger,OperationMetadata> deleteTriggerOperationCallable()
Delete a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
DeleteTriggerRequest request =
DeleteTriggerRequest.newBuilder()
.setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
.setEtag("etag3123477")
.setAllowMissing(true)
.setValidateOnly(true)
.build();
OperationFuture<Trigger, OperationMetadata> future =
eventarcClient.deleteTriggerOperationCallable().futureCall(request);
// Do something.
Trigger response = future.get();
}
Type | Description |
OperationCallable<DeleteTriggerRequest,Trigger,OperationMetadata> |
getChannel(ChannelName name)
public final Channel getChannel(ChannelName name)
Get a single Channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
Channel response = eventarcClient.getChannel(name);
}
Name | Description |
name | ChannelName Required. The name of the channel to get. |
Type | Description |
Channel |
getChannel(GetChannelRequest request)
public final Channel getChannel(GetChannelRequest request)
Get a single Channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
GetChannelRequest request =
GetChannelRequest.newBuilder()
.setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.build();
Channel response = eventarcClient.getChannel(request);
}
Name | Description |
request | GetChannelRequest The request object containing all of the parameters for the API call. |
Type | Description |
Channel |
getChannel(String name)
public final Channel getChannel(String name)
Get a single Channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
Channel response = eventarcClient.getChannel(name);
}
Name | Description |
name | String Required. The name of the channel to get. |
Type | Description |
Channel |
getChannelCallable()
public final UnaryCallable<GetChannelRequest,Channel> getChannelCallable()
Get a single Channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
GetChannelRequest request =
GetChannelRequest.newBuilder()
.setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
.build();
ApiFuture<Channel> future = eventarcClient.getChannelCallable().futureCall(request);
// Do something.
Channel response = future.get();
}
Type | Description |
UnaryCallable<GetChannelRequest,Channel> |
getChannelConnection(ChannelConnectionName name)
public final ChannelConnection getChannelConnection(ChannelConnectionName name)
Get a single ChannelConnection.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ChannelConnectionName name =
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]");
ChannelConnection response = eventarcClient.getChannelConnection(name);
}
Name | Description |
name | ChannelConnectionName Required. The name of the channel connection to get. |
Type | Description |
ChannelConnection |
getChannelConnection(GetChannelConnectionRequest request)
public final ChannelConnection getChannelConnection(GetChannelConnectionRequest request)
Get a single ChannelConnection.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
GetChannelConnectionRequest request =
GetChannelConnectionRequest.newBuilder()
.setName(
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
.toString())
.build();
ChannelConnection response = eventarcClient.getChannelConnection(request);
}
Name | Description |
request | GetChannelConnectionRequest The request object containing all of the parameters for the API call. |
Type | Description |
ChannelConnection |
getChannelConnection(String name)
public final ChannelConnection getChannelConnection(String name)
Get a single ChannelConnection.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String name =
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]").toString();
ChannelConnection response = eventarcClient.getChannelConnection(name);
}
Name | Description |
name | String Required. The name of the channel connection to get. |
Type | Description |
ChannelConnection |
getChannelConnectionCallable()
public final UnaryCallable<GetChannelConnectionRequest,ChannelConnection> getChannelConnectionCallable()
Get a single ChannelConnection.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
GetChannelConnectionRequest request =
GetChannelConnectionRequest.newBuilder()
.setName(
ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
.toString())
.build();
ApiFuture<ChannelConnection> future =
eventarcClient.getChannelConnectionCallable().futureCall(request);
// Do something.
ChannelConnection response = future.get();
}
Type | Description |
UnaryCallable<GetChannelConnectionRequest,ChannelConnection> |
getHttpJsonOperationsClient()
public final OperationsClient getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Type | Description |
OperationsClient |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Type | Description |
OperationsClient |
getProvider(GetProviderRequest request)
public final Provider getProvider(GetProviderRequest request)
Get a single Provider.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
GetProviderRequest request =
GetProviderRequest.newBuilder()
.setName(ProviderName.of("[PROJECT]", "[LOCATION]", "[PROVIDER]").toString())
.build();
Provider response = eventarcClient.getProvider(request);
}
Name | Description |
request | GetProviderRequest The request object containing all of the parameters for the API call. |
Type | Description |
Provider |
getProvider(ProviderName name)
public final Provider getProvider(ProviderName name)
Get a single Provider.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ProviderName name = ProviderName.of("[PROJECT]", "[LOCATION]", "[PROVIDER]");
Provider response = eventarcClient.getProvider(name);
}
Name | Description |
name | ProviderName Required. The name of the provider to get. |
Type | Description |
Provider |
getProvider(String name)
public final Provider getProvider(String name)
Get a single Provider.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String name = ProviderName.of("[PROJECT]", "[LOCATION]", "[PROVIDER]").toString();
Provider response = eventarcClient.getProvider(name);
}
Name | Description |
name | String Required. The name of the provider to get. |
Type | Description |
Provider |
getProviderCallable()
public final UnaryCallable<GetProviderRequest,Provider> getProviderCallable()
Get a single Provider.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
GetProviderRequest request =
GetProviderRequest.newBuilder()
.setName(ProviderName.of("[PROJECT]", "[LOCATION]", "[PROVIDER]").toString())
.build();
ApiFuture<Provider> future = eventarcClient.getProviderCallable().futureCall(request);
// Do something.
Provider response = future.get();
}
Type | Description |
UnaryCallable<GetProviderRequest,Provider> |
getSettings()
public final EventarcSettings getSettings()
Type | Description |
EventarcSettings |
getStub()
public EventarcStub getStub()
Type | Description |
EventarcStub |
getTrigger(GetTriggerRequest request)
public final Trigger getTrigger(GetTriggerRequest request)
Get a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
GetTriggerRequest request =
GetTriggerRequest.newBuilder()
.setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
.build();
Trigger response = eventarcClient.getTrigger(request);
}
Name | Description |
request | GetTriggerRequest The request object containing all of the parameters for the API call. |
Type | Description |
Trigger |
getTrigger(TriggerName name)
public final Trigger getTrigger(TriggerName name)
Get a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
TriggerName name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]");
Trigger response = eventarcClient.getTrigger(name);
}
Name | Description |
name | TriggerName Required. The name of the trigger to get. |
Type | Description |
Trigger |
getTrigger(String name)
public final Trigger getTrigger(String name)
Get a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString();
Trigger response = eventarcClient.getTrigger(name);
}
Name | Description |
name | String Required. The name of the trigger to get. |
Type | Description |
Trigger |
getTriggerCallable()
public final UnaryCallable<GetTriggerRequest,Trigger> getTriggerCallable()
Get a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
GetTriggerRequest request =
GetTriggerRequest.newBuilder()
.setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
.build();
ApiFuture<Trigger> future = eventarcClient.getTriggerCallable().futureCall(request);
// Do something.
Trigger response = future.get();
}
Type | Description |
UnaryCallable<GetTriggerRequest,Trigger> |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listChannelConnections(ListChannelConnectionsRequest request)
public final EventarcClient.ListChannelConnectionsPagedResponse listChannelConnections(ListChannelConnectionsRequest request)
List channel connections.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelConnectionsRequest request =
ListChannelConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (ChannelConnection element :
eventarcClient.listChannelConnections(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListChannelConnectionsRequest The request object containing all of the parameters for the API call. |
Type | Description |
EventarcClient.ListChannelConnectionsPagedResponse |
listChannelConnections(LocationName parent)
public final EventarcClient.ListChannelConnectionsPagedResponse listChannelConnections(LocationName parent)
List channel connections.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (ChannelConnection element : eventarcClient.listChannelConnections(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The parent collection from which to list channel connections. |
Type | Description |
EventarcClient.ListChannelConnectionsPagedResponse |
listChannelConnections(String parent)
public final EventarcClient.ListChannelConnectionsPagedResponse listChannelConnections(String parent)
List channel connections.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (ChannelConnection element : eventarcClient.listChannelConnections(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The parent collection from which to list channel connections. |
Type | Description |
EventarcClient.ListChannelConnectionsPagedResponse |
listChannelConnectionsCallable()
public final UnaryCallable<ListChannelConnectionsRequest,ListChannelConnectionsResponse> listChannelConnectionsCallable()
List channel connections.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelConnectionsRequest request =
ListChannelConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListChannelConnectionsResponse response =
eventarcClient.listChannelConnectionsCallable().call(request);
for (ChannelConnection element : response.getChannelConnectionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListChannelConnectionsRequest,ListChannelConnectionsResponse> |
listChannelConnectionsPagedCallable()
public final UnaryCallable<ListChannelConnectionsRequest,EventarcClient.ListChannelConnectionsPagedResponse> listChannelConnectionsPagedCallable()
List channel connections.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelConnectionsRequest request =
ListChannelConnectionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<ChannelConnection> future =
eventarcClient.listChannelConnectionsPagedCallable().futureCall(request);
// Do something.
for (ChannelConnection element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListChannelConnectionsRequest,ListChannelConnectionsPagedResponse> |
listChannels(ListChannelsRequest request)
public final EventarcClient.ListChannelsPagedResponse listChannels(ListChannelsRequest request)
List channels.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelsRequest request =
ListChannelsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
for (Channel element : eventarcClient.listChannels(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListChannelsRequest The request object containing all of the parameters for the API call. |
Type | Description |
EventarcClient.ListChannelsPagedResponse |
listChannels(LocationName parent)
public final EventarcClient.ListChannelsPagedResponse listChannels(LocationName parent)
List channels.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Channel element : eventarcClient.listChannels(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The parent collection to list channels on. |
Type | Description |
EventarcClient.ListChannelsPagedResponse |
listChannels(String parent)
public final EventarcClient.ListChannelsPagedResponse listChannels(String parent)
List channels.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Channel element : eventarcClient.listChannels(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The parent collection to list channels on. |
Type | Description |
EventarcClient.ListChannelsPagedResponse |
listChannelsCallable()
public final UnaryCallable<ListChannelsRequest,ListChannelsResponse> listChannelsCallable()
List channels.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelsRequest request =
ListChannelsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListChannelsResponse response = eventarcClient.listChannelsCallable().call(request);
for (Channel element : response.getChannelsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListChannelsRequest,ListChannelsResponse> |
listChannelsPagedCallable()
public final UnaryCallable<ListChannelsRequest,EventarcClient.ListChannelsPagedResponse> listChannelsPagedCallable()
List channels.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListChannelsRequest request =
ListChannelsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Channel> future = eventarcClient.listChannelsPagedCallable().futureCall(request);
// Do something.
for (Channel element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListChannelsRequest,ListChannelsPagedResponse> |
listProviders(ListProvidersRequest request)
public final EventarcClient.ListProvidersPagedResponse listProviders(ListProvidersRequest request)
List providers.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListProvidersRequest request =
ListProvidersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
for (Provider element : eventarcClient.listProviders(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListProvidersRequest The request object containing all of the parameters for the API call. |
Type | Description |
EventarcClient.ListProvidersPagedResponse |
listProviders(LocationName parent)
public final EventarcClient.ListProvidersPagedResponse listProviders(LocationName parent)
List providers.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Provider element : eventarcClient.listProviders(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The parent of the provider to get. |
Type | Description |
EventarcClient.ListProvidersPagedResponse |
listProviders(String parent)
public final EventarcClient.ListProvidersPagedResponse listProviders(String parent)
List providers.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Provider element : eventarcClient.listProviders(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The parent of the provider to get. |
Type | Description |
EventarcClient.ListProvidersPagedResponse |
listProvidersCallable()
public final UnaryCallable<ListProvidersRequest,ListProvidersResponse> listProvidersCallable()
List providers.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListProvidersRequest request =
ListProvidersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
while (true) {
ListProvidersResponse response = eventarcClient.listProvidersCallable().call(request);
for (Provider element : response.getProvidersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListProvidersRequest,ListProvidersResponse> |
listProvidersPagedCallable()
public final UnaryCallable<ListProvidersRequest,EventarcClient.ListProvidersPagedResponse> listProvidersPagedCallable()
List providers.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListProvidersRequest request =
ListProvidersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
ApiFuture<Provider> future = eventarcClient.listProvidersPagedCallable().futureCall(request);
// Do something.
for (Provider element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListProvidersRequest,ListProvidersPagedResponse> |
listTriggers(ListTriggersRequest request)
public final EventarcClient.ListTriggersPagedResponse listTriggers(ListTriggersRequest request)
List triggers.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListTriggersRequest request =
ListTriggersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
for (Trigger element : eventarcClient.listTriggers(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListTriggersRequest The request object containing all of the parameters for the API call. |
Type | Description |
EventarcClient.ListTriggersPagedResponse |
listTriggers(LocationName parent)
public final EventarcClient.ListTriggersPagedResponse listTriggers(LocationName parent)
List triggers.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Trigger element : eventarcClient.listTriggers(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The parent collection to list triggers on. |
Type | Description |
EventarcClient.ListTriggersPagedResponse |
listTriggers(String parent)
public final EventarcClient.ListTriggersPagedResponse listTriggers(String parent)
List triggers.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Trigger element : eventarcClient.listTriggers(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The parent collection to list triggers on. |
Type | Description |
EventarcClient.ListTriggersPagedResponse |
listTriggersCallable()
public final UnaryCallable<ListTriggersRequest,ListTriggersResponse> listTriggersCallable()
List triggers.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListTriggersRequest request =
ListTriggersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListTriggersResponse response = eventarcClient.listTriggersCallable().call(request);
for (Trigger element : response.getTriggersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListTriggersRequest,ListTriggersResponse> |
listTriggersPagedCallable()
public final UnaryCallable<ListTriggersRequest,EventarcClient.ListTriggersPagedResponse> listTriggersPagedCallable()
List triggers.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
ListTriggersRequest request =
ListTriggersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Trigger> future = eventarcClient.listTriggersPagedCallable().futureCall(request);
// Do something.
for (Trigger element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListTriggersRequest,ListTriggersPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateChannelAsync(Channel channel, FieldMask updateMask)
public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(Channel channel, FieldMask updateMask)
Update a single channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
Channel channel = Channel.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Channel response = eventarcClient.updateChannelAsync(channel, updateMask).get();
}
Name | Description |
channel | Channel The channel to be updated. |
updateMask | FieldMask The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*". |
Type | Description |
OperationFuture<Channel,OperationMetadata> |
updateChannelAsync(UpdateChannelRequest request)
public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(UpdateChannelRequest request)
Update a single channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateChannelRequest request =
UpdateChannelRequest.newBuilder()
.setChannel(Channel.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
Channel response = eventarcClient.updateChannelAsync(request).get();
}
Name | Description |
request | UpdateChannelRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Channel,OperationMetadata> |
updateChannelCallable()
public final UnaryCallable<UpdateChannelRequest,Operation> updateChannelCallable()
Update a single channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateChannelRequest request =
UpdateChannelRequest.newBuilder()
.setChannel(Channel.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.updateChannelCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateChannelRequest,Operation> |
updateChannelOperationCallable()
public final OperationCallable<UpdateChannelRequest,Channel,OperationMetadata> updateChannelOperationCallable()
Update a single channel.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateChannelRequest request =
UpdateChannelRequest.newBuilder()
.setChannel(Channel.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<Channel, OperationMetadata> future =
eventarcClient.updateChannelOperationCallable().futureCall(request);
// Do something.
Channel response = future.get();
}
Type | Description |
OperationCallable<UpdateChannelRequest,Channel,OperationMetadata> |
updateTriggerAsync(Trigger trigger, FieldMask updateMask, boolean allowMissing)
public final OperationFuture<Trigger,OperationMetadata> updateTriggerAsync(Trigger trigger, FieldMask updateMask, boolean allowMissing)
Update a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
Trigger trigger = Trigger.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
boolean allowMissing = true;
Trigger response = eventarcClient.updateTriggerAsync(trigger, updateMask, allowMissing).get();
}
Name | Description |
trigger | Trigger The trigger to be updated. |
updateMask | FieldMask The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*". |
allowMissing | boolean If set to true, and the trigger is not found, a new trigger will be
created. In this situation, |
Type | Description |
OperationFuture<Trigger,OperationMetadata> |
updateTriggerAsync(UpdateTriggerRequest request)
public final OperationFuture<Trigger,OperationMetadata> updateTriggerAsync(UpdateTriggerRequest request)
Update a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateTriggerRequest request =
UpdateTriggerRequest.newBuilder()
.setTrigger(Trigger.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setAllowMissing(true)
.setValidateOnly(true)
.build();
Trigger response = eventarcClient.updateTriggerAsync(request).get();
}
Name | Description |
request | UpdateTriggerRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Trigger,OperationMetadata> |
updateTriggerCallable()
public final UnaryCallable<UpdateTriggerRequest,Operation> updateTriggerCallable()
Update a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateTriggerRequest request =
UpdateTriggerRequest.newBuilder()
.setTrigger(Trigger.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setAllowMissing(true)
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = eventarcClient.updateTriggerCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateTriggerRequest,Operation> |
updateTriggerOperationCallable()
public final OperationCallable<UpdateTriggerRequest,Trigger,OperationMetadata> updateTriggerOperationCallable()
Update a single trigger.
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 (EventarcClient eventarcClient = EventarcClient.create()) {
UpdateTriggerRequest request =
UpdateTriggerRequest.newBuilder()
.setTrigger(Trigger.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setAllowMissing(true)
.setValidateOnly(true)
.build();
OperationFuture<Trigger, OperationMetadata> future =
eventarcClient.updateTriggerOperationCallable().futureCall(request);
// Do something.
Trigger response = future.get();
}
Type | Description |
OperationCallable<UpdateTriggerRequest,Trigger,OperationMetadata> |