Class EventarcClient

java.lang.Object
com.google.cloud.eventarc.v1.EventarcClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class EventarcClient extends Object implements BackgroundResource
Service Description: Eventarc allows users to subscribe to various events that are provided by Google Cloud services and forward them to supported destinations.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (EventarcClient eventarcClient = EventarcClient.create()) {
   TriggerName name = TriggerName.of("[PROJECT]", "[LOCATION]", "[TRIGGER]");
   Trigger response = eventarcClient.getTrigger(name);
 }
 

Note: close() needs to be called on the EventarcClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method 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. The name of the GoogleChannelConfig in the response is ALWAYS coded with projectID.

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

GetMessageBus

Get a single MessageBus.

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

  • getMessageBus(GetMessageBusRequest request)

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

  • getMessageBus(MessageBusName name)

  • getMessageBus(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.

  • getMessageBusCallable()

ListMessageBuses

List message buses.

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

  • listMessageBuses(ListMessageBusesRequest request)

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

  • listMessageBuses(LocationName parent)

  • listMessageBuses(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.

  • listMessageBusesPagedCallable()

  • listMessageBusesCallable()

ListMessageBusEnrollments

List message bus enrollments.

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

  • listMessageBusEnrollments(ListMessageBusEnrollmentsRequest request)

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

  • listMessageBusEnrollments(MessageBusName parent)

  • listMessageBusEnrollments(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.

  • listMessageBusEnrollmentsPagedCallable()

  • listMessageBusEnrollmentsCallable()

CreateMessageBus

Create a new MessageBus in a particular project and location.

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

  • createMessageBusAsync(CreateMessageBusRequest request)

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

  • createMessageBusAsync(LocationName parent, MessageBus messageBus, String messageBusId)

  • createMessageBusAsync(String parent, MessageBus messageBus, String messageBusId)

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

  • createMessageBusOperationCallable()

  • createMessageBusCallable()

UpdateMessageBus

Update a single message bus.

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

  • updateMessageBusAsync(UpdateMessageBusRequest request)

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

  • updateMessageBusAsync(MessageBus messageBus, 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.

  • updateMessageBusOperationCallable()

  • updateMessageBusCallable()

DeleteMessageBus

Delete a single message bus.

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

  • deleteMessageBusAsync(DeleteMessageBusRequest request)

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

  • deleteMessageBusAsync(MessageBusName name, String etag)

  • deleteMessageBusAsync(String name, String etag)

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

  • deleteMessageBusOperationCallable()

  • deleteMessageBusCallable()

GetEnrollment

Get a single Enrollment.

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

  • getEnrollment(GetEnrollmentRequest request)

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

  • getEnrollment(EnrollmentName name)

  • getEnrollment(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.

  • getEnrollmentCallable()

ListEnrollments

List Enrollments.

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

  • listEnrollments(ListEnrollmentsRequest request)

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

  • listEnrollments(LocationName parent)

  • listEnrollments(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.

  • listEnrollmentsPagedCallable()

  • listEnrollmentsCallable()

CreateEnrollment

Create a new Enrollment in a particular project and location.

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

  • createEnrollmentAsync(CreateEnrollmentRequest request)

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

  • createEnrollmentAsync(LocationName parent, Enrollment enrollment, String enrollmentId)

  • createEnrollmentAsync(String parent, Enrollment enrollment, String enrollmentId)

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

  • createEnrollmentOperationCallable()

  • createEnrollmentCallable()

UpdateEnrollment

Update a single Enrollment.

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

  • updateEnrollmentAsync(UpdateEnrollmentRequest request)

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

  • updateEnrollmentAsync(Enrollment enrollment, 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.

  • updateEnrollmentOperationCallable()

  • updateEnrollmentCallable()

DeleteEnrollment

Delete a single Enrollment.

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

  • deleteEnrollmentAsync(DeleteEnrollmentRequest request)

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

  • deleteEnrollmentAsync(EnrollmentName name, String etag)

  • deleteEnrollmentAsync(String name, String etag)

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

  • deleteEnrollmentOperationCallable()

  • deleteEnrollmentCallable()

GetPipeline

Get a single Pipeline.

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

  • getPipeline(GetPipelineRequest request)

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

  • getPipeline(PipelineName name)

  • getPipeline(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.

  • getPipelineCallable()

ListPipelines

List pipelines.

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

  • listPipelines(ListPipelinesRequest request)

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

  • listPipelines(LocationName parent)

  • listPipelines(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.

  • listPipelinesPagedCallable()

  • listPipelinesCallable()

CreatePipeline

Create a new Pipeline in a particular project and location.

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

  • createPipelineAsync(CreatePipelineRequest request)

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

  • createPipelineAsync(LocationName parent, Pipeline pipeline, String pipelineId)

  • createPipelineAsync(String parent, Pipeline pipeline, String pipelineId)

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

  • createPipelineOperationCallable()

  • createPipelineCallable()

UpdatePipeline

Update a single pipeline.

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

  • updatePipelineAsync(UpdatePipelineRequest request)

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

  • updatePipelineAsync(Pipeline pipeline, 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.

  • updatePipelineOperationCallable()

  • updatePipelineCallable()

DeletePipeline

Delete a single pipeline.

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

  • deletePipelineAsync(DeletePipelineRequest request)

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

  • deletePipelineAsync(PipelineName name, String etag)

  • deletePipelineAsync(String name, String etag)

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

  • deletePipelineOperationCallable()

  • deletePipelineCallable()

GetGoogleApiSource

Get a single GoogleApiSource.

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

  • getGoogleApiSource(GetGoogleApiSourceRequest request)

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

  • getGoogleApiSource(GoogleApiSourceName name)

  • getGoogleApiSource(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.

  • getGoogleApiSourceCallable()

ListGoogleApiSources

List GoogleApiSources.

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

  • listGoogleApiSources(ListGoogleApiSourcesRequest request)

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

  • listGoogleApiSources(LocationName parent)

  • listGoogleApiSources(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.

  • listGoogleApiSourcesPagedCallable()

  • listGoogleApiSourcesCallable()

CreateGoogleApiSource

Create a new GoogleApiSource in a particular project and location.

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

  • createGoogleApiSourceAsync(CreateGoogleApiSourceRequest request)

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

  • createGoogleApiSourceAsync(LocationName parent, GoogleApiSource googleApiSource, String googleApiSourceId)

  • createGoogleApiSourceAsync(String parent, GoogleApiSource googleApiSource, String googleApiSourceId)

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

  • createGoogleApiSourceOperationCallable()

  • createGoogleApiSourceCallable()

UpdateGoogleApiSource

Update a single GoogleApiSource.

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

  • updateGoogleApiSourceAsync(UpdateGoogleApiSourceRequest request)

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

  • updateGoogleApiSourceAsync(GoogleApiSource googleApiSource, 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.

  • updateGoogleApiSourceOperationCallable()

  • updateGoogleApiSourceCallable()

DeleteGoogleApiSource

Delete a single GoogleApiSource.

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

  • deleteGoogleApiSourceAsync(DeleteGoogleApiSourceRequest request)

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

  • deleteGoogleApiSourceAsync(GoogleApiSourceName name, String etag)

  • deleteGoogleApiSourceAsync(String name, String etag)

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

  • deleteGoogleApiSourceOperationCallable()

  • deleteGoogleApiSourceCallable()

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_DENIED`errors.

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.

  • Constructor Details

    • EventarcClient

      protected EventarcClient(EventarcSettings settings) throws IOException
      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.
      Throws:
      IOException
    • EventarcClient

      protected EventarcClient(EventarcStub stub)
  • Method Details

    • create

      public static final EventarcClient create() throws IOException
      Constructs an instance of EventarcClient with default settings.
      Throws:
      IOException
    • create

      public static final EventarcClient create(EventarcSettings settings) throws IOException
      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.
      Throws:
      IOException
    • create

      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).
    • getSettings

      public final EventarcSettings getSettings()
    • getStub

      public EventarcStub getStub()
    • 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.
    • getHttpJsonOperationsClient

      @BetaApi 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.
    • getTrigger

      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);
       }
       
      Parameters:
      name - Required. The name of the trigger to get.
      Throws:
      ApiException - if the remote call fails
    • getTrigger

      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);
       }
       
      Parameters:
      name - Required. The name of the trigger to get.
      Throws:
      ApiException - if the remote call fails
    • getTrigger

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listTriggers

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list triggers on.
      Throws:
      ApiException - if the remote call fails
    • listTriggers

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list triggers on.
      Throws:
      ApiException - if the remote call fails
    • listTriggers

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • createTriggerAsync

      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:
      parent - Required. The parent collection in which to add this trigger.
      trigger - Required. The trigger to create.
      triggerId - Required. The user-provided ID to be assigned to the trigger.
      Throws:
      ApiException - if the remote call fails
    • createTriggerAsync

      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:
      parent - Required. The parent collection in which to add this trigger.
      trigger - Required. The trigger to create.
      triggerId - Required. The user-provided ID to be assigned to the trigger.
      Throws:
      ApiException - if the remote call fails
    • createTriggerAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • updateTriggerAsync

      public final OperationFuture<Trigger,OperationMetadata> updateTriggerAsync(Trigger trigger, com.google.protobuf.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:
      trigger - The trigger to be updated.
      updateMask - The fields to be updated; only fields explicitly provided are updated. If no field mask is provided, all provided fields in the request are updated. To update all fields, provide a field mask of "*".
      allowMissing - If set to true, and the trigger is not found, a new trigger will be created. In this situation, `update_mask` is ignored.
      Throws:
      ApiException - if the remote call fails
    • updateTriggerAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • deleteTriggerAsync

      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:
      name - Required. The name of the trigger to be deleted.
      allowMissing - If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.
      Throws:
      ApiException - if the remote call fails
    • deleteTriggerAsync

      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:
      name - Required. The name of the trigger to be deleted.
      allowMissing - If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.
      Throws:
      ApiException - if the remote call fails
    • deleteTriggerAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • getChannel

      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);
       }
       
      Parameters:
      name - Required. The name of the channel to get.
      Throws:
      ApiException - if the remote call fails
    • getChannel

      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);
       }
       
      Parameters:
      name - Required. The name of the channel to get.
      Throws:
      ApiException - if the remote call fails
    • getChannel

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listChannels

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list channels on.
      Throws:
      ApiException - if the remote call fails
    • listChannels

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list channels on.
      Throws:
      ApiException - if the remote call fails
    • listChannels

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • createChannelAsync

      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:
      parent - Required. The parent collection in which to add this channel.
      channel - Required. The channel to create.
      channelId - Required. The user-provided ID to be assigned to the channel.
      Throws:
      ApiException - if the remote call fails
    • createChannelAsync

      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:
      parent - Required. The parent collection in which to add this channel.
      channel - Required. The channel to create.
      channelId - Required. The user-provided ID to be assigned to the channel.
      Throws:
      ApiException - if the remote call fails
    • createChannelAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • updateChannelAsync

      public final OperationFuture<Channel,OperationMetadata> updateChannelAsync(Channel channel, com.google.protobuf.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:
      channel - The channel to be updated.
      updateMask - 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 "*".
      Throws:
      ApiException - if the remote call fails
    • updateChannelAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • deleteChannelAsync

      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();
       }
       
      Parameters:
      name - Required. The name of the channel to be deleted.
      Throws:
      ApiException - if the remote call fails
    • deleteChannelAsync

      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();
       }
       
      Parameters:
      name - Required. The name of the channel to be deleted.
      Throws:
      ApiException - if the remote call fails
    • deleteChannelAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • getProvider

      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);
       }
       
      Parameters:
      name - Required. The name of the provider to get.
      Throws:
      ApiException - if the remote call fails
    • getProvider

      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);
       }
       
      Parameters:
      name - Required. The name of the provider to get.
      Throws:
      ApiException - if the remote call fails
    • getProvider

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listProviders

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent of the provider to get.
      Throws:
      ApiException - if the remote call fails
    • listProviders

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent of the provider to get.
      Throws:
      ApiException - if the remote call fails
    • listProviders

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • getChannelConnection

      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);
       }
       
      Parameters:
      name - Required. The name of the channel connection to get.
      Throws:
      ApiException - if the remote call fails
    • getChannelConnection

      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);
       }
       
      Parameters:
      name - Required. The name of the channel connection to get.
      Throws:
      ApiException - if the remote call fails
    • getChannelConnection

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listChannelConnections

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent collection from which to list channel connections.
      Throws:
      ApiException - if the remote call fails
    • listChannelConnections

      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);
         }
       }
       
      Parameters:
      parent - Required. The parent collection from which to list channel connections.
      Throws:
      ApiException - if the remote call fails
    • listChannelConnections

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • createChannelConnectionAsync

      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:
      parent - Required. The parent collection in which to add this channel connection.
      channelConnection - Required. Channel connection to create.
      channelConnectionId - Required. The user-provided ID to be assigned to the channel connection.
      Throws:
      ApiException - if the remote call fails
    • createChannelConnectionAsync

      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:
      parent - Required. The parent collection in which to add this channel connection.
      channelConnection - Required. Channel connection to create.
      channelConnectionId - Required. The user-provided ID to be assigned to the channel connection.
      Throws:
      ApiException - if the remote call fails
    • createChannelConnectionAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • deleteChannelConnectionAsync

      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();
       }
       
      Parameters:
      name - Required. The name of the channel connection to delete.
      Throws:
      ApiException - if the remote call fails
    • deleteChannelConnectionAsync

      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();
       }
       
      Parameters:
      name - Required. The name of the channel connection to delete.
      Throws:
      ApiException - if the remote call fails
    • deleteChannelConnectionAsync

      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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • 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();
       }
       
    • getGoogleChannelConfig

      public final GoogleChannelConfig getGoogleChannelConfig(GoogleChannelConfigName name)
      Get a GoogleChannelConfig. The name of the GoogleChannelConfig in the response is ALWAYS coded with projectID.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the config to get.
      Throws:
      ApiException - if the remote call fails
    • getGoogleChannelConfig

      public final GoogleChannelConfig getGoogleChannelConfig(String name)
      Get a GoogleChannelConfig. The name of the GoogleChannelConfig in the response is ALWAYS coded with projectID.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the config to get.
      Throws:
      ApiException - if the remote call fails
    • getGoogleChannelConfig

      public final GoogleChannelConfig getGoogleChannelConfig(GetGoogleChannelConfigRequest request)
      Get a GoogleChannelConfig. The name of the GoogleChannelConfig in the response is ALWAYS coded with projectID.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getGoogleChannelConfigCallable

      public final UnaryCallable<GetGoogleChannelConfigRequest,GoogleChannelConfig> getGoogleChannelConfigCallable()
      Get a GoogleChannelConfig. The name of the GoogleChannelConfig in the response is ALWAYS coded with projectID.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
    • updateGoogleChannelConfig

      public final GoogleChannelConfig updateGoogleChannelConfig(GoogleChannelConfig googleChannelConfig, com.google.protobuf.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:
      googleChannelConfig - Required. The config to be updated.
      updateMask - 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 "*".
      Throws:
      ApiException - if the remote call fails
    • updateGoogleChannelConfig

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • getMessageBus

      public final MessageBus getMessageBus(MessageBusName name)
      Get a single MessageBus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         MessageBusName name = MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]");
         MessageBus response = eventarcClient.getMessageBus(name);
       }
       
      Parameters:
      name - Required. The name of the message bus to get.
      Throws:
      ApiException - if the remote call fails
    • getMessageBus

      public final MessageBus getMessageBus(String name)
      Get a single MessageBus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 = MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString();
         MessageBus response = eventarcClient.getMessageBus(name);
       }
       
      Parameters:
      name - Required. The name of the message bus to get.
      Throws:
      ApiException - if the remote call fails
    • getMessageBus

      public final MessageBus getMessageBus(GetMessageBusRequest request)
      Get a single MessageBus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GetMessageBusRequest request =
             GetMessageBusRequest.newBuilder()
                 .setName(MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString())
                 .build();
         MessageBus response = eventarcClient.getMessageBus(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getMessageBusCallable

      public final UnaryCallable<GetMessageBusRequest,MessageBus> getMessageBusCallable()
      Get a single MessageBus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GetMessageBusRequest request =
             GetMessageBusRequest.newBuilder()
                 .setName(MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString())
                 .build();
         ApiFuture<MessageBus> future = eventarcClient.getMessageBusCallable().futureCall(request);
         // Do something.
         MessageBus response = future.get();
       }
       
    • listMessageBuses

      public final EventarcClient.ListMessageBusesPagedResponse listMessageBuses(LocationName parent)
      List message buses.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 (MessageBus element : eventarcClient.listMessageBuses(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list message buses on.
      Throws:
      ApiException - if the remote call fails
    • listMessageBuses

      public final EventarcClient.ListMessageBusesPagedResponse listMessageBuses(String parent)
      List message buses.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 (MessageBus element : eventarcClient.listMessageBuses(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list message buses on.
      Throws:
      ApiException - if the remote call fails
    • listMessageBuses

      List message buses.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListMessageBusesRequest request =
             ListMessageBusesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         for (MessageBus element : eventarcClient.listMessageBuses(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listMessageBusesPagedCallable

      List message buses.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListMessageBusesRequest request =
             ListMessageBusesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         ApiFuture<MessageBus> future =
             eventarcClient.listMessageBusesPagedCallable().futureCall(request);
         // Do something.
         for (MessageBus element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listMessageBusesCallable

      public final UnaryCallable<ListMessageBusesRequest,ListMessageBusesResponse> listMessageBusesCallable()
      List message buses.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListMessageBusesRequest request =
             ListMessageBusesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         while (true) {
           ListMessageBusesResponse response = eventarcClient.listMessageBusesCallable().call(request);
           for (MessageBus element : response.getMessageBusesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listMessageBusEnrollments

      public final EventarcClient.ListMessageBusEnrollmentsPagedResponse listMessageBusEnrollments(MessageBusName parent)
      List message bus enrollments.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         MessageBusName parent = MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]");
         for (String element : eventarcClient.listMessageBusEnrollments(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent message bus to list enrollments on.
      Throws:
      ApiException - if the remote call fails
    • listMessageBusEnrollments

      public final EventarcClient.ListMessageBusEnrollmentsPagedResponse listMessageBusEnrollments(String parent)
      List message bus enrollments.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 = MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString();
         for (String element : eventarcClient.listMessageBusEnrollments(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent message bus to list enrollments on.
      Throws:
      ApiException - if the remote call fails
    • listMessageBusEnrollments

      List message bus enrollments.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListMessageBusEnrollmentsRequest request =
             ListMessageBusEnrollmentsRequest.newBuilder()
                 .setParent(MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (String element : eventarcClient.listMessageBusEnrollments(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listMessageBusEnrollmentsPagedCallable

      List message bus enrollments.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListMessageBusEnrollmentsRequest request =
             ListMessageBusEnrollmentsRequest.newBuilder()
                 .setParent(MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<String> future =
             eventarcClient.listMessageBusEnrollmentsPagedCallable().futureCall(request);
         // Do something.
         for (String element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listMessageBusEnrollmentsCallable

      public final UnaryCallable<ListMessageBusEnrollmentsRequest,ListMessageBusEnrollmentsResponse> listMessageBusEnrollmentsCallable()
      List message bus enrollments.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListMessageBusEnrollmentsRequest request =
             ListMessageBusEnrollmentsRequest.newBuilder()
                 .setParent(MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListMessageBusEnrollmentsResponse response =
               eventarcClient.listMessageBusEnrollmentsCallable().call(request);
           for (String element : response.getEnrollmentsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • createMessageBusAsync

      public final OperationFuture<MessageBus,OperationMetadata> createMessageBusAsync(LocationName parent, MessageBus messageBus, String messageBusId)
      Create a new MessageBus 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]");
         MessageBus messageBus = MessageBus.newBuilder().build();
         String messageBusId = "messageBusId-1312824332";
         MessageBus response =
             eventarcClient.createMessageBusAsync(parent, messageBus, messageBusId).get();
       }
       
      Parameters:
      parent - Required. The parent collection in which to add this message bus.
      messageBus - Required. The message bus to create.
      messageBusId - Required. The user-provided ID to be assigned to the MessageBus. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
      Throws:
      ApiException - if the remote call fails
    • createMessageBusAsync

      public final OperationFuture<MessageBus,OperationMetadata> createMessageBusAsync(String parent, MessageBus messageBus, String messageBusId)
      Create a new MessageBus 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();
         MessageBus messageBus = MessageBus.newBuilder().build();
         String messageBusId = "messageBusId-1312824332";
         MessageBus response =
             eventarcClient.createMessageBusAsync(parent, messageBus, messageBusId).get();
       }
       
      Parameters:
      parent - Required. The parent collection in which to add this message bus.
      messageBus - Required. The message bus to create.
      messageBusId - Required. The user-provided ID to be assigned to the MessageBus. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
      Throws:
      ApiException - if the remote call fails
    • createMessageBusAsync

      public final OperationFuture<MessageBus,OperationMetadata> createMessageBusAsync(CreateMessageBusRequest request)
      Create a new MessageBus 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()) {
         CreateMessageBusRequest request =
             CreateMessageBusRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMessageBus(MessageBus.newBuilder().build())
                 .setMessageBusId("messageBusId-1312824332")
                 .setValidateOnly(true)
                 .build();
         MessageBus response = eventarcClient.createMessageBusAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createMessageBusOperationCallable

      public final OperationCallable<CreateMessageBusRequest,MessageBus,OperationMetadata> createMessageBusOperationCallable()
      Create a new MessageBus 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()) {
         CreateMessageBusRequest request =
             CreateMessageBusRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMessageBus(MessageBus.newBuilder().build())
                 .setMessageBusId("messageBusId-1312824332")
                 .setValidateOnly(true)
                 .build();
         OperationFuture<MessageBus, OperationMetadata> future =
             eventarcClient.createMessageBusOperationCallable().futureCall(request);
         // Do something.
         MessageBus response = future.get();
       }
       
    • createMessageBusCallable

      public final UnaryCallable<CreateMessageBusRequest,Operation> createMessageBusCallable()
      Create a new MessageBus 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()) {
         CreateMessageBusRequest request =
             CreateMessageBusRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMessageBus(MessageBus.newBuilder().build())
                 .setMessageBusId("messageBusId-1312824332")
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future = eventarcClient.createMessageBusCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateMessageBusAsync

      public final OperationFuture<MessageBus,OperationMetadata> updateMessageBusAsync(MessageBus messageBus, com.google.protobuf.FieldMask updateMask)
      Update a single message bus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         MessageBus messageBus = MessageBus.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         MessageBus response = eventarcClient.updateMessageBusAsync(messageBus, updateMask).get();
       }
       
      Parameters:
      messageBus - Required. The MessageBus to be updated.
      updateMask - Optional. 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 "*".
      Throws:
      ApiException - if the remote call fails
    • updateMessageBusAsync

      public final OperationFuture<MessageBus,OperationMetadata> updateMessageBusAsync(UpdateMessageBusRequest request)
      Update a single message bus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdateMessageBusRequest request =
             UpdateMessageBusRequest.newBuilder()
                 .setMessageBus(MessageBus.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         MessageBus response = eventarcClient.updateMessageBusAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateMessageBusOperationCallable

      public final OperationCallable<UpdateMessageBusRequest,MessageBus,OperationMetadata> updateMessageBusOperationCallable()
      Update a single message bus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdateMessageBusRequest request =
             UpdateMessageBusRequest.newBuilder()
                 .setMessageBus(MessageBus.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         OperationFuture<MessageBus, OperationMetadata> future =
             eventarcClient.updateMessageBusOperationCallable().futureCall(request);
         // Do something.
         MessageBus response = future.get();
       }
       
    • updateMessageBusCallable

      public final UnaryCallable<UpdateMessageBusRequest,Operation> updateMessageBusCallable()
      Update a single message bus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdateMessageBusRequest request =
             UpdateMessageBusRequest.newBuilder()
                 .setMessageBus(MessageBus.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future = eventarcClient.updateMessageBusCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteMessageBusAsync

      public final OperationFuture<MessageBus,OperationMetadata> deleteMessageBusAsync(MessageBusName name, String etag)
      Delete a single message bus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         MessageBusName name = MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]");
         String etag = "etag3123477";
         MessageBus response = eventarcClient.deleteMessageBusAsync(name, etag).get();
       }
       
      Parameters:
      name - Required. The name of the MessageBus to be deleted.
      etag - Optional. If provided, the MessageBus will only be deleted if the etag matches the current etag on the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteMessageBusAsync

      public final OperationFuture<MessageBus,OperationMetadata> deleteMessageBusAsync(String name, String etag)
      Delete a single message bus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 = MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString();
         String etag = "etag3123477";
         MessageBus response = eventarcClient.deleteMessageBusAsync(name, etag).get();
       }
       
      Parameters:
      name - Required. The name of the MessageBus to be deleted.
      etag - Optional. If provided, the MessageBus will only be deleted if the etag matches the current etag on the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteMessageBusAsync

      public final OperationFuture<MessageBus,OperationMetadata> deleteMessageBusAsync(DeleteMessageBusRequest request)
      Delete a single message bus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteMessageBusRequest request =
             DeleteMessageBusRequest.newBuilder()
                 .setName(MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         MessageBus response = eventarcClient.deleteMessageBusAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteMessageBusOperationCallable

      public final OperationCallable<DeleteMessageBusRequest,MessageBus,OperationMetadata> deleteMessageBusOperationCallable()
      Delete a single message bus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteMessageBusRequest request =
             DeleteMessageBusRequest.newBuilder()
                 .setName(MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         OperationFuture<MessageBus, OperationMetadata> future =
             eventarcClient.deleteMessageBusOperationCallable().futureCall(request);
         // Do something.
         MessageBus response = future.get();
       }
       
    • deleteMessageBusCallable

      public final UnaryCallable<DeleteMessageBusRequest,Operation> deleteMessageBusCallable()
      Delete a single message bus.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteMessageBusRequest request =
             DeleteMessageBusRequest.newBuilder()
                 .setName(MessageBusName.of("[PROJECT]", "[LOCATION]", "[MESSAGE_BUS]").toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future = eventarcClient.deleteMessageBusCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getEnrollment

      public final Enrollment getEnrollment(EnrollmentName name)
      Get a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         EnrollmentName name = EnrollmentName.of("[PROJECT]", "[LOCATION]", "[ENROLLMENT]");
         Enrollment response = eventarcClient.getEnrollment(name);
       }
       
      Parameters:
      name - Required. The name of the Enrollment to get.
      Throws:
      ApiException - if the remote call fails
    • getEnrollment

      public final Enrollment getEnrollment(String name)
      Get a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 = EnrollmentName.of("[PROJECT]", "[LOCATION]", "[ENROLLMENT]").toString();
         Enrollment response = eventarcClient.getEnrollment(name);
       }
       
      Parameters:
      name - Required. The name of the Enrollment to get.
      Throws:
      ApiException - if the remote call fails
    • getEnrollment

      public final Enrollment getEnrollment(GetEnrollmentRequest request)
      Get a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GetEnrollmentRequest request =
             GetEnrollmentRequest.newBuilder()
                 .setName(EnrollmentName.of("[PROJECT]", "[LOCATION]", "[ENROLLMENT]").toString())
                 .build();
         Enrollment response = eventarcClient.getEnrollment(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getEnrollmentCallable

      public final UnaryCallable<GetEnrollmentRequest,Enrollment> getEnrollmentCallable()
      Get a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GetEnrollmentRequest request =
             GetEnrollmentRequest.newBuilder()
                 .setName(EnrollmentName.of("[PROJECT]", "[LOCATION]", "[ENROLLMENT]").toString())
                 .build();
         ApiFuture<Enrollment> future = eventarcClient.getEnrollmentCallable().futureCall(request);
         // Do something.
         Enrollment response = future.get();
       }
       
    • listEnrollments

      public final EventarcClient.ListEnrollmentsPagedResponse listEnrollments(LocationName parent)
      List Enrollments.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 (Enrollment element : eventarcClient.listEnrollments(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list triggers on.
      Throws:
      ApiException - if the remote call fails
    • listEnrollments

      public final EventarcClient.ListEnrollmentsPagedResponse listEnrollments(String parent)
      List Enrollments.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 (Enrollment element : eventarcClient.listEnrollments(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list triggers on.
      Throws:
      ApiException - if the remote call fails
    • listEnrollments

      List Enrollments.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListEnrollmentsRequest request =
             ListEnrollmentsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         for (Enrollment element : eventarcClient.listEnrollments(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listEnrollmentsPagedCallable

      List Enrollments.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListEnrollmentsRequest request =
             ListEnrollmentsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         ApiFuture<Enrollment> future =
             eventarcClient.listEnrollmentsPagedCallable().futureCall(request);
         // Do something.
         for (Enrollment element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listEnrollmentsCallable

      public final UnaryCallable<ListEnrollmentsRequest,ListEnrollmentsResponse> listEnrollmentsCallable()
      List Enrollments.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListEnrollmentsRequest request =
             ListEnrollmentsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         while (true) {
           ListEnrollmentsResponse response = eventarcClient.listEnrollmentsCallable().call(request);
           for (Enrollment element : response.getEnrollmentsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • createEnrollmentAsync

      public final OperationFuture<Enrollment,OperationMetadata> createEnrollmentAsync(LocationName parent, Enrollment enrollment, String enrollmentId)
      Create a new Enrollment 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]");
         Enrollment enrollment = Enrollment.newBuilder().build();
         String enrollmentId = "enrollmentId-107037889";
         Enrollment response =
             eventarcClient.createEnrollmentAsync(parent, enrollment, enrollmentId).get();
       }
       
      Parameters:
      parent - Required. The parent collection in which to add this enrollment.
      enrollment - Required. The enrollment to create.
      enrollmentId - Required. The user-provided ID to be assigned to the Enrollment. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
      Throws:
      ApiException - if the remote call fails
    • createEnrollmentAsync

      public final OperationFuture<Enrollment,OperationMetadata> createEnrollmentAsync(String parent, Enrollment enrollment, String enrollmentId)
      Create a new Enrollment 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();
         Enrollment enrollment = Enrollment.newBuilder().build();
         String enrollmentId = "enrollmentId-107037889";
         Enrollment response =
             eventarcClient.createEnrollmentAsync(parent, enrollment, enrollmentId).get();
       }
       
      Parameters:
      parent - Required. The parent collection in which to add this enrollment.
      enrollment - Required. The enrollment to create.
      enrollmentId - Required. The user-provided ID to be assigned to the Enrollment. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
      Throws:
      ApiException - if the remote call fails
    • createEnrollmentAsync

      public final OperationFuture<Enrollment,OperationMetadata> createEnrollmentAsync(CreateEnrollmentRequest request)
      Create a new Enrollment 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()) {
         CreateEnrollmentRequest request =
             CreateEnrollmentRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setEnrollment(Enrollment.newBuilder().build())
                 .setEnrollmentId("enrollmentId-107037889")
                 .setValidateOnly(true)
                 .build();
         Enrollment response = eventarcClient.createEnrollmentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createEnrollmentOperationCallable

      public final OperationCallable<CreateEnrollmentRequest,Enrollment,OperationMetadata> createEnrollmentOperationCallable()
      Create a new Enrollment 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()) {
         CreateEnrollmentRequest request =
             CreateEnrollmentRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setEnrollment(Enrollment.newBuilder().build())
                 .setEnrollmentId("enrollmentId-107037889")
                 .setValidateOnly(true)
                 .build();
         OperationFuture<Enrollment, OperationMetadata> future =
             eventarcClient.createEnrollmentOperationCallable().futureCall(request);
         // Do something.
         Enrollment response = future.get();
       }
       
    • createEnrollmentCallable

      public final UnaryCallable<CreateEnrollmentRequest,Operation> createEnrollmentCallable()
      Create a new Enrollment 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()) {
         CreateEnrollmentRequest request =
             CreateEnrollmentRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setEnrollment(Enrollment.newBuilder().build())
                 .setEnrollmentId("enrollmentId-107037889")
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future = eventarcClient.createEnrollmentCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateEnrollmentAsync

      public final OperationFuture<Enrollment,OperationMetadata> updateEnrollmentAsync(Enrollment enrollment, com.google.protobuf.FieldMask updateMask)
      Update a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         Enrollment enrollment = Enrollment.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Enrollment response = eventarcClient.updateEnrollmentAsync(enrollment, updateMask).get();
       }
       
      Parameters:
      enrollment - Required. The Enrollment to be updated.
      updateMask - Optional. 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 "*".
      Throws:
      ApiException - if the remote call fails
    • updateEnrollmentAsync

      public final OperationFuture<Enrollment,OperationMetadata> updateEnrollmentAsync(UpdateEnrollmentRequest request)
      Update a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdateEnrollmentRequest request =
             UpdateEnrollmentRequest.newBuilder()
                 .setEnrollment(Enrollment.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         Enrollment response = eventarcClient.updateEnrollmentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateEnrollmentOperationCallable

      public final OperationCallable<UpdateEnrollmentRequest,Enrollment,OperationMetadata> updateEnrollmentOperationCallable()
      Update a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdateEnrollmentRequest request =
             UpdateEnrollmentRequest.newBuilder()
                 .setEnrollment(Enrollment.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         OperationFuture<Enrollment, OperationMetadata> future =
             eventarcClient.updateEnrollmentOperationCallable().futureCall(request);
         // Do something.
         Enrollment response = future.get();
       }
       
    • updateEnrollmentCallable

      public final UnaryCallable<UpdateEnrollmentRequest,Operation> updateEnrollmentCallable()
      Update a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdateEnrollmentRequest request =
             UpdateEnrollmentRequest.newBuilder()
                 .setEnrollment(Enrollment.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future = eventarcClient.updateEnrollmentCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteEnrollmentAsync

      public final OperationFuture<Enrollment,OperationMetadata> deleteEnrollmentAsync(EnrollmentName name, String etag)
      Delete a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         EnrollmentName name = EnrollmentName.of("[PROJECT]", "[LOCATION]", "[ENROLLMENT]");
         String etag = "etag3123477";
         Enrollment response = eventarcClient.deleteEnrollmentAsync(name, etag).get();
       }
       
      Parameters:
      name - Required. The name of the Enrollment to be deleted.
      etag - Optional. If provided, the Enrollment will only be deleted if the etag matches the current etag on the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteEnrollmentAsync

      public final OperationFuture<Enrollment,OperationMetadata> deleteEnrollmentAsync(String name, String etag)
      Delete a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 = EnrollmentName.of("[PROJECT]", "[LOCATION]", "[ENROLLMENT]").toString();
         String etag = "etag3123477";
         Enrollment response = eventarcClient.deleteEnrollmentAsync(name, etag).get();
       }
       
      Parameters:
      name - Required. The name of the Enrollment to be deleted.
      etag - Optional. If provided, the Enrollment will only be deleted if the etag matches the current etag on the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteEnrollmentAsync

      public final OperationFuture<Enrollment,OperationMetadata> deleteEnrollmentAsync(DeleteEnrollmentRequest request)
      Delete a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteEnrollmentRequest request =
             DeleteEnrollmentRequest.newBuilder()
                 .setName(EnrollmentName.of("[PROJECT]", "[LOCATION]", "[ENROLLMENT]").toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         Enrollment response = eventarcClient.deleteEnrollmentAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteEnrollmentOperationCallable

      public final OperationCallable<DeleteEnrollmentRequest,Enrollment,OperationMetadata> deleteEnrollmentOperationCallable()
      Delete a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteEnrollmentRequest request =
             DeleteEnrollmentRequest.newBuilder()
                 .setName(EnrollmentName.of("[PROJECT]", "[LOCATION]", "[ENROLLMENT]").toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         OperationFuture<Enrollment, OperationMetadata> future =
             eventarcClient.deleteEnrollmentOperationCallable().futureCall(request);
         // Do something.
         Enrollment response = future.get();
       }
       
    • deleteEnrollmentCallable

      public final UnaryCallable<DeleteEnrollmentRequest,Operation> deleteEnrollmentCallable()
      Delete a single Enrollment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteEnrollmentRequest request =
             DeleteEnrollmentRequest.newBuilder()
                 .setName(EnrollmentName.of("[PROJECT]", "[LOCATION]", "[ENROLLMENT]").toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future = eventarcClient.deleteEnrollmentCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getPipeline

      public final Pipeline getPipeline(PipelineName name)
      Get a single Pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         PipelineName name = PipelineName.of("[PROJECT]", "[LOCATION]", "[PIPELINE]");
         Pipeline response = eventarcClient.getPipeline(name);
       }
       
      Parameters:
      name - Required. The name of the pipeline to get.
      Throws:
      ApiException - if the remote call fails
    • getPipeline

      public final Pipeline getPipeline(String name)
      Get a single Pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 = PipelineName.of("[PROJECT]", "[LOCATION]", "[PIPELINE]").toString();
         Pipeline response = eventarcClient.getPipeline(name);
       }
       
      Parameters:
      name - Required. The name of the pipeline to get.
      Throws:
      ApiException - if the remote call fails
    • getPipeline

      public final Pipeline getPipeline(GetPipelineRequest request)
      Get a single Pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GetPipelineRequest request =
             GetPipelineRequest.newBuilder()
                 .setName(PipelineName.of("[PROJECT]", "[LOCATION]", "[PIPELINE]").toString())
                 .build();
         Pipeline response = eventarcClient.getPipeline(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getPipelineCallable

      public final UnaryCallable<GetPipelineRequest,Pipeline> getPipelineCallable()
      Get a single Pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GetPipelineRequest request =
             GetPipelineRequest.newBuilder()
                 .setName(PipelineName.of("[PROJECT]", "[LOCATION]", "[PIPELINE]").toString())
                 .build();
         ApiFuture<Pipeline> future = eventarcClient.getPipelineCallable().futureCall(request);
         // Do something.
         Pipeline response = future.get();
       }
       
    • listPipelines

      public final EventarcClient.ListPipelinesPagedResponse listPipelines(LocationName parent)
      List pipelines.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 (Pipeline element : eventarcClient.listPipelines(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list pipelines on.
      Throws:
      ApiException - if the remote call fails
    • listPipelines

      public final EventarcClient.ListPipelinesPagedResponse listPipelines(String parent)
      List pipelines.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 (Pipeline element : eventarcClient.listPipelines(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list pipelines on.
      Throws:
      ApiException - if the remote call fails
    • listPipelines

      List pipelines.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListPipelinesRequest request =
             ListPipelinesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         for (Pipeline element : eventarcClient.listPipelines(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listPipelinesPagedCallable

      List pipelines.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListPipelinesRequest request =
             ListPipelinesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         ApiFuture<Pipeline> future = eventarcClient.listPipelinesPagedCallable().futureCall(request);
         // Do something.
         for (Pipeline element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listPipelinesCallable

      public final UnaryCallable<ListPipelinesRequest,ListPipelinesResponse> listPipelinesCallable()
      List pipelines.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListPipelinesRequest request =
             ListPipelinesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         while (true) {
           ListPipelinesResponse response = eventarcClient.listPipelinesCallable().call(request);
           for (Pipeline element : response.getPipelinesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • createPipelineAsync

      public final OperationFuture<Pipeline,OperationMetadata> createPipelineAsync(LocationName parent, Pipeline pipeline, String pipelineId)
      Create a new Pipeline 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]");
         Pipeline pipeline = Pipeline.newBuilder().build();
         String pipelineId = "pipelineId-1076718755";
         Pipeline response = eventarcClient.createPipelineAsync(parent, pipeline, pipelineId).get();
       }
       
      Parameters:
      parent - Required. The parent collection in which to add this pipeline.
      pipeline - Required. The pipeline to create.
      pipelineId - Required. The user-provided ID to be assigned to the Pipeline. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
      Throws:
      ApiException - if the remote call fails
    • createPipelineAsync

      public final OperationFuture<Pipeline,OperationMetadata> createPipelineAsync(String parent, Pipeline pipeline, String pipelineId)
      Create a new Pipeline 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();
         Pipeline pipeline = Pipeline.newBuilder().build();
         String pipelineId = "pipelineId-1076718755";
         Pipeline response = eventarcClient.createPipelineAsync(parent, pipeline, pipelineId).get();
       }
       
      Parameters:
      parent - Required. The parent collection in which to add this pipeline.
      pipeline - Required. The pipeline to create.
      pipelineId - Required. The user-provided ID to be assigned to the Pipeline. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
      Throws:
      ApiException - if the remote call fails
    • createPipelineAsync

      public final OperationFuture<Pipeline,OperationMetadata> createPipelineAsync(CreatePipelineRequest request)
      Create a new Pipeline 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()) {
         CreatePipelineRequest request =
             CreatePipelineRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPipeline(Pipeline.newBuilder().build())
                 .setPipelineId("pipelineId-1076718755")
                 .setValidateOnly(true)
                 .build();
         Pipeline response = eventarcClient.createPipelineAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createPipelineOperationCallable

      public final OperationCallable<CreatePipelineRequest,Pipeline,OperationMetadata> createPipelineOperationCallable()
      Create a new Pipeline 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()) {
         CreatePipelineRequest request =
             CreatePipelineRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPipeline(Pipeline.newBuilder().build())
                 .setPipelineId("pipelineId-1076718755")
                 .setValidateOnly(true)
                 .build();
         OperationFuture<Pipeline, OperationMetadata> future =
             eventarcClient.createPipelineOperationCallable().futureCall(request);
         // Do something.
         Pipeline response = future.get();
       }
       
    • createPipelineCallable

      public final UnaryCallable<CreatePipelineRequest,Operation> createPipelineCallable()
      Create a new Pipeline 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()) {
         CreatePipelineRequest request =
             CreatePipelineRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPipeline(Pipeline.newBuilder().build())
                 .setPipelineId("pipelineId-1076718755")
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future = eventarcClient.createPipelineCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updatePipelineAsync

      public final OperationFuture<Pipeline,OperationMetadata> updatePipelineAsync(Pipeline pipeline, com.google.protobuf.FieldMask updateMask)
      Update a single pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         Pipeline pipeline = Pipeline.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Pipeline response = eventarcClient.updatePipelineAsync(pipeline, updateMask).get();
       }
       
      Parameters:
      pipeline - Required. The Pipeline to be updated.
      updateMask - Optional. 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 "*".
      Throws:
      ApiException - if the remote call fails
    • updatePipelineAsync

      public final OperationFuture<Pipeline,OperationMetadata> updatePipelineAsync(UpdatePipelineRequest request)
      Update a single pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdatePipelineRequest request =
             UpdatePipelineRequest.newBuilder()
                 .setPipeline(Pipeline.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         Pipeline response = eventarcClient.updatePipelineAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updatePipelineOperationCallable

      public final OperationCallable<UpdatePipelineRequest,Pipeline,OperationMetadata> updatePipelineOperationCallable()
      Update a single pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdatePipelineRequest request =
             UpdatePipelineRequest.newBuilder()
                 .setPipeline(Pipeline.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         OperationFuture<Pipeline, OperationMetadata> future =
             eventarcClient.updatePipelineOperationCallable().futureCall(request);
         // Do something.
         Pipeline response = future.get();
       }
       
    • updatePipelineCallable

      public final UnaryCallable<UpdatePipelineRequest,Operation> updatePipelineCallable()
      Update a single pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdatePipelineRequest request =
             UpdatePipelineRequest.newBuilder()
                 .setPipeline(Pipeline.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future = eventarcClient.updatePipelineCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deletePipelineAsync

      public final OperationFuture<Pipeline,OperationMetadata> deletePipelineAsync(PipelineName name, String etag)
      Delete a single pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         PipelineName name = PipelineName.of("[PROJECT]", "[LOCATION]", "[PIPELINE]");
         String etag = "etag3123477";
         Pipeline response = eventarcClient.deletePipelineAsync(name, etag).get();
       }
       
      Parameters:
      name - Required. The name of the Pipeline to be deleted.
      etag - Optional. If provided, the Pipeline will only be deleted if the etag matches the current etag on the resource.
      Throws:
      ApiException - if the remote call fails
    • deletePipelineAsync

      public final OperationFuture<Pipeline,OperationMetadata> deletePipelineAsync(String name, String etag)
      Delete a single pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 = PipelineName.of("[PROJECT]", "[LOCATION]", "[PIPELINE]").toString();
         String etag = "etag3123477";
         Pipeline response = eventarcClient.deletePipelineAsync(name, etag).get();
       }
       
      Parameters:
      name - Required. The name of the Pipeline to be deleted.
      etag - Optional. If provided, the Pipeline will only be deleted if the etag matches the current etag on the resource.
      Throws:
      ApiException - if the remote call fails
    • deletePipelineAsync

      public final OperationFuture<Pipeline,OperationMetadata> deletePipelineAsync(DeletePipelineRequest request)
      Delete a single pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeletePipelineRequest request =
             DeletePipelineRequest.newBuilder()
                 .setName(PipelineName.of("[PROJECT]", "[LOCATION]", "[PIPELINE]").toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         Pipeline response = eventarcClient.deletePipelineAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deletePipelineOperationCallable

      public final OperationCallable<DeletePipelineRequest,Pipeline,OperationMetadata> deletePipelineOperationCallable()
      Delete a single pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeletePipelineRequest request =
             DeletePipelineRequest.newBuilder()
                 .setName(PipelineName.of("[PROJECT]", "[LOCATION]", "[PIPELINE]").toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         OperationFuture<Pipeline, OperationMetadata> future =
             eventarcClient.deletePipelineOperationCallable().futureCall(request);
         // Do something.
         Pipeline response = future.get();
       }
       
    • deletePipelineCallable

      public final UnaryCallable<DeletePipelineRequest,Operation> deletePipelineCallable()
      Delete a single pipeline.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeletePipelineRequest request =
             DeletePipelineRequest.newBuilder()
                 .setName(PipelineName.of("[PROJECT]", "[LOCATION]", "[PIPELINE]").toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future = eventarcClient.deletePipelineCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getGoogleApiSource

      public final GoogleApiSource getGoogleApiSource(GoogleApiSourceName name)
      Get a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GoogleApiSourceName name =
             GoogleApiSourceName.of("[PROJECT]", "[LOCATION]", "[GOOGLE_API_SOURCE]");
         GoogleApiSource response = eventarcClient.getGoogleApiSource(name);
       }
       
      Parameters:
      name - Required. The name of the google api source to get.
      Throws:
      ApiException - if the remote call fails
    • getGoogleApiSource

      public final GoogleApiSource getGoogleApiSource(String name)
      Get a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 =
             GoogleApiSourceName.of("[PROJECT]", "[LOCATION]", "[GOOGLE_API_SOURCE]").toString();
         GoogleApiSource response = eventarcClient.getGoogleApiSource(name);
       }
       
      Parameters:
      name - Required. The name of the google api source to get.
      Throws:
      ApiException - if the remote call fails
    • getGoogleApiSource

      public final GoogleApiSource getGoogleApiSource(GetGoogleApiSourceRequest request)
      Get a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GetGoogleApiSourceRequest request =
             GetGoogleApiSourceRequest.newBuilder()
                 .setName(
                     GoogleApiSourceName.of("[PROJECT]", "[LOCATION]", "[GOOGLE_API_SOURCE]")
                         .toString())
                 .build();
         GoogleApiSource response = eventarcClient.getGoogleApiSource(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getGoogleApiSourceCallable

      public final UnaryCallable<GetGoogleApiSourceRequest,GoogleApiSource> getGoogleApiSourceCallable()
      Get a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GetGoogleApiSourceRequest request =
             GetGoogleApiSourceRequest.newBuilder()
                 .setName(
                     GoogleApiSourceName.of("[PROJECT]", "[LOCATION]", "[GOOGLE_API_SOURCE]")
                         .toString())
                 .build();
         ApiFuture<GoogleApiSource> future =
             eventarcClient.getGoogleApiSourceCallable().futureCall(request);
         // Do something.
         GoogleApiSource response = future.get();
       }
       
    • listGoogleApiSources

      public final EventarcClient.ListGoogleApiSourcesPagedResponse listGoogleApiSources(LocationName parent)
      List GoogleApiSources.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 (GoogleApiSource element : eventarcClient.listGoogleApiSources(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list GoogleApiSources on.
      Throws:
      ApiException - if the remote call fails
    • listGoogleApiSources

      public final EventarcClient.ListGoogleApiSourcesPagedResponse listGoogleApiSources(String parent)
      List GoogleApiSources.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 (GoogleApiSource element : eventarcClient.listGoogleApiSources(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent collection to list GoogleApiSources on.
      Throws:
      ApiException - if the remote call fails
    • listGoogleApiSources

      List GoogleApiSources.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListGoogleApiSourcesRequest request =
             ListGoogleApiSourcesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         for (GoogleApiSource element : eventarcClient.listGoogleApiSources(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listGoogleApiSourcesPagedCallable

      List GoogleApiSources.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListGoogleApiSourcesRequest request =
             ListGoogleApiSourcesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         ApiFuture<GoogleApiSource> future =
             eventarcClient.listGoogleApiSourcesPagedCallable().futureCall(request);
         // Do something.
         for (GoogleApiSource element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listGoogleApiSourcesCallable

      public final UnaryCallable<ListGoogleApiSourcesRequest,ListGoogleApiSourcesResponse> listGoogleApiSourcesCallable()
      List GoogleApiSources.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         ListGoogleApiSourcesRequest request =
             ListGoogleApiSourcesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setOrderBy("orderBy-1207110587")
                 .setFilter("filter-1274492040")
                 .build();
         while (true) {
           ListGoogleApiSourcesResponse response =
               eventarcClient.listGoogleApiSourcesCallable().call(request);
           for (GoogleApiSource element : response.getGoogleApiSourcesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • createGoogleApiSourceAsync

      public final OperationFuture<GoogleApiSource,OperationMetadata> createGoogleApiSourceAsync(LocationName parent, GoogleApiSource googleApiSource, String googleApiSourceId)
      Create a new GoogleApiSource 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]");
         GoogleApiSource googleApiSource = GoogleApiSource.newBuilder().build();
         String googleApiSourceId = "googleApiSourceId-1417062697";
         GoogleApiSource response =
             eventarcClient
                 .createGoogleApiSourceAsync(parent, googleApiSource, googleApiSourceId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent collection in which to add this google api source.
      googleApiSource - Required. The google api source to create.
      googleApiSourceId - Required. The user-provided ID to be assigned to the GoogleApiSource. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
      Throws:
      ApiException - if the remote call fails
    • createGoogleApiSourceAsync

      public final OperationFuture<GoogleApiSource,OperationMetadata> createGoogleApiSourceAsync(String parent, GoogleApiSource googleApiSource, String googleApiSourceId)
      Create a new GoogleApiSource 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();
         GoogleApiSource googleApiSource = GoogleApiSource.newBuilder().build();
         String googleApiSourceId = "googleApiSourceId-1417062697";
         GoogleApiSource response =
             eventarcClient
                 .createGoogleApiSourceAsync(parent, googleApiSource, googleApiSourceId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent collection in which to add this google api source.
      googleApiSource - Required. The google api source to create.
      googleApiSourceId - Required. The user-provided ID to be assigned to the GoogleApiSource. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
      Throws:
      ApiException - if the remote call fails
    • createGoogleApiSourceAsync

      public final OperationFuture<GoogleApiSource,OperationMetadata> createGoogleApiSourceAsync(CreateGoogleApiSourceRequest request)
      Create a new GoogleApiSource 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()) {
         CreateGoogleApiSourceRequest request =
             CreateGoogleApiSourceRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setGoogleApiSource(GoogleApiSource.newBuilder().build())
                 .setGoogleApiSourceId("googleApiSourceId-1417062697")
                 .setValidateOnly(true)
                 .build();
         GoogleApiSource response = eventarcClient.createGoogleApiSourceAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createGoogleApiSourceOperationCallable

      public final OperationCallable<CreateGoogleApiSourceRequest,GoogleApiSource,OperationMetadata> createGoogleApiSourceOperationCallable()
      Create a new GoogleApiSource 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()) {
         CreateGoogleApiSourceRequest request =
             CreateGoogleApiSourceRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setGoogleApiSource(GoogleApiSource.newBuilder().build())
                 .setGoogleApiSourceId("googleApiSourceId-1417062697")
                 .setValidateOnly(true)
                 .build();
         OperationFuture<GoogleApiSource, OperationMetadata> future =
             eventarcClient.createGoogleApiSourceOperationCallable().futureCall(request);
         // Do something.
         GoogleApiSource response = future.get();
       }
       
    • createGoogleApiSourceCallable

      public final UnaryCallable<CreateGoogleApiSourceRequest,Operation> createGoogleApiSourceCallable()
      Create a new GoogleApiSource 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()) {
         CreateGoogleApiSourceRequest request =
             CreateGoogleApiSourceRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setGoogleApiSource(GoogleApiSource.newBuilder().build())
                 .setGoogleApiSourceId("googleApiSourceId-1417062697")
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future =
             eventarcClient.createGoogleApiSourceCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateGoogleApiSourceAsync

      public final OperationFuture<GoogleApiSource,OperationMetadata> updateGoogleApiSourceAsync(GoogleApiSource googleApiSource, com.google.protobuf.FieldMask updateMask)
      Update a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GoogleApiSource googleApiSource = GoogleApiSource.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         GoogleApiSource response =
             eventarcClient.updateGoogleApiSourceAsync(googleApiSource, updateMask).get();
       }
       
      Parameters:
      googleApiSource - Required. The GoogleApiSource to be updated.
      updateMask - Optional. 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 "*".
      Throws:
      ApiException - if the remote call fails
    • updateGoogleApiSourceAsync

      public final OperationFuture<GoogleApiSource,OperationMetadata> updateGoogleApiSourceAsync(UpdateGoogleApiSourceRequest request)
      Update a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdateGoogleApiSourceRequest request =
             UpdateGoogleApiSourceRequest.newBuilder()
                 .setGoogleApiSource(GoogleApiSource.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         GoogleApiSource response = eventarcClient.updateGoogleApiSourceAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateGoogleApiSourceOperationCallable

      public final OperationCallable<UpdateGoogleApiSourceRequest,GoogleApiSource,OperationMetadata> updateGoogleApiSourceOperationCallable()
      Update a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdateGoogleApiSourceRequest request =
             UpdateGoogleApiSourceRequest.newBuilder()
                 .setGoogleApiSource(GoogleApiSource.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         OperationFuture<GoogleApiSource, OperationMetadata> future =
             eventarcClient.updateGoogleApiSourceOperationCallable().futureCall(request);
         // Do something.
         GoogleApiSource response = future.get();
       }
       
    • updateGoogleApiSourceCallable

      public final UnaryCallable<UpdateGoogleApiSourceRequest,Operation> updateGoogleApiSourceCallable()
      Update a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         UpdateGoogleApiSourceRequest request =
             UpdateGoogleApiSourceRequest.newBuilder()
                 .setGoogleApiSource(GoogleApiSource.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future =
             eventarcClient.updateGoogleApiSourceCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteGoogleApiSourceAsync

      public final OperationFuture<GoogleApiSource,OperationMetadata> deleteGoogleApiSourceAsync(GoogleApiSourceName name, String etag)
      Delete a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         GoogleApiSourceName name =
             GoogleApiSourceName.of("[PROJECT]", "[LOCATION]", "[GOOGLE_API_SOURCE]");
         String etag = "etag3123477";
         GoogleApiSource response = eventarcClient.deleteGoogleApiSourceAsync(name, etag).get();
       }
       
      Parameters:
      name - Required. The name of the GoogleApiSource to be deleted.
      etag - Optional. If provided, the MessageBus will only be deleted if the etag matches the current etag on the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteGoogleApiSourceAsync

      public final OperationFuture<GoogleApiSource,OperationMetadata> deleteGoogleApiSourceAsync(String name, String etag)
      Delete a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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 =
             GoogleApiSourceName.of("[PROJECT]", "[LOCATION]", "[GOOGLE_API_SOURCE]").toString();
         String etag = "etag3123477";
         GoogleApiSource response = eventarcClient.deleteGoogleApiSourceAsync(name, etag).get();
       }
       
      Parameters:
      name - Required. The name of the GoogleApiSource to be deleted.
      etag - Optional. If provided, the MessageBus will only be deleted if the etag matches the current etag on the resource.
      Throws:
      ApiException - if the remote call fails
    • deleteGoogleApiSourceAsync

      public final OperationFuture<GoogleApiSource,OperationMetadata> deleteGoogleApiSourceAsync(DeleteGoogleApiSourceRequest request)
      Delete a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteGoogleApiSourceRequest request =
             DeleteGoogleApiSourceRequest.newBuilder()
                 .setName(
                     GoogleApiSourceName.of("[PROJECT]", "[LOCATION]", "[GOOGLE_API_SOURCE]")
                         .toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         GoogleApiSource response = eventarcClient.deleteGoogleApiSourceAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteGoogleApiSourceOperationCallable

      public final OperationCallable<DeleteGoogleApiSourceRequest,GoogleApiSource,OperationMetadata> deleteGoogleApiSourceOperationCallable()
      Delete a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteGoogleApiSourceRequest request =
             DeleteGoogleApiSourceRequest.newBuilder()
                 .setName(
                     GoogleApiSourceName.of("[PROJECT]", "[LOCATION]", "[GOOGLE_API_SOURCE]")
                         .toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         OperationFuture<GoogleApiSource, OperationMetadata> future =
             eventarcClient.deleteGoogleApiSourceOperationCallable().futureCall(request);
         // Do something.
         GoogleApiSource response = future.get();
       }
       
    • deleteGoogleApiSourceCallable

      public final UnaryCallable<DeleteGoogleApiSourceRequest,Operation> deleteGoogleApiSourceCallable()
      Delete a single GoogleApiSource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteGoogleApiSourceRequest request =
             DeleteGoogleApiSourceRequest.newBuilder()
                 .setName(
                     GoogleApiSourceName.of("[PROJECT]", "[LOCATION]", "[GOOGLE_API_SOURCE]")
                         .toString())
                 .setEtag("etag3123477")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future =
             eventarcClient.deleteGoogleApiSourceCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listLocations

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • getLocation

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • setIamPolicy

      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_DENIED`errors.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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_DENIED`errors.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
    • getIamPolicy

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • testIamPermissions

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException