Class EventarcClient (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:


 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:

  1. 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.
  2. 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.
  3. 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:


 EventarcSettings eventarcSettings =
     EventarcSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 EventarcClient eventarcClient = EventarcClient.create(eventarcSettings);
 

To customize the endpoint:


 EventarcSettings eventarcSettings =
     EventarcSettings.newBuilder().setEndpoint(myEndpoint).build();
 EventarcClient eventarcClient = EventarcClient.create(eventarcSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > EventarcClient

Implements

BackgroundResource

Static Methods

create()

public static final EventarcClient create()

Constructs an instance of EventarcClient with default settings.

Returns
TypeDescription
EventarcClient
Exceptions
TypeDescription
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.

Parameter
NameDescription
settingsEventarcSettings
Returns
TypeDescription
EventarcClient
Exceptions
TypeDescription
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).

Parameter
NameDescription
stubEventarcStub
Returns
TypeDescription
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.

Parameter
NameDescription
settingsEventarcSettings

EventarcClient(EventarcStub stub)

protected EventarcClient(EventarcStub stub)
Parameter
NameDescription
stubEventarcStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
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:


 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();
 }
 
Parameter
NameDescription
requestCreateChannelRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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:


 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();
 }
 
Parameters
NameDescription
parentLocationName

Required. The parent collection in which to add this channel.

channelChannel

Required. The channel to create.

channelIdString

Required. The user-provided ID to be assigned to the channel.

Returns
TypeDescription
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:


 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();
 }
 
Parameters
NameDescription
parentString

Required. The parent collection in which to add this channel.

channelChannel

Required. The channel to create.

channelIdString

Required. The user-provided ID to be assigned to the channel.

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

createChannelCallable()

public final UnaryCallable<CreateChannelRequest,Operation> createChannelCallable()

Create a new channel in a particular project and location.

Sample code:


 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();
 }
 
Returns
TypeDescription
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:


 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();
 }
 
Parameter
NameDescription
requestCreateChannelConnectionRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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:


 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();
 }
 
Parameters
NameDescription
parentLocationName

Required. The parent collection in which to add this channel connection.

channelConnectionChannelConnection

Required. Channel connection to create.

channelConnectionIdString

Required. The user-provided ID to be assigned to the channel connection.

Returns
TypeDescription
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:


 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();
 }
 
Parameters
NameDescription
parentString

Required. The parent collection in which to add this channel connection.

channelConnectionChannelConnection

Required. Channel connection to create.

channelConnectionIdString

Required. The user-provided ID to be assigned to the channel connection.

Returns
TypeDescription
OperationFuture<ChannelConnection,OperationMetadata>

createChannelConnectionCallable()

public final UnaryCallable<CreateChannelConnectionRequest,Operation> createChannelConnectionCallable()

Create a new ChannelConnection in a particular project and location.

Sample code:


 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();
 }
 
Returns
TypeDescription
UnaryCallable<CreateChannelConnectionRequest,Operation>

createChannelConnectionOperationCallable()

public final OperationCallable<CreateChannelConnectionRequest,ChannelConnection,OperationMetadata> createChannelConnectionOperationCallable()

Create a new ChannelConnection in a particular project and location.

Sample code:


 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();
 }
 
Returns
TypeDescription
OperationCallable<CreateChannelConnectionRequest,ChannelConnection,OperationMetadata>

createChannelOperationCallable()

public final OperationCallable<CreateChannelRequest,Channel,OperationMetadata> createChannelOperationCallable()

Create a new channel in a particular project and location.

Sample code:


 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();
 }
 
Returns
TypeDescription
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:


 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();
 }
 
Parameter
NameDescription
requestCreateTriggerRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
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:


 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();
 }
 
Parameters
NameDescription
parentLocationName

Required. The parent collection in which to add this trigger.

triggerTrigger

Required. The trigger to create.

triggerIdString

Required. The user-provided ID to be assigned to the trigger.

Returns
TypeDescription
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:


 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();
 }
 
Parameters
NameDescription
parentString

Required. The parent collection in which to add this trigger.

triggerTrigger

Required. The trigger to create.

triggerIdString

Required. The user-provided ID to be assigned to the trigger.

Returns
TypeDescription
OperationFuture<Trigger,OperationMetadata>

