Class EventInput.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<EventInput.Builder>
com.google.cloud.dialogflow.v2.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.GeneratedMessage.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 Summary

    Modifier and Type
    Method
    Description
     
     
     
    Required.
    Required.
    The collection of parameters associated with the event.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    Required.
    com.google.protobuf.ByteString
    Required.
    Required.
    com.google.protobuf.ByteString
    Required.
    com.google.protobuf.Struct
    The collection of parameters associated with the event.
    com.google.protobuf.Struct.Builder
    The collection of parameters associated with the event.
    com.google.protobuf.StructOrBuilder
    The collection of parameters associated with the event.
    boolean
    The collection of parameters associated with the event.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    mergeParameters(com.google.protobuf.Struct value)
    The collection of parameters associated with the event.
    Required.
    setLanguageCodeBytes(com.google.protobuf.ByteString value)
    Required.
    setName(String value)
    Required.
    setNameBytes(com.google.protobuf.ByteString value)
    Required.
    setParameters(com.google.protobuf.Struct value)
    The collection of parameters associated with the event.
    setParameters(com.google.protobuf.Struct.Builder builderForValue)
    The collection of parameters associated with the event.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

      public EventInput.Builder mergeFrom(EventInput other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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.