Class EventarcClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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().
| 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTriggers |
List triggers. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTrigger |
Update a single trigger. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTrigger |
Delete a single trigger. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetChannel |
Get a single Channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListChannels |
List channels. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateChannel |
Update a single channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteChannel |
Delete a single channel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetProvider |
Get a single Provider. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListProviders |
List providers. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetChannelConnection |
Get a single ChannelConnection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListChannelConnections |
List channel connections. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteChannelConnection |
Delete a single ChannelConnection. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateGoogleChannelConfig |
Update a single GoogleChannelConfig |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetMessageBus |
Get a single MessageBus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMessageBuses |
List message buses. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMessageBusEnrollments |
List message bus enrollments. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMessageBus |
Update a single message bus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMessageBus |
Delete a single message bus. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetEnrollment |
Get a single Enrollment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListEnrollments |
List Enrollments. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateEnrollment |
Update a single Enrollment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteEnrollment |
Delete a single Enrollment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetPipeline |
Get a single Pipeline. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListPipelines |
List pipelines. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdatePipeline |
Update a single pipeline. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeletePipeline |
Delete a single pipeline. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetGoogleApiSource |
Get a single GoogleApiSource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListGoogleApiSources |
List GoogleApiSources. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateGoogleApiSource |
Update a single GoogleApiSource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteGoogleApiSource |
Delete a single GoogleApiSource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEventarcClient(EventarcSettings settings) Constructs an instance of EventarcClient, using the given settings.protectedEventarcClient(EventarcStub stub) -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final EventarcClientcreate()Constructs an instance of EventarcClient with default settings.static final EventarcClientcreate(EventarcSettings settings) Constructs an instance of EventarcClient, using the given settings.static final EventarcClientcreate(EventarcStub stub) Constructs an instance of EventarcClient, using the given stub for making calls.createChannelAsync(CreateChannelRequest request) Create a new channel in a particular project and location.createChannelAsync(LocationName parent, Channel channel, String channelId) Create a new channel in a particular project and location.createChannelAsync(String parent, Channel channel, String channelId) Create a new channel in a particular project and location.Create a new channel in a particular project and location.Create a new ChannelConnection in a particular project and location.createChannelConnectionAsync(LocationName parent, ChannelConnection channelConnection, String channelConnectionId) Create a new ChannelConnection in a particular project and location.createChannelConnectionAsync(String parent, ChannelConnection channelConnection, String channelConnectionId) Create a new ChannelConnection in a particular project and location.Create a new ChannelConnection in a particular project and location.Create a new ChannelConnection in a particular project and location.Create a new channel in a particular project and location.Create a new Enrollment in a particular project and location.createEnrollmentAsync(LocationName parent, Enrollment enrollment, String enrollmentId) Create a new Enrollment in a particular project and location.createEnrollmentAsync(String parent, Enrollment enrollment, String enrollmentId) Create a new Enrollment in a particular project and location.Create a new Enrollment in a particular project and location.Create a new Enrollment in a particular project and location.Create a new GoogleApiSource in a particular project and location.createGoogleApiSourceAsync(LocationName parent, GoogleApiSource googleApiSource, String googleApiSourceId) Create a new GoogleApiSource in a particular project and location.createGoogleApiSourceAsync(String parent, GoogleApiSource googleApiSource, String googleApiSourceId) Create a new GoogleApiSource in a particular project and location.Create a new GoogleApiSource in a particular project and location.Create a new GoogleApiSource in a particular project and location.Create a new MessageBus in a particular project and location.createMessageBusAsync(LocationName parent, MessageBus messageBus, String messageBusId) Create a new MessageBus in a particular project and location.createMessageBusAsync(String parent, MessageBus messageBus, String messageBusId) Create a new MessageBus in a particular project and location.Create a new MessageBus in a particular project and location.Create a new MessageBus in a particular project and location.createPipelineAsync(CreatePipelineRequest request) Create a new Pipeline in a particular project and location.createPipelineAsync(LocationName parent, Pipeline pipeline, String pipelineId) Create a new Pipeline in a particular project and location.createPipelineAsync(String parent, Pipeline pipeline, String pipelineId) Create a new Pipeline in a particular project and location.Create a new Pipeline in a particular project and location.Create a new Pipeline in a particular project and location.createTriggerAsync(CreateTriggerRequest request) Create a new trigger in a particular project and location.createTriggerAsync(LocationName parent, Trigger trigger, String triggerId) Create a new trigger in a particular project and location.createTriggerAsync(String parent, Trigger trigger, String triggerId) Create a new trigger in a particular project and location.Create a new trigger in a particular project and location.Create a new trigger in a particular project and location.Delete a single channel.deleteChannelAsync(DeleteChannelRequest request) Delete a single channel.deleteChannelAsync(String name) Delete a single channel.Delete a single channel.Delete a single ChannelConnection.Delete a single ChannelConnection.Delete a single ChannelConnection.Delete a single ChannelConnection.Delete a single ChannelConnection.Delete a single channel.Delete a single Enrollment.deleteEnrollmentAsync(EnrollmentName name, String etag) Delete a single Enrollment.deleteEnrollmentAsync(String name, String etag) Delete a single Enrollment.Delete a single Enrollment.Delete a single Enrollment.Delete a single GoogleApiSource.deleteGoogleApiSourceAsync(GoogleApiSourceName name, String etag) Delete a single GoogleApiSource.deleteGoogleApiSourceAsync(String name, String etag) Delete a single GoogleApiSource.Delete a single GoogleApiSource.Delete a single GoogleApiSource.Delete a single message bus.deleteMessageBusAsync(MessageBusName name, String etag) Delete a single message bus.deleteMessageBusAsync(String name, String etag) Delete a single message bus.Delete a single message bus.Delete a single message bus.deletePipelineAsync(DeletePipelineRequest request) Delete a single pipeline.deletePipelineAsync(PipelineName name, String etag) Delete a single pipeline.deletePipelineAsync(String name, String etag) Delete a single pipeline.Delete a single pipeline.Delete a single pipeline.deleteTriggerAsync(DeleteTriggerRequest request) Delete a single trigger.deleteTriggerAsync(TriggerName name, boolean allowMissing) Delete a single trigger.deleteTriggerAsync(String name, boolean allowMissing) Delete a single trigger.Delete a single trigger.Delete a single trigger.final ChannelgetChannel(ChannelName name) Get a single Channel.final ChannelgetChannel(GetChannelRequest request) Get a single Channel.final ChannelgetChannel(String name) Get a single Channel.Get a single Channel.final ChannelConnectionGet a single ChannelConnection.final ChannelConnectionGet a single ChannelConnection.final ChannelConnectiongetChannelConnection(String name) Get a single ChannelConnection.Get a single ChannelConnection.final EnrollmentgetEnrollment(EnrollmentName name) Get a single Enrollment.final EnrollmentgetEnrollment(GetEnrollmentRequest request) Get a single Enrollment.final EnrollmentgetEnrollment(String name) Get a single Enrollment.Get a single Enrollment.final GoogleApiSourceGet a single GoogleApiSource.final GoogleApiSourceGet a single GoogleApiSource.final GoogleApiSourcegetGoogleApiSource(String name) Get a single GoogleApiSource.Get a single GoogleApiSource.final GoogleChannelConfigGet a GoogleChannelConfig.final GoogleChannelConfigGet a GoogleChannelConfig.final GoogleChannelConfiggetGoogleChannelConfig(String name) Get a GoogleChannelConfig.Get a GoogleChannelConfig.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final MessageBusgetMessageBus(GetMessageBusRequest request) Get a single MessageBus.final MessageBusgetMessageBus(MessageBusName name) Get a single MessageBus.final MessageBusgetMessageBus(String name) Get a single MessageBus.Get a single MessageBus.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PipelinegetPipeline(GetPipelineRequest request) Get a single Pipeline.final PipelinegetPipeline(PipelineName name) Get a single Pipeline.final PipelinegetPipeline(String name) Get a single Pipeline.Get a single Pipeline.final ProvidergetProvider(GetProviderRequest request) Get a single Provider.final ProvidergetProvider(ProviderName name) Get a single Provider.final ProvidergetProvider(String name) Get a single Provider.Get a single Provider.final EventarcSettingsgetStub()final TriggergetTrigger(GetTriggerRequest request) Get a single trigger.final TriggergetTrigger(TriggerName name) Get a single trigger.final TriggergetTrigger(String name) Get a single trigger.Get a single trigger.booleanbooleanList channel connections.listChannelConnections(LocationName parent) List channel connections.listChannelConnections(String parent) List channel connections.List channel connections.final UnaryCallable<ListChannelConnectionsRequest,EventarcClient.ListChannelConnectionsPagedResponse> List channel connections.listChannels(ListChannelsRequest request) List channels.listChannels(LocationName parent) List channels.listChannels(String parent) List channels.List channels.List channels.listEnrollments(ListEnrollmentsRequest request) List Enrollments.listEnrollments(LocationName parent) List Enrollments.listEnrollments(String parent) List Enrollments.List Enrollments.List Enrollments.List GoogleApiSources.listGoogleApiSources(LocationName parent) List GoogleApiSources.listGoogleApiSources(String parent) List GoogleApiSources.List GoogleApiSources.List GoogleApiSources.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.List message bus enrollments.List message bus enrollments.listMessageBusEnrollments(String parent) List message bus enrollments.List message bus enrollments.final UnaryCallable<ListMessageBusEnrollmentsRequest,EventarcClient.ListMessageBusEnrollmentsPagedResponse> List message bus enrollments.listMessageBuses(ListMessageBusesRequest request) List message buses.listMessageBuses(LocationName parent) List message buses.listMessageBuses(String parent) List message buses.List message buses.List message buses.listPipelines(ListPipelinesRequest request) List pipelines.listPipelines(LocationName parent) List pipelines.listPipelines(String parent) List pipelines.List pipelines.List pipelines.listProviders(ListProvidersRequest request) List providers.listProviders(LocationName parent) List providers.listProviders(String parent) List providers.List providers.List providers.listTriggers(ListTriggersRequest request) List triggers.listTriggers(LocationName parent) List triggers.listTriggers(String parent) List triggers.List triggers.List triggers.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.updateChannelAsync(Channel channel, com.google.protobuf.FieldMask updateMask) Update a single channel.updateChannelAsync(UpdateChannelRequest request) Update a single channel.Update a single channel.Update a single channel.updateEnrollmentAsync(Enrollment enrollment, com.google.protobuf.FieldMask updateMask) Update a single Enrollment.Update a single Enrollment.Update a single Enrollment.Update a single Enrollment.updateGoogleApiSourceAsync(GoogleApiSource googleApiSource, com.google.protobuf.FieldMask updateMask) Update a single GoogleApiSource.Update a single GoogleApiSource.Update a single GoogleApiSource.Update a single GoogleApiSource.final GoogleChannelConfigupdateGoogleChannelConfig(GoogleChannelConfig googleChannelConfig, com.google.protobuf.FieldMask updateMask) Update a single GoogleChannelConfigfinal GoogleChannelConfigUpdate a single GoogleChannelConfigUpdate a single GoogleChannelConfigupdateMessageBusAsync(MessageBus messageBus, com.google.protobuf.FieldMask updateMask) Update a single message bus.Update a single message bus.Update a single message bus.Update a single message bus.updatePipelineAsync(Pipeline pipeline, com.google.protobuf.FieldMask updateMask) Update a single pipeline.updatePipelineAsync(UpdatePipelineRequest request) Update a single pipeline.Update a single pipeline.Update a single pipeline.updateTriggerAsync(Trigger trigger, com.google.protobuf.FieldMask updateMask, boolean allowMissing) Update a single trigger.updateTriggerAsync(UpdateTriggerRequest request) Update a single trigger.Update a single trigger.Update a single trigger.
-
Constructor Details
-
EventarcClient
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
-
-
Method Details
-
create
Constructs an instance of EventarcClient with default settings.- Throws:
IOException
-
create
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
Constructs an instance of EventarcClient, using the given stub for making calls. This is for advanced usage - prefer using create(EventarcSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getTrigger
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
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
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
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
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
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
public final UnaryCallable<ListTriggersRequest,EventarcClient.ListTriggersPagedResponse> listTriggersPagedCallable()List triggers.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EventarcClient eventarcClient = EventarcClient.create()) { ListTriggersRequest request = ListTriggersRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); ApiFuture<Trigger> future = eventarcClient.listTriggersPagedCallable().futureCall(request); // Do something. for (Trigger element : future.get().iterateAll()) { // doThingsWith(element); } } -
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, createTriggerOperationCallable()OperationMetadata> 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
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, updateTriggerOperationCallable()OperationMetadata> 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
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, deleteTriggerOperationCallable()OperationMetadata> 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
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
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
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
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
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
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
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
public final UnaryCallable<ListChannelsRequest,EventarcClient.ListChannelsPagedResponse> listChannelsPagedCallable()List channels.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EventarcClient eventarcClient = EventarcClient.create()) { ListChannelsRequest request = ListChannelsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Channel> future = eventarcClient.listChannelsPagedCallable().futureCall(request); // Do something. for (Channel element : future.get().iterateAll()) { // doThingsWith(element); } } -
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, createChannelOperationCallable()OperationMetadata> 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
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, updateChannelOperationCallable()OperationMetadata> 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
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
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
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, deleteChannelOperationCallable()OperationMetadata> 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
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
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
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
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
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
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
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
public final UnaryCallable<ListProvidersRequest,EventarcClient.ListProvidersPagedResponse> listProvidersPagedCallable()List providers.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EventarcClient eventarcClient = EventarcClient.create()) { ListProvidersRequest request = ListProvidersRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); ApiFuture<Provider> future = eventarcClient.listProvidersPagedCallable().futureCall(request); // Do something. for (Provider element : future.get().iterateAll()) { // doThingsWith(element); } } -
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
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
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
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
public final EventarcClient.ListChannelConnectionsPagedResponse listChannelConnections(ListChannelConnectionsRequest request) List channel connections.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EventarcClient eventarcClient = EventarcClient.create()) { ListChannelConnectionsRequest request = ListChannelConnectionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (ChannelConnection element : eventarcClient.listChannelConnections(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listChannelConnectionsPagedCallable
public final UnaryCallable<ListChannelConnectionsRequest,EventarcClient.ListChannelConnectionsPagedResponse> listChannelConnectionsPagedCallable()List channel connections.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EventarcClient eventarcClient = EventarcClient.create()) { ListChannelConnectionsRequest request = ListChannelConnectionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<ChannelConnection> future = eventarcClient.listChannelConnectionsPagedCallable().futureCall(request); // Do something. for (ChannelConnection element : future.get().iterateAll()) { // doThingsWith(element); } } -
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, createChannelConnectionOperationCallable()OperationMetadata> 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, deleteChannelConnectionOperationCallable()OperationMetadata> 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
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
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
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 GoogleChannelConfigSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating 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 GoogleChannelConfigSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating 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 GoogleChannelConfigSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating 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
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
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
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
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
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
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
public final EventarcClient.ListMessageBusesPagedResponse listMessageBuses(ListMessageBusesRequest request) 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
public final UnaryCallable<ListMessageBusesRequest,EventarcClient.ListMessageBusesPagedResponse> 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
public final EventarcClient.ListMessageBusEnrollmentsPagedResponse listMessageBusEnrollments(ListMessageBusEnrollmentsRequest request) 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
public final UnaryCallable<ListMessageBusEnrollmentsRequest,EventarcClient.ListMessageBusEnrollmentsPagedResponse> 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, createMessageBusOperationCallable()OperationMetadata> 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
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, updateMessageBusOperationCallable()OperationMetadata> 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
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, deleteMessageBusOperationCallable()OperationMetadata> 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
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
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
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
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
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
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
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
public final EventarcClient.ListEnrollmentsPagedResponse listEnrollments(ListEnrollmentsRequest request) 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
public final UnaryCallable<ListEnrollmentsRequest,EventarcClient.ListEnrollmentsPagedResponse> 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, createEnrollmentOperationCallable()OperationMetadata> 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
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, updateEnrollmentOperationCallable()OperationMetadata> 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
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, deleteEnrollmentOperationCallable()OperationMetadata> 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
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
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
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
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
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
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
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
public final UnaryCallable<ListPipelinesRequest,EventarcClient.ListPipelinesPagedResponse> 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
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, createPipelineOperationCallable()OperationMetadata> 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
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, updatePipelineOperationCallable()OperationMetadata> 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
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, deletePipelineOperationCallable()OperationMetadata> 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
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
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
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
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
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
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
public final EventarcClient.ListGoogleApiSourcesPagedResponse listGoogleApiSources(ListGoogleApiSourcesRequest request) 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
public final UnaryCallable<ListGoogleApiSourcesRequest,EventarcClient.ListGoogleApiSourcesPagedResponse> 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, createGoogleApiSourceOperationCallable()OperationMetadata> 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
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, updateGoogleApiSourceOperationCallable()OperationMetadata> 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
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, deleteGoogleApiSourceOperationCallable()OperationMetadata> 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
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
public final UnaryCallable<ListLocationsRequest,EventarcClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EventarcClient eventarcClient = EventarcClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = eventarcClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
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
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
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
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
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
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
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
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:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-