createTriggerCallable()

public final UnaryCallable<CreateTriggerRequest,Operation> createTriggerCallable()

Create a new trigger in a particular project and location.

Sample code:


 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();
 }
 
Returns
TypeDescription
UnaryCallable<CreateTriggerRequest,Operation>

createTriggerOperationCallable()

public final OperationCallable<CreateTriggerRequest,Trigger,OperationMetadata> createTriggerOperationCallable()

Create a new trigger in a particular project and location.

Sample code:


 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();
 }
 
Returns
TypeDescription
OperationCallable<CreateTriggerRequest,Trigger,OperationMetadata>

deleteChannelAsync(ChannelName name)

public final OperationFuture<Channel,OperationMetadata> deleteChannelAsync(ChannelName name)

Delete a single channel.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
   Channel response = eventarcClient.deleteChannelAsync(name).get();
 }
 
Parameter
NameDescription
nameChannelName

Required. The name of the channel to be deleted.

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

deleteChannelAsync(DeleteChannelRequest request)

public final OperationFuture<Channel,OperationMetadata> deleteChannelAsync(DeleteChannelRequest request)

Delete a single channel.

Sample code:


 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();
 }
 
Parameter
NameDescription
requestDeleteChannelRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

deleteChannelAsync(String name)

public final OperationFuture<Channel,OperationMetadata> deleteChannelAsync(String name)

Delete a single channel.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
   Channel response = eventarcClient.deleteChannelAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The name of the channel to be deleted.

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

deleteChannelCallable()

public final UnaryCallable<DeleteChannelRequest,Operation> deleteChannelCallable()

Delete a single channel.

Sample code:


 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();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteChannelRequest,Operation>

deleteChannelConnectionAsync(ChannelConnectionName name)

public final OperationFuture<ChannelConnection,OperationMetadata> deleteChannelConnectionAsync(ChannelConnectionName name)

Delete a single ChannelConnection.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   ChannelConnectionName name =
       ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]");
   ChannelConnection response = eventarcClient.deleteChannelConnectionAsync(name).get();
 }
 
Parameter
NameDescription
nameChannelConnectionName

Required. The name of the channel connection to delete.

Returns
TypeDescription
OperationFuture<ChannelConnection,OperationMetadata>

deleteChannelConnectionAsync(DeleteChannelConnectionRequest request)

public final OperationFuture<ChannelConnection,OperationMetadata> deleteChannelConnectionAsync(DeleteChannelConnectionRequest request)

Delete a single ChannelConnection.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   DeleteChannelConnectionRequest request =
       DeleteChannelConnectionRequest.newBuilder()
           .setName(
               ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
                   .toString())
           .build();
   ChannelConnection response = eventarcClient.deleteChannelConnectionAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteChannelConnectionRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<ChannelConnection,OperationMetadata>

deleteChannelConnectionAsync(String name)

public final OperationFuture<ChannelConnection,OperationMetadata> deleteChannelConnectionAsync(String name)

Delete a single ChannelConnection.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   String name =
       ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]").toString();
   ChannelConnection response = eventarcClient.deleteChannelConnectionAsync(name).get();
 }
 
Parameter
NameDescription
nameString

Required. The name of the channel connection to delete.

Returns
TypeDescription
OperationFuture<ChannelConnection,OperationMetadata>

deleteChannelConnectionCallable()

public final UnaryCallable<DeleteChannelConnectionRequest,Operation> deleteChannelConnectionCallable()

Delete a single ChannelConnection.

Sample code:


 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();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteChannelConnectionRequest,Operation>

deleteChannelConnectionOperationCallable()

public final OperationCallable<DeleteChannelConnectionRequest,ChannelConnection,OperationMetadata> deleteChannelConnectionOperationCallable()

Delete a single ChannelConnection.

Sample code:


 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();
 }
 
Returns
TypeDescription
OperationCallable<DeleteChannelConnectionRequest,ChannelConnection,OperationMetadata>

deleteChannelOperationCallable()

public final OperationCallable<DeleteChannelRequest,Channel,OperationMetadata> deleteChannelOperationCallable()

Delete a single channel.

Sample code:


 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();
 }
 
Returns
TypeDescription
OperationCallable<DeleteChannelRequest,Channel,OperationMetadata>

deleteTriggerAsync(DeleteTriggerRequest request)

public final OperationFuture<Trigger,OperationMetadata> deleteTriggerAsync(DeleteTriggerRequest request)

Delete a single trigger.

Sample code:


 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();
 }
 
Parameter
NameDescription
requestDeleteTriggerRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Trigger,OperationMetadata>

deleteTriggerAsync(TriggerName name, boolean allowMissing)

public final OperationFuture<Trigger,OperationMetadata> deleteTriggerAsync(TriggerName name, boolean allowMissing)

Delete a single trigger.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   TriggerName name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]");
   boolean allowMissing = true;
   Trigger response = eventarcClient.deleteTriggerAsync(name, allowMissing).get();
 }
 
Parameters
NameDescription
nameTriggerName

Required. The name of the trigger to be deleted.

allowMissingboolean

If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.

Returns
TypeDescription
OperationFuture<Trigger,OperationMetadata>

deleteTriggerAsync(String name, boolean allowMissing)

public final OperationFuture<Trigger,OperationMetadata> deleteTriggerAsync(String name, boolean allowMissing)

Delete a single trigger.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   String name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString();
   boolean allowMissing = true;
   Trigger response = eventarcClient.deleteTriggerAsync(name, allowMissing).get();
 }
 
Parameters
NameDescription
nameString

Required. The name of the trigger to be deleted.

allowMissingboolean

If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.

Returns
TypeDescription
OperationFuture<Trigger,OperationMetadata>

deleteTriggerCallable()

public final UnaryCallable<DeleteTriggerRequest,Operation> deleteTriggerCallable()

Delete a single trigger.

Sample code:


 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();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteTriggerRequest,Operation>

deleteTriggerOperationCallable()

public final OperationCallable<DeleteTriggerRequest,Trigger,OperationMetadata> deleteTriggerOperationCallable()

Delete a single trigger.

Sample code:


 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();
 }
 
Returns
TypeDescription
OperationCallable<DeleteTriggerRequest,Trigger,OperationMetadata>

getChannel(ChannelName name)

public final Channel getChannel(ChannelName name)

Get a single Channel.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   ChannelName name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]");
   Channel response = eventarcClient.getChannel(name);
 }
 
Parameter
NameDescription
nameChannelName

Required. The name of the channel to get.

Returns
TypeDescription
Channel

getChannel(GetChannelRequest request)

public final Channel getChannel(GetChannelRequest request)

Get a single Channel.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   GetChannelRequest request =
       GetChannelRequest.newBuilder()
           .setName(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
           .build();
   Channel response = eventarcClient.getChannel(request);
 }
 
Parameter
NameDescription
requestGetChannelRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Channel

getChannel(String name)

public final Channel getChannel(String name)

Get a single Channel.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   String name = ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString();
   Channel response = eventarcClient.getChannel(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the channel to get.

Returns
TypeDescription
Channel

getChannelCallable()

public final UnaryCallable<GetChannelRequest,Channel> getChannelCallable()

Get a single Channel.

Sample code:


 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();
 }
 
Returns
TypeDescription
UnaryCallable<GetChannelRequest,Channel>

getChannelConnection(ChannelConnectionName name)

public final ChannelConnection getChannelConnection(ChannelConnectionName name)

Get a single ChannelConnection.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   ChannelConnectionName name =
       ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]");
   ChannelConnection response = eventarcClient.getChannelConnection(name);
 }
 
Parameter
NameDescription
nameChannelConnectionName

Required. The name of the channel connection to get.

Returns
TypeDescription
ChannelConnection

getChannelConnection(GetChannelConnectionRequest request)

public final ChannelConnection getChannelConnection(GetChannelConnectionRequest request)

Get a single ChannelConnection.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   GetChannelConnectionRequest request =
       GetChannelConnectionRequest.newBuilder()
           .setName(
               ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]")
                   .toString())
           .build();
   ChannelConnection response = eventarcClient.getChannelConnection(request);
 }
 
Parameter
NameDescription
requestGetChannelConnectionRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
ChannelConnection

getChannelConnection(String name)

public final ChannelConnection getChannelConnection(String name)

Get a single ChannelConnection.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   String name =
       ChannelConnectionName.of("[PROJECT]", "[LOCATION]", "[CHANNEL_CONNECTION]").toString();
   ChannelConnection response = eventarcClient.getChannelConnection(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the channel connection to get.

Returns
TypeDescription
ChannelConnection

getChannelConnectionCallable()

public final UnaryCallable<GetChannelConnectionRequest,ChannelConnection> getChannelConnectionCallable()

Get a single ChannelConnection.

Sample code:


 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();
 }
 
Returns
TypeDescription
UnaryCallable<GetChannelConnectionRequest,ChannelConnection>

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.

Returns
TypeDescription
OperationsClient

getSettings()

public final EventarcSettings getSettings()
Returns
TypeDescription
EventarcSettings

getStub()

public EventarcStub getStub()
Returns
TypeDescription
EventarcStub

getTrigger(GetTriggerRequest request)

public final Trigger getTrigger(GetTriggerRequest request)

Get a single trigger.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   GetTriggerRequest request =
       GetTriggerRequest.newBuilder()
           .setName(TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString())
           .build();
   Trigger response = eventarcClient.getTrigger(request);
 }
 
Parameter
NameDescription
requestGetTriggerRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
Trigger

getTrigger(TriggerName name)

public final Trigger getTrigger(TriggerName name)

Get a single trigger.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   TriggerName name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]");
   Trigger response = eventarcClient.getTrigger(name);
 }
 
Parameter
NameDescription
nameTriggerName

Required. The name of the trigger to get.

Returns
TypeDescription
Trigger

getTrigger(String name)

public final Trigger getTrigger(String name)

Get a single trigger.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   String name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]").toString();
   Trigger response = eventarcClient.getTrigger(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the trigger to get.

Returns
TypeDescription
Trigger

getTriggerCallable()

public final UnaryCallable<GetTriggerRequest,Trigger> getTriggerCallable()

Get a single trigger.

Sample code:


 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();
 }
 
Returns
TypeDescription
UnaryCallable<GetTriggerRequest,Trigger>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listChannelConnections(ListChannelConnectionsRequest request)

public final EventarcClient.ListChannelConnectionsPagedResponse listChannelConnections(ListChannelConnectionsRequest request)

List channel connections.

Sample code:


 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);
   }
 }
 
Parameter
NameDescription
requestListChannelConnectionsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
EventarcClient.ListChannelConnectionsPagedResponse

listChannelConnections(LocationName parent)

public final EventarcClient.ListChannelConnectionsPagedResponse listChannelConnections(LocationName parent)

List channel connections.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (ChannelConnection element : eventarcClient.listChannelConnections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent collection from which to list channel connections.

Returns
TypeDescription
EventarcClient.ListChannelConnectionsPagedResponse

listChannelConnections(String parent)

public final EventarcClient.ListChannelConnectionsPagedResponse listChannelConnections(String parent)

List channel connections.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (ChannelConnection element : eventarcClient.listChannelConnections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent collection from which to list channel connections.

Returns
TypeDescription
EventarcClient.ListChannelConnectionsPagedResponse

listChannelConnectionsCallable()

public final UnaryCallable<ListChannelConnectionsRequest,ListChannelConnectionsResponse> listChannelConnectionsCallable()

List channel connections.

Sample code:


 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.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListChannelConnectionsRequest,ListChannelConnectionsResponse>

listChannelConnectionsPagedCallable()

public final UnaryCallable<ListChannelConnectionsRequest,EventarcClient.ListChannelConnectionsPagedResponse> listChannelConnectionsPagedCallable()

List channel connections.

Sample code:


 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);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListChannelConnectionsRequest,ListChannelConnectionsPagedResponse>

listChannels(ListChannelsRequest request)

public final EventarcClient.ListChannelsPagedResponse listChannels(ListChannelsRequest request)

List channels.

Sample code:


 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);
   }
 }
 
Parameter
NameDescription
requestListChannelsRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
EventarcClient.ListChannelsPagedResponse

listChannels(LocationName parent)

public final EventarcClient.ListChannelsPagedResponse listChannels(LocationName parent)

