Class EventTrigger.Builder

  • All Implemented Interfaces:
    EventTriggerOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    EventTrigger

    public static final class EventTrigger.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
    implements EventTriggerOrBuilder
     Describes EventTrigger, used to request that events be sent from another
     service.
     
    Protobuf type google.cloud.functions.v1.EventTrigger
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • clear

        public EventTrigger.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • getDefaultInstanceForType

        public EventTrigger getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public EventTrigger build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public EventTrigger buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public EventTrigger.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • setField

        public EventTrigger.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • clearField

        public EventTrigger.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • clearOneof

        public EventTrigger.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • setRepeatedField

        public EventTrigger.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     int index,
                                                     Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • addRepeatedField

        public EventTrigger.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • mergeFrom

        public EventTrigger.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EventTrigger.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • mergeFrom

        public EventTrigger.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EventTrigger.Builder>
        Throws:
        IOException
      • getEventType

        public String getEventType()
         Required. The type of event to observe. For example:
         `providers/cloud.storage/eventTypes/object.change` and
         `providers/cloud.pubsub/eventTypes/topic.publish`.
        
         Event types match pattern `providers/*/eventTypes/*.*`.
         The pattern contains:
        
         1. namespace: For example, `cloud.storage` and
            `google.firebase.analytics`.
         2. resource type: The type of resource on which event occurs. For
            example, the Google Cloud Storage API includes the type `object`.
         3. action: The action that generates the event. For example, action for
            a Google Cloud Storage Object is 'change'.
         These parts are lowercase.
         
        string event_type = 1;
        Specified by:
        getEventType in interface EventTriggerOrBuilder
        Returns:
        The eventType.
      • getEventTypeBytes

        public com.google.protobuf.ByteString getEventTypeBytes()
         Required. The type of event to observe. For example:
         `providers/cloud.storage/eventTypes/object.change` and
         `providers/cloud.pubsub/eventTypes/topic.publish`.
        
         Event types match pattern `providers/*/eventTypes/*.*`.
         The pattern contains:
        
         1. namespace: For example, `cloud.storage` and
            `google.firebase.analytics`.
         2. resource type: The type of resource on which event occurs. For
            example, the Google Cloud Storage API includes the type `object`.
         3. action: The action that generates the event. For example, action for
            a Google Cloud Storage Object is 'change'.
         These parts are lowercase.
         
        string event_type = 1;
        Specified by:
        getEventTypeBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for eventType.
      • setEventType

        public EventTrigger.Builder setEventType​(String value)
         Required. The type of event to observe. For example:
         `providers/cloud.storage/eventTypes/object.change` and
         `providers/cloud.pubsub/eventTypes/topic.publish`.
        
         Event types match pattern `providers/*/eventTypes/*.*`.
         The pattern contains:
        
         1. namespace: For example, `cloud.storage` and
            `google.firebase.analytics`.
         2. resource type: The type of resource on which event occurs. For
            example, the Google Cloud Storage API includes the type `object`.
         3. action: The action that generates the event. For example, action for
            a Google Cloud Storage Object is 'change'.
         These parts are lowercase.
         
        string event_type = 1;
        Parameters:
        value - The eventType to set.
        Returns:
        This builder for chaining.
      • clearEventType

        public EventTrigger.Builder clearEventType()
         Required. The type of event to observe. For example:
         `providers/cloud.storage/eventTypes/object.change` and
         `providers/cloud.pubsub/eventTypes/topic.publish`.
        
         Event types match pattern `providers/*/eventTypes/*.*`.
         The pattern contains:
        
         1. namespace: For example, `cloud.storage` and
            `google.firebase.analytics`.
         2. resource type: The type of resource on which event occurs. For
            example, the Google Cloud Storage API includes the type `object`.
         3. action: The action that generates the event. For example, action for
            a Google Cloud Storage Object is 'change'.
         These parts are lowercase.
         
        string event_type = 1;
        Returns:
        This builder for chaining.
      • setEventTypeBytes

        public EventTrigger.Builder setEventTypeBytes​(com.google.protobuf.ByteString value)
         Required. The type of event to observe. For example:
         `providers/cloud.storage/eventTypes/object.change` and
         `providers/cloud.pubsub/eventTypes/topic.publish`.
        
         Event types match pattern `providers/*/eventTypes/*.*`.
         The pattern contains:
        
         1. namespace: For example, `cloud.storage` and
            `google.firebase.analytics`.
         2. resource type: The type of resource on which event occurs. For
            example, the Google Cloud Storage API includes the type `object`.
         3. action: The action that generates the event. For example, action for
            a Google Cloud Storage Object is 'change'.
         These parts are lowercase.
         
        string event_type = 1;
        Parameters:
        value - The bytes for eventType to set.
        Returns:
        This builder for chaining.
      • getResource

        public String getResource()
         Required. The resource(s) from which to observe events, for example,
         `projects/_/buckets/myBucket`.
        
         Not all syntactically correct values are accepted by all services. For
         example:
        
         1. The authorization model must support it. Google Cloud Functions
            only allows EventTriggers to be deployed that observe resources in the
            same project as the `CloudFunction`.
         2. The resource type must match the pattern expected for an
            `event_type`. For example, an `EventTrigger` that has an
            `event_type` of "google.pubsub.topic.publish" should have a resource
            that matches Google Cloud Pub/Sub topics.
        
         Additionally, some services may support short names when creating an
         `EventTrigger`. These are always returned in the normalized "long"
         format.
        
         See each *service's* documentation for supported formats.
         
        string resource = 2;
        Specified by:
        getResource in interface EventTriggerOrBuilder
        Returns:
        The resource.
      • getResourceBytes

        public com.google.protobuf.ByteString getResourceBytes()
         Required. The resource(s) from which to observe events, for example,
         `projects/_/buckets/myBucket`.
        
         Not all syntactically correct values are accepted by all services. For
         example:
        
         1. The authorization model must support it. Google Cloud Functions
            only allows EventTriggers to be deployed that observe resources in the
            same project as the `CloudFunction`.
         2. The resource type must match the pattern expected for an
            `event_type`. For example, an `EventTrigger` that has an
            `event_type` of "google.pubsub.topic.publish" should have a resource
            that matches Google Cloud Pub/Sub topics.
        
         Additionally, some services may support short names when creating an
         `EventTrigger`. These are always returned in the normalized "long"
         format.
        
         See each *service's* documentation for supported formats.
         
        string resource = 2;
        Specified by:
        getResourceBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for resource.
      • setResource

        public EventTrigger.Builder setResource​(String value)
         Required. The resource(s) from which to observe events, for example,
         `projects/_/buckets/myBucket`.
        
         Not all syntactically correct values are accepted by all services. For
         example:
        
         1. The authorization model must support it. Google Cloud Functions
            only allows EventTriggers to be deployed that observe resources in the
            same project as the `CloudFunction`.
         2. The resource type must match the pattern expected for an
            `event_type`. For example, an `EventTrigger` that has an
            `event_type` of "google.pubsub.topic.publish" should have a resource
            that matches Google Cloud Pub/Sub topics.
        
         Additionally, some services may support short names when creating an
         `EventTrigger`. These are always returned in the normalized "long"
         format.
        
         See each *service's* documentation for supported formats.
         
        string resource = 2;
        Parameters:
        value - The resource to set.
        Returns:
        This builder for chaining.
      • clearResource

        public EventTrigger.Builder clearResource()
         Required. The resource(s) from which to observe events, for example,
         `projects/_/buckets/myBucket`.
        
         Not all syntactically correct values are accepted by all services. For
         example:
        
         1. The authorization model must support it. Google Cloud Functions
            only allows EventTriggers to be deployed that observe resources in the
            same project as the `CloudFunction`.
         2. The resource type must match the pattern expected for an
            `event_type`. For example, an `EventTrigger` that has an
            `event_type` of "google.pubsub.topic.publish" should have a resource
            that matches Google Cloud Pub/Sub topics.
        
         Additionally, some services may support short names when creating an
         `EventTrigger`. These are always returned in the normalized "long"
         format.
        
         See each *service's* documentation for supported formats.
         
        string resource = 2;
        Returns:
        This builder for chaining.
      • setResourceBytes

        public EventTrigger.Builder setResourceBytes​(com.google.protobuf.ByteString value)
         Required. The resource(s) from which to observe events, for example,
         `projects/_/buckets/myBucket`.
        
         Not all syntactically correct values are accepted by all services. For
         example:
        
         1. The authorization model must support it. Google Cloud Functions
            only allows EventTriggers to be deployed that observe resources in the
            same project as the `CloudFunction`.
         2. The resource type must match the pattern expected for an
            `event_type`. For example, an `EventTrigger` that has an
            `event_type` of "google.pubsub.topic.publish" should have a resource
            that matches Google Cloud Pub/Sub topics.
        
         Additionally, some services may support short names when creating an
         `EventTrigger`. These are always returned in the normalized "long"
         format.
        
         See each *service's* documentation for supported formats.
         
        string resource = 2;
        Parameters:
        value - The bytes for resource to set.
        Returns:
        This builder for chaining.
      • getService

        public String getService()
         The hostname of the service that 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.
         
        string service = 3;
        Specified by:
        getService in interface EventTriggerOrBuilder
        Returns:
        The service.
      • getServiceBytes

        public com.google.protobuf.ByteString getServiceBytes()
         The hostname of the service that 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.
         
        string service = 3;
        Specified by:
        getServiceBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for service.
      • setService

        public EventTrigger.Builder setService​(String value)
         The hostname of the service that 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.
         
        string service = 3;
        Parameters:
        value - The service to set.
        Returns:
        This builder for chaining.
      • clearService

        public EventTrigger.Builder clearService()
         The hostname of the service that 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.
         
        string service = 3;
        Returns:
        This builder for chaining.
      • setServiceBytes

        public EventTrigger.Builder setServiceBytes​(com.google.protobuf.ByteString value)
         The hostname of the service that 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.
         
        string service = 3;
        Parameters:
        value - The bytes for service to set.
        Returns:
        This builder for chaining.
      • hasFailurePolicy

        public boolean hasFailurePolicy()
         Specifies policy for failed executions.
         
        .google.cloud.functions.v1.FailurePolicy failure_policy = 5;
        Specified by:
        hasFailurePolicy in interface EventTriggerOrBuilder
        Returns:
        Whether the failurePolicy field is set.
      • getFailurePolicy

        public FailurePolicy getFailurePolicy()
         Specifies policy for failed executions.
         
        .google.cloud.functions.v1.FailurePolicy failure_policy = 5;
        Specified by:
        getFailurePolicy in interface EventTriggerOrBuilder
        Returns:
        The failurePolicy.
      • setFailurePolicy

        public EventTrigger.Builder setFailurePolicy​(FailurePolicy value)
         Specifies policy for failed executions.
         
        .google.cloud.functions.v1.FailurePolicy failure_policy = 5;
      • setFailurePolicy

        public EventTrigger.Builder setFailurePolicy​(FailurePolicy.Builder builderForValue)
         Specifies policy for failed executions.
         
        .google.cloud.functions.v1.FailurePolicy failure_policy = 5;
      • mergeFailurePolicy

        public EventTrigger.Builder mergeFailurePolicy​(FailurePolicy value)
         Specifies policy for failed executions.
         
        .google.cloud.functions.v1.FailurePolicy failure_policy = 5;
      • clearFailurePolicy

        public EventTrigger.Builder clearFailurePolicy()
         Specifies policy for failed executions.
         
        .google.cloud.functions.v1.FailurePolicy failure_policy = 5;
      • getFailurePolicyBuilder

        public FailurePolicy.Builder getFailurePolicyBuilder()
         Specifies policy for failed executions.
         
        .google.cloud.functions.v1.FailurePolicy failure_policy = 5;
      • setUnknownFields

        public final EventTrigger.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>
      • mergeUnknownFields

        public final EventTrigger.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<EventTrigger.Builder>