All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.cloudfunctions.v2alpha.model.EventTrigger Maven / Gradle / Ivy

/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.cloudfunctions.v2alpha.model;

/**
 * Describes EventTrigger, used to request events to be sent from another service.
 *
 * 

This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Functions API. For a detailed explanation see: * https://developers.google.com/api-client-library/java/google-http-java-client/json *

* * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class EventTrigger extends com.google.api.client.json.GenericJson { /** * Optional. The name of the channel associated with the trigger in * `projects/{project}/locations/{location}/channels/{channel}` format. You must provide a channel * to receive events from Eventarc SaaS partners. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String channel; /** * Criteria used to filter events. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List eventFilters; static { // hack to force ProGuard to consider EventFilter used, since otherwise it would be stripped out // see https://github.com/google/google-api-java-client/issues/543 com.google.api.client.util.Data.nullOf(EventFilter.class); } /** * Required. The type of event to observe. For example: `google.cloud.audit.log.v1.written` or * `google.cloud.pubsub.topic.v1.messagePublished`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String eventType; /** * Optional. The name of a Pub/Sub topic in the same project that will be used as the transport * topic for the event delivery. Format: `projects/{project}/topics/{topic}`. This is only valid * for events of type `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here * will not be deleted at function deletion. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String pubsubTopic; /** * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String retryPolicy; /** * Optional. The hostname of the service that 1st Gen function should be observed. If no string is * provided, the default service implementing the API will be used. For example, * `storage.googleapis.com` is the default for all event types in the `google.storage` namespace. * The field is only applicable to 1st Gen functions. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String service; /** * Optional. The email of the trigger's service account. The service account must have permission * to invoke Cloud Run services, the permission is `run.routes.invoke`. If empty, defaults to the * Compute Engine default service account: * `{project_number}[email protected]`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String serviceAccountEmail; /** * Output only. The resource name of the Eventarc trigger. The format of this field is * `projects/{project}/locations/{region}/triggers/{trigger}`. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String trigger; /** * The region that the trigger will be in. The trigger will only receive events originating in * this region. It can be the same region as the function, a different region or multi-region, or * the global region. If not provided, defaults to the same region as the function. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String triggerRegion; /** * Optional. The name of the channel associated with the trigger in * `projects/{project}/locations/{location}/channels/{channel}` format. You must provide a channel * to receive events from Eventarc SaaS partners. * @return value or {@code null} for none */ public java.lang.String getChannel() { return channel; } /** * Optional. The name of the channel associated with the trigger in * `projects/{project}/locations/{location}/channels/{channel}` format. You must provide a channel * to receive events from Eventarc SaaS partners. * @param channel channel or {@code null} for none */ public EventTrigger setChannel(java.lang.String channel) { this.channel = channel; return this; } /** * Criteria used to filter events. * @return value or {@code null} for none */ public java.util.List getEventFilters() { return eventFilters; } /** * Criteria used to filter events. * @param eventFilters eventFilters or {@code null} for none */ public EventTrigger setEventFilters(java.util.List eventFilters) { this.eventFilters = eventFilters; return this; } /** * Required. The type of event to observe. For example: `google.cloud.audit.log.v1.written` or * `google.cloud.pubsub.topic.v1.messagePublished`. * @return value or {@code null} for none */ public java.lang.String getEventType() { return eventType; } /** * Required. The type of event to observe. For example: `google.cloud.audit.log.v1.written` or * `google.cloud.pubsub.topic.v1.messagePublished`. * @param eventType eventType or {@code null} for none */ public EventTrigger setEventType(java.lang.String eventType) { this.eventType = eventType; return this; } /** * Optional. The name of a Pub/Sub topic in the same project that will be used as the transport * topic for the event delivery. Format: `projects/{project}/topics/{topic}`. This is only valid * for events of type `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here * will not be deleted at function deletion. * @return value or {@code null} for none */ public java.lang.String getPubsubTopic() { return pubsubTopic; } /** * Optional. The name of a Pub/Sub topic in the same project that will be used as the transport * topic for the event delivery. Format: `projects/{project}/topics/{topic}`. This is only valid * for events of type `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here * will not be deleted at function deletion. * @param pubsubTopic pubsubTopic or {@code null} for none */ public EventTrigger setPubsubTopic(java.lang.String pubsubTopic) { this.pubsubTopic = pubsubTopic; return this; } /** * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). * @return value or {@code null} for none */ public java.lang.String getRetryPolicy() { return retryPolicy; } /** * Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). * @param retryPolicy retryPolicy or {@code null} for none */ public EventTrigger setRetryPolicy(java.lang.String retryPolicy) { this.retryPolicy = retryPolicy; return this; } /** * Optional. The hostname of the service that 1st Gen function should be observed. If no string is * provided, the default service implementing the API will be used. For example, * `storage.googleapis.com` is the default for all event types in the `google.storage` namespace. * The field is only applicable to 1st Gen functions. * @return value or {@code null} for none */ public java.lang.String getService() { return service; } /** * Optional. The hostname of the service that 1st Gen function should be observed. If no string is * provided, the default service implementing the API will be used. For example, * `storage.googleapis.com` is the default for all event types in the `google.storage` namespace. * The field is only applicable to 1st Gen functions. * @param service service or {@code null} for none */ public EventTrigger setService(java.lang.String service) { this.service = service; return this; } /** * Optional. The email of the trigger's service account. The service account must have permission * to invoke Cloud Run services, the permission is `run.routes.invoke`. If empty, defaults to the * Compute Engine default service account: * `{project_number}[email protected]`. * @return value or {@code null} for none */ public java.lang.String getServiceAccountEmail() { return serviceAccountEmail; } /** * Optional. The email of the trigger's service account. The service account must have permission * to invoke Cloud Run services, the permission is `run.routes.invoke`. If empty, defaults to the * Compute Engine default service account: * `{project_number}[email protected]`. * @param serviceAccountEmail serviceAccountEmail or {@code null} for none */ public EventTrigger setServiceAccountEmail(java.lang.String serviceAccountEmail) { this.serviceAccountEmail = serviceAccountEmail; return this; } /** * Output only. The resource name of the Eventarc trigger. The format of this field is * `projects/{project}/locations/{region}/triggers/{trigger}`. * @return value or {@code null} for none */ public java.lang.String getTrigger() { return trigger; } /** * Output only. The resource name of the Eventarc trigger. The format of this field is * `projects/{project}/locations/{region}/triggers/{trigger}`. * @param trigger trigger or {@code null} for none */ public EventTrigger setTrigger(java.lang.String trigger) { this.trigger = trigger; return this; } /** * The region that the trigger will be in. The trigger will only receive events originating in * this region. It can be the same region as the function, a different region or multi-region, or * the global region. If not provided, defaults to the same region as the function. * @return value or {@code null} for none */ public java.lang.String getTriggerRegion() { return triggerRegion; } /** * The region that the trigger will be in. The trigger will only receive events originating in * this region. It can be the same region as the function, a different region or multi-region, or * the global region. If not provided, defaults to the same region as the function. * @param triggerRegion triggerRegion or {@code null} for none */ public EventTrigger setTriggerRegion(java.lang.String triggerRegion) { this.triggerRegion = triggerRegion; return this; } @Override public EventTrigger set(String fieldName, Object value) { return (EventTrigger) super.set(fieldName, value); } @Override public EventTrigger clone() { return (EventTrigger) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy