Class EventarcClient (1.36.0)

GitHub RepositoryProduct ReferenceREST DocumentationRPC Documentation

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().

Methods
MethodDescriptionMethod Variants

GetTrigger

Get a single trigger.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getTrigger(GetTriggerRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getTrigger(TriggerName name)

  • getTrigger(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getTriggerCallable()

ListTriggers

List triggers.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listTriggers(ListTriggersRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listTriggers(LocationName parent)

  • listTriggers(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listTriggersPagedCallable()

  • listTriggersCallable()

CreateTrigger

Create a new trigger in a particular project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createTriggerAsync(CreateTriggerRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createTriggerAsync(LocationName parent, Trigger trigger, String triggerId)

  • createTriggerAsync(String parent, Trigger trigger, String triggerId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createTriggerOperationCallable()

  • createTriggerCallable()

UpdateTrigger

Update a single trigger.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateTriggerAsync(UpdateTriggerRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateTriggerAsync(Trigger trigger, FieldMask updateMask, boolean allowMissing)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateTriggerOperationCallable()

  • updateTriggerCallable()

DeleteTrigger

Delete a single trigger.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteTriggerAsync(DeleteTriggerRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteTriggerAsync(TriggerName name, boolean allowMissing)

  • deleteTriggerAsync(String name, boolean allowMissing)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteTriggerOperationCallable()

  • deleteTriggerCallable()

GetChannel

Get a single Channel.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getChannel(GetChannelRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getChannel(ChannelName name)

  • getChannel(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getChannelCallable()

ListChannels

List channels.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listChannels(ListChannelsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listChannels(LocationName parent)

  • listChannels(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listChannelsPagedCallable()

  • listChannelsCallable()

CreateChannel

Create a new channel in a particular project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createChannelAsync(CreateChannelRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createChannelAsync(LocationName parent, Channel channel, String channelId)

  • createChannelAsync(String parent, Channel channel, String channelId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createChannelOperationCallable()

  • createChannelCallable()

UpdateChannel

Update a single channel.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateChannelAsync(UpdateChannelRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateChannelAsync(Channel channel, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateChannelOperationCallable()

  • updateChannelCallable()

DeleteChannel

Delete a single channel.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteChannelAsync(DeleteChannelRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteChannelAsync(ChannelName name)

  • deleteChannelAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteChannelOperationCallable()

  • deleteChannelCallable()

GetProvider

Get a single Provider.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getProvider(GetProviderRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getProvider(ProviderName name)

  • getProvider(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getProviderCallable()

ListProviders

List providers.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listProviders(ListProvidersRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listProviders(LocationName parent)

  • listProviders(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listProvidersPagedCallable()

  • listProvidersCallable()

GetChannelConnection

Get a single ChannelConnection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getChannelConnection(GetChannelConnectionRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getChannelConnection(ChannelConnectionName name)

  • getChannelConnection(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getChannelConnectionCallable()

ListChannelConnections

List channel connections.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listChannelConnections(ListChannelConnectionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listChannelConnections(LocationName parent)

  • listChannelConnections(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listChannelConnectionsPagedCallable()

  • listChannelConnectionsCallable()

CreateChannelConnection

Create a new ChannelConnection in a particular project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createChannelConnectionAsync(CreateChannelConnectionRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createChannelConnectionAsync(LocationName parent, ChannelConnection channelConnection, String channelConnectionId)

  • createChannelConnectionAsync(String parent, ChannelConnection channelConnection, String channelConnectionId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createChannelConnectionOperationCallable()

  • createChannelConnectionCallable()

DeleteChannelConnection

Delete a single ChannelConnection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteChannelConnectionAsync(DeleteChannelConnectionRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteChannelConnectionAsync(ChannelConnectionName name)

  • deleteChannelConnectionAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteChannelConnectionOperationCallable()

  • deleteChannelConnectionCallable()

GetGoogleChannelConfig

Get a GoogleChannelConfig

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getGoogleChannelConfig(GetGoogleChannelConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getGoogleChannelConfig(GoogleChannelConfigName name)

  • getGoogleChannelConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getGoogleChannelConfigCallable()

UpdateGoogleChannelConfig

Update a single GoogleChannelConfig

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateGoogleChannelConfig(UpdateGoogleChannelConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateGoogleChannelConfig(GoogleChannelConfig googleChannelConfig, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateGoogleChannelConfigCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

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.newHttpJsonBuilder().build();
 EventarcClient eventarcClient = EventarcClient.create(eventarcSettings);
 

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

Inheritance

java.lang.Object > EventarcClient

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:


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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

getGoogleChannelConfig(GetGoogleChannelConfigRequest request)

public final GoogleChannelConfig getGoogleChannelConfig(GetGoogleChannelConfigRequest request)

Get a GoogleChannelConfig

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()) {
   GetGoogleChannelConfigRequest request =
       GetGoogleChannelConfigRequest.newBuilder()
           .setName(GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]").toString())
           .build();
   GoogleChannelConfig response = eventarcClient.getGoogleChannelConfig(request);
 }
 
Parameter
NameDescription
requestGetGoogleChannelConfigRequest

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

Returns
TypeDescription
GoogleChannelConfig

getGoogleChannelConfig(GoogleChannelConfigName name)

public final GoogleChannelConfig getGoogleChannelConfig(GoogleChannelConfigName name)

Get a GoogleChannelConfig

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()) {
   GoogleChannelConfigName name = GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]");
   GoogleChannelConfig response = eventarcClient.getGoogleChannelConfig(name);
 }
 
Parameter
NameDescription
nameGoogleChannelConfigName

Required. The name of the config to get.

Returns
TypeDescription
GoogleChannelConfig

getGoogleChannelConfig(String name)

public final GoogleChannelConfig getGoogleChannelConfig(String name)

Get a GoogleChannelConfig

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 = GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]").toString();
   GoogleChannelConfig response = eventarcClient.getGoogleChannelConfig(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the config to get.

Returns
TypeDescription
GoogleChannelConfig

getGoogleChannelConfigCallable()

public final UnaryCallable<GetGoogleChannelConfigRequest,GoogleChannelConfig> getGoogleChannelConfigCallable()

Get a GoogleChannelConfig

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()) {
   GetGoogleChannelConfigRequest request =
       GetGoogleChannelConfigRequest.newBuilder()
           .setName(GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]").toString())
           .build();
   ApiFuture<GoogleChannelConfig> future =
       eventarcClient.getGoogleChannelConfigCallable().futureCall(request);
   // Do something.
   GoogleChannelConfig response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetGoogleChannelConfigRequest,GoogleChannelConfig>

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.

Returns
TypeDescription
OperationsClient

getIamPolicy(GetIamPolicyRequest request)

public final Policy getIamPolicy(GetIamPolicyRequest request)

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

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()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   Policy response = eventarcClient.getIamPolicy(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.GetIamPolicyRequest

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

Returns
TypeDescription
com.google.iam.v1.Policy

getIamPolicyCallable()

public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

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()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   ApiFuture<Policy> future = eventarcClient.getIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a 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()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = eventarcClient.getLocation(request);
 }
 
Parameter
NameDescription
requestcom.google.cloud.location.GetLocationRequest

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

Returns
TypeDescription
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a 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()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future = eventarcClient.getLocationCallable().futureCall(request);
   // Do something.
   Location response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

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

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

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

Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
nameProviderName

Required. The name of the provider to get.

Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
nameString

Required. The name of the provider to get.

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

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:


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


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


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


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


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


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


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


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


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


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


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

listLocations(ListLocationsRequest request)

public final EventarcClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

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()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Location element : eventarcClient.listLocations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestcom.google.cloud.location.ListLocationsRequest

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

Returns
TypeDescription
EventarcClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

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()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLocationsResponse response = eventarcClient.listLocationsCallable().call(request);
     for (Location element : response.getLocationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,EventarcClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

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()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Location> future = eventarcClient.listLocationsPagedCallable().futureCall(request);
   // Do something.
   for (Location element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

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

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

Returns
TypeDescription
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);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent of the provider to get.

Returns
TypeDescription
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);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent of the provider to get.

Returns
TypeDescription
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;
     }
   }
 }
 
Returns
TypeDescription
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);
   }
 }
 
Returns
TypeDescription
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")
           .setFilter("filter-1274492040")
           .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:


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


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


 // 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")
           .setFilter("filter-1274492040")
           .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;
     }
   }
 }
 
Returns
TypeDescription
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")
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<Trigger> future = eventarcClient.listTriggersPagedCallable().futureCall(request);
   // Do something.
   for (Trigger element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListTriggersRequest,ListTriggersPagedResponse>

setIamPolicy(SetIamPolicyRequest request)

public final Policy setIamPolicy(SetIamPolicyRequest request)

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

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()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Policy response = eventarcClient.setIamPolicy(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.SetIamPolicyRequest

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

Returns
TypeDescription
com.google.iam.v1.Policy

setIamPolicyCallable()

public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

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()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Policy> future = eventarcClient.setIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRequest request)

public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

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()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   TestIamPermissionsResponse response = eventarcClient.testIamPermissions(request);
 }
 
Parameter
NameDescription
requestcom.google.iam.v1.TestIamPermissionsRequest

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

Returns
TypeDescription
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissionsCallable()

public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

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()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   ApiFuture<TestIamPermissionsResponse> future =
       eventarcClient.testIamPermissionsCallable().futureCall(request);
   // Do something.
   TestIamPermissionsResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

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


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


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

updateGoogleChannelConfig(GoogleChannelConfig googleChannelConfig, FieldMask updateMask)

public final GoogleChannelConfig updateGoogleChannelConfig(GoogleChannelConfig googleChannelConfig, FieldMask updateMask)

Update a single GoogleChannelConfig

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()) {
   GoogleChannelConfig googleChannelConfig = GoogleChannelConfig.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   GoogleChannelConfig response =
       eventarcClient.updateGoogleChannelConfig(googleChannelConfig, updateMask);
 }
 
Parameters
NameDescription
googleChannelConfigGoogleChannelConfig

Required. The config 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
GoogleChannelConfig

updateGoogleChannelConfig(UpdateGoogleChannelConfigRequest request)

public final GoogleChannelConfig updateGoogleChannelConfig(UpdateGoogleChannelConfigRequest request)

Update a single GoogleChannelConfig

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()) {
   UpdateGoogleChannelConfigRequest request =
       UpdateGoogleChannelConfigRequest.newBuilder()
           .setGoogleChannelConfig(GoogleChannelConfig.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   GoogleChannelConfig response = eventarcClient.updateGoogleChannelConfig(request);
 }
 
Parameter
NameDescription
requestUpdateGoogleChannelConfigRequest

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

Returns
TypeDescription
GoogleChannelConfig

updateGoogleChannelConfigCallable()

public final UnaryCallable<UpdateGoogleChannelConfigRequest,GoogleChannelConfig> updateGoogleChannelConfigCallable()

Update a single GoogleChannelConfig

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()) {
   UpdateGoogleChannelConfigRequest request =
       UpdateGoogleChannelConfigRequest.newBuilder()
           .setGoogleChannelConfig(GoogleChannelConfig.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<GoogleChannelConfig> future =
       eventarcClient.updateGoogleChannelConfigCallable().futureCall(request);
   // Do something.
   GoogleChannelConfig response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateGoogleChannelConfigRequest,GoogleChannelConfig>

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


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


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