Class EventInput.Builder

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

    public static final class EventInput.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<EventInput.Builder>
    implements EventInputOrBuilder
     Events allow for matching intents by event name instead of the natural
     language input. For instance, input `<event: { name: "welcome_event",
     parameters: { name: "Sam" } }>` can trigger a personalized welcome response.
     The parameter `name` may be used by the agent in the response:
     `"Hello #welcome_event.name! What can I do for you today?"`.
     
    Protobuf type google.cloud.dialogflow.v2.EventInput
    • 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<EventInput.Builder>
      • clear

        public EventInput.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<EventInput.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<EventInput.Builder>
      • getDefaultInstanceForType

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

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

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

        public EventInput.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<EventInput.Builder>
      • setField

        public EventInput.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<EventInput.Builder>
      • clearField

        public EventInput.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<EventInput.Builder>
      • clearOneof

        public EventInput.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<EventInput.Builder>
      • setRepeatedField

        public EventInput.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<EventInput.Builder>
      • addRepeatedField

        public EventInput.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<EventInput.Builder>
      • mergeFrom

        public EventInput.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<EventInput.Builder>
      • isInitialized

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

        public EventInput.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<EventInput.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Required. The unique identifier of the event.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getName in interface EventInputOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Required. The unique identifier of the event.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getNameBytes in interface EventInputOrBuilder
        Returns:
        The bytes for name.
      • setName

        public EventInput.Builder setName​(String value)
         Required. The unique identifier of the event.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public EventInput.Builder clearName()
         Required. The unique identifier of the event.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setNameBytes

        public EventInput.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Required. The unique identifier of the event.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • hasParameters

        public boolean hasParameters()
         The collection of parameters associated with the event.
        
         Depending on your protocol or client library language, this is a
         map, associative array, symbol table, dictionary, or JSON object
         composed of a collection of (MapKey, MapValue) pairs:
        
         * MapKey type: string
         * MapKey value: parameter name
         * MapValue type: If parameter's entity type is a composite entity then use
         map, otherwise, depending on the parameter value type, it could be one of
         string, number, boolean, null, list or map.
         * MapValue value: If parameter's entity type is a composite entity then use
         map from composite entity property names to property values, otherwise,
         use parameter value.
         
        .google.protobuf.Struct parameters = 2;
        Specified by:
        hasParameters in interface EventInputOrBuilder
        Returns:
        Whether the parameters field is set.
      • getParameters

        public com.google.protobuf.Struct getParameters()
         The collection of parameters associated with the event.
        
         Depending on your protocol or client library language, this is a
         map, associative array, symbol table, dictionary, or JSON object
         composed of a collection of (MapKey, MapValue) pairs:
        
         * MapKey type: string
         * MapKey value: parameter name
         * MapValue type: If parameter's entity type is a composite entity then use
         map, otherwise, depending on the parameter value type, it could be one of
         string, number, boolean, null, list or map.
         * MapValue value: If parameter's entity type is a composite entity then use
         map from composite entity property names to property values, otherwise,
         use parameter value.
         
        .google.protobuf.Struct parameters = 2;
        Specified by:
        getParameters in interface EventInputOrBuilder
        Returns:
        The parameters.
      • setParameters

        public EventInput.Builder setParameters​(com.google.protobuf.Struct value)
         The collection of parameters associated with the event.
        
         Depending on your protocol or client library language, this is a
         map, associative array, symbol table, dictionary, or JSON object
         composed of a collection of (MapKey, MapValue) pairs:
        
         * MapKey type: string
         * MapKey value: parameter name
         * MapValue type: If parameter's entity type is a composite entity then use
         map, otherwise, depending on the parameter value type, it could be one of
         string, number, boolean, null, list or map.
         * MapValue value: If parameter's entity type is a composite entity then use
         map from composite entity property names to property values, otherwise,
         use parameter value.
         
        .google.protobuf.Struct parameters = 2;
      • setParameters

        public EventInput.Builder setParameters​(com.google.protobuf.Struct.Builder builderForValue)
         The collection of parameters associated with the event.
        
         Depending on your protocol or client library language, this is a
         map, associative array, symbol table, dictionary, or JSON object
         composed of a collection of (MapKey, MapValue) pairs:
        
         * MapKey type: string
         * MapKey value: parameter name
         * MapValue type: If parameter's entity type is a composite entity then use
         map, otherwise, depending on the parameter value type, it could be one of
         string, number, boolean, null, list or map.
         * MapValue value: If parameter's entity type is a composite entity then use
         map from composite entity property names to property values, otherwise,
         use parameter value.
         
        .google.protobuf.Struct parameters = 2;
      • mergeParameters

        public EventInput.Builder mergeParameters​(com.google.protobuf.Struct value)
         The collection of parameters associated with the event.
        
         Depending on your protocol or client library language, this is a
         map, associative array, symbol table, dictionary, or JSON object
         composed of a collection of (MapKey, MapValue) pairs:
        
         * MapKey type: string
         * MapKey value: parameter name
         * MapValue type: If parameter's entity type is a composite entity then use
         map, otherwise, depending on the parameter value type, it could be one of
         string, number, boolean, null, list or map.
         * MapValue value: If parameter's entity type is a composite entity then use
         map from composite entity property names to property values, otherwise,
         use parameter value.
         
        .google.protobuf.Struct parameters = 2;
      • clearParameters

        public EventInput.Builder clearParameters()
         The collection of parameters associated with the event.
        
         Depending on your protocol or client library language, this is a
         map, associative array, symbol table, dictionary, or JSON object
         composed of a collection of (MapKey, MapValue) pairs:
        
         * MapKey type: string
         * MapKey value: parameter name
         * MapValue type: If parameter's entity type is a composite entity then use
         map, otherwise, depending on the parameter value type, it could be one of
         string, number, boolean, null, list or map.
         * MapValue value: If parameter's entity type is a composite entity then use
         map from composite entity property names to property values, otherwise,
         use parameter value.
         
        .google.protobuf.Struct parameters = 2;
      • getParametersBuilder

        public com.google.protobuf.Struct.Builder getParametersBuilder()
         The collection of parameters associated with the event.
        
         Depending on your protocol or client library language, this is a
         map, associative array, symbol table, dictionary, or JSON object
         composed of a collection of (MapKey, MapValue) pairs:
        
         * MapKey type: string
         * MapKey value: parameter name
         * MapValue type: If parameter's entity type is a composite entity then use
         map, otherwise, depending on the parameter value type, it could be one of
         string, number, boolean, null, list or map.
         * MapValue value: If parameter's entity type is a composite entity then use
         map from composite entity property names to property values, otherwise,
         use parameter value.
         
        .google.protobuf.Struct parameters = 2;
      • getParametersOrBuilder

        public com.google.protobuf.StructOrBuilder getParametersOrBuilder()
         The collection of parameters associated with the event.
        
         Depending on your protocol or client library language, this is a
         map, associative array, symbol table, dictionary, or JSON object
         composed of a collection of (MapKey, MapValue) pairs:
        
         * MapKey type: string
         * MapKey value: parameter name
         * MapValue type: If parameter's entity type is a composite entity then use
         map, otherwise, depending on the parameter value type, it could be one of
         string, number, boolean, null, list or map.
         * MapValue value: If parameter's entity type is a composite entity then use
         map from composite entity property names to property values, otherwise,
         use parameter value.
         
        .google.protobuf.Struct parameters = 2;
        Specified by:
        getParametersOrBuilder in interface EventInputOrBuilder
      • getLanguageCode

        public String getLanguageCode()
         Required. The language of this query. See [Language
         Support](https://cloud.google.com/dialogflow/docs/reference/language)
         for a list of the currently supported language codes. Note that queries in
         the same session do not necessarily need to specify the same language.
        
         This field is ignored when used in the context of a
         [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input]
         field, because the language was already defined in the originating detect
         intent request.
         
        string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLanguageCode in interface EventInputOrBuilder
        Returns:
        The languageCode.
      • getLanguageCodeBytes

        public com.google.protobuf.ByteString getLanguageCodeBytes()
         Required. The language of this query. See [Language
         Support](https://cloud.google.com/dialogflow/docs/reference/language)
         for a list of the currently supported language codes. Note that queries in
         the same session do not necessarily need to specify the same language.
        
         This field is ignored when used in the context of a
         [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input]
         field, because the language was already defined in the originating detect
         intent request.
         
        string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLanguageCodeBytes in interface EventInputOrBuilder
        Returns:
        The bytes for languageCode.
      • setLanguageCode

        public EventInput.Builder setLanguageCode​(String value)
         Required. The language of this query. See [Language
         Support](https://cloud.google.com/dialogflow/docs/reference/language)
         for a list of the currently supported language codes. Note that queries in
         the same session do not necessarily need to specify the same language.
        
         This field is ignored when used in the context of a
         [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input]
         field, because the language was already defined in the originating detect
         intent request.
         
        string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The languageCode to set.
        Returns:
        This builder for chaining.
      • clearLanguageCode

        public EventInput.Builder clearLanguageCode()
         Required. The language of this query. See [Language
         Support](https://cloud.google.com/dialogflow/docs/reference/language)
         for a list of the currently supported language codes. Note that queries in
         the same session do not necessarily need to specify the same language.
        
         This field is ignored when used in the context of a
         [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input]
         field, because the language was already defined in the originating detect
         intent request.
         
        string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setLanguageCodeBytes

        public EventInput.Builder setLanguageCodeBytes​(com.google.protobuf.ByteString value)
         Required. The language of this query. See [Language
         Support](https://cloud.google.com/dialogflow/docs/reference/language)
         for a list of the currently supported language codes. Note that queries in
         the same session do not necessarily need to specify the same language.
        
         This field is ignored when used in the context of a
         [WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input]
         field, because the language was already defined in the originating detect
         intent request.
         
        string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for languageCode to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final EventInput.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<EventInput.Builder>
      • mergeUnknownFields

        public final EventInput.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<EventInput.Builder>