List channels.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Channel element : eventarcClient.listChannels(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent collection to list channels on.

Returns
TypeDescription
EventarcClient.ListChannelsPagedResponse

listChannels(String parent)

public final EventarcClient.ListChannelsPagedResponse listChannels(String parent)

List channels.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Channel element : eventarcClient.listChannels(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent collection to list channels on.

Returns
TypeDescription
EventarcClient.ListChannelsPagedResponse

listChannelsCallable()

public final UnaryCallable<ListChannelsRequest,ListChannelsResponse> listChannelsCallable()

List channels.

Sample code:


 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.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListChannelsRequest,ListChannelsResponse>

listChannelsPagedCallable()

public final UnaryCallable<ListChannelsRequest,EventarcClient.ListChannelsPagedResponse> listChannelsPagedCallable()

List channels.

Sample code:


 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);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListChannelsRequest,ListChannelsPagedResponse>

listTriggers(ListTriggersRequest request)

public final EventarcClient.ListTriggersPagedResponse listTriggers(ListTriggersRequest request)

List triggers.

Sample code:


 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);
   }
 }
 
Parameter
NameDescription
requestListTriggersRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
EventarcClient.ListTriggersPagedResponse

listTriggers(LocationName parent)

public final EventarcClient.ListTriggersPagedResponse listTriggers(LocationName parent)

List triggers.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Trigger element : eventarcClient.listTriggers(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent collection to list triggers on.

Returns
TypeDescription
EventarcClient.ListTriggersPagedResponse

listTriggers(String parent)

public final EventarcClient.ListTriggersPagedResponse listTriggers(String parent)

List triggers.

Sample code:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Trigger element : eventarcClient.listTriggers(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent collection to list triggers on.

Returns
TypeDescription
EventarcClient.ListTriggersPagedResponse

listTriggersCallable()

public final UnaryCallable<ListTriggersRequest,ListTriggersResponse> listTriggersCallable()

List triggers.

Sample code:


 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.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListTriggersRequest,ListTriggersResponse>

listTriggersPagedCallable()

public final UnaryCallable<ListTriggersRequest,EventarcClient.ListTriggersPagedResponse> listTriggersPagedCallable()

List triggers.

Sample code:


 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);
   }
 }
 
Returns
TypeDescription
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:


 try (EventarcClient eventarcClient = EventarcClient.create()) {
   Channel channel = Channel.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Channel response = eventarcClient.updateChannelAsync(channel, updateMask).get();
 }
 
Parameters
NameDescription
channelChannel

The channel to be updated.

updateMaskFieldMask

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 "*".

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

updateChannelAsync(UpdateChannelRequest request)

public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(UpdateChannelRequest request)

Update a single channel.

Sample code:


 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();
 }
 
Parameter
NameDescription
requestUpdateChannelRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Channel,OperationMetadata>

updateChannelCallable()

public final UnaryCallable<UpdateChannelRequest,Operation> updateChannelCallable()

Update a single channel.

Sample code:


 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();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateChannelRequest,Operation>

updateChannelOperationCallable()

public final OperationCallable<UpdateChannelRequest,Channel,OperationMetadata> updateChannelOperationCallable()

Update a single channel.

Sample code:


 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();
 }
 
Returns
TypeDescription
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:


 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();
 }
 
Parameters
NameDescription
triggerTrigger

The trigger to be updated.

updateMaskFieldMask

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 "*".

allowMissingboolean

If set to true, and the trigger is not found, a new trigger will be created. In this situation, update_mask is ignored.

Returns
TypeDescription
OperationFuture<Trigger,OperationMetadata>

updateTriggerAsync(UpdateTriggerRequest request)

public final OperationFuture<Trigger,OperationMetadata> updateTriggerAsync(UpdateTriggerRequest request)

Update a single trigger.

Sample code:


 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();
 }
 
Parameter
NameDescription
requestUpdateTriggerRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<Trigger,OperationMetadata>

updateTriggerCallable()

public final UnaryCallable<UpdateTriggerRequest,Operation> updateTriggerCallable()

Update a single trigger.

Sample code:


 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();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateTriggerRequest,Operation>

updateTriggerOperationCallable()

public final OperationCallable<UpdateTriggerRequest,Trigger,OperationMetadata> updateTriggerOperationCallable()

Update a single trigger.

Sample code:


 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();
 }
 
Returns
TypeDescription
OperationCallable<UpdateTriggerRequest,Trigger,OperationMetadata>