Class SessionEntityType.Builder

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

    public static final class SessionEntityType.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<SessionEntityType.Builder>
    implements SessionEntityTypeOrBuilder
     A session represents a conversation between a Dialogflow agent and an
     end-user. You can create special entities, called session entities, during a
     session. Session entities can extend or replace custom entity types and only
     exist during the session that they were created for. All session data,
     including session entities, is stored by Dialogflow for 20 minutes.
    
     For more information, see the [session entity
     guide](https://cloud.google.com/dialogflow/docs/entities-session).
     
    Protobuf type google.cloud.dialogflow.v2.SessionEntityType
    • 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<SessionEntityType.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

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

        public String getName()
         Required. The unique identifier of this session entity type. Format:
         `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
         Display Name>`, or `projects/<Project ID>/agent/environments/<Environment
         ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
         Name>`.
         If `Environment ID` is not specified, we assume default 'draft'
         environment. If `User ID` is not specified, we assume default '-' user.
        
         `<Entity Type Display Name>` must be the display name of an existing entity
         type in the same agent that will be overridden or supplemented.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getName in interface SessionEntityTypeOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Required. The unique identifier of this session entity type. Format:
         `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
         Display Name>`, or `projects/<Project ID>/agent/environments/<Environment
         ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
         Name>`.
         If `Environment ID` is not specified, we assume default 'draft'
         environment. If `User ID` is not specified, we assume default '-' user.
        
         `<Entity Type Display Name>` must be the display name of an existing entity
         type in the same agent that will be overridden or supplemented.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getNameBytes in interface SessionEntityTypeOrBuilder
        Returns:
        The bytes for name.
      • setName

        public SessionEntityType.Builder setName​(String value)
         Required. The unique identifier of this session entity type. Format:
         `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
         Display Name>`, or `projects/<Project ID>/agent/environments/<Environment
         ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
         Name>`.
         If `Environment ID` is not specified, we assume default 'draft'
         environment. If `User ID` is not specified, we assume default '-' user.
        
         `<Entity Type Display Name>` must be the display name of an existing entity
         type in the same agent that will be overridden or supplemented.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public SessionEntityType.Builder clearName()
         Required. The unique identifier of this session entity type. Format:
         `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
         Display Name>`, or `projects/<Project ID>/agent/environments/<Environment
         ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
         Name>`.
         If `Environment ID` is not specified, we assume default 'draft'
         environment. If `User ID` is not specified, we assume default '-' user.
        
         `<Entity Type Display Name>` must be the display name of an existing entity
         type in the same agent that will be overridden or supplemented.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setNameBytes

        public SessionEntityType.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Required. The unique identifier of this session entity type. Format:
         `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
         Display Name>`, or `projects/<Project ID>/agent/environments/<Environment
         ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
         Name>`.
         If `Environment ID` is not specified, we assume default 'draft'
         environment. If `User ID` is not specified, we assume default '-' user.
        
         `<Entity Type Display Name>` must be the display name of an existing entity
         type in the same agent that will be overridden or supplemented.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getEntityOverrideModeValue

        public int getEntityOverrideModeValue()
         Required. Indicates whether the additional data should override or
         supplement the custom entity type definition.
         
        .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEntityOverrideModeValue in interface SessionEntityTypeOrBuilder
        Returns:
        The enum numeric value on the wire for entityOverrideMode.
      • setEntityOverrideModeValue

        public SessionEntityType.Builder setEntityOverrideModeValue​(int value)
         Required. Indicates whether the additional data should override or
         supplement the custom entity type definition.
         
        .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The enum numeric value on the wire for entityOverrideMode to set.
        Returns:
        This builder for chaining.
      • getEntityOverrideMode

        public SessionEntityType.EntityOverrideMode getEntityOverrideMode()
         Required. Indicates whether the additional data should override or
         supplement the custom entity type definition.
         
        .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEntityOverrideMode in interface SessionEntityTypeOrBuilder
        Returns:
        The entityOverrideMode.
      • setEntityOverrideMode

        public SessionEntityType.Builder setEntityOverrideMode​(SessionEntityType.EntityOverrideMode value)
         Required. Indicates whether the additional data should override or
         supplement the custom entity type definition.
         
        .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The entityOverrideMode to set.
        Returns:
        This builder for chaining.
      • clearEntityOverrideMode

        public SessionEntityType.Builder clearEntityOverrideMode()
         Required. Indicates whether the additional data should override or
         supplement the custom entity type definition.
         
        .google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode entity_override_mode = 2 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • getEntitiesList

        public List<EntityType.Entity> getEntitiesList()
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEntitiesList in interface SessionEntityTypeOrBuilder
      • getEntitiesCount

        public int getEntitiesCount()
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEntitiesCount in interface SessionEntityTypeOrBuilder
      • getEntities

        public EntityType.Entity getEntities​(int index)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEntities in interface SessionEntityTypeOrBuilder
      • setEntities

        public SessionEntityType.Builder setEntities​(int index,
                                                     EntityType.Entity value)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • setEntities

        public SessionEntityType.Builder setEntities​(int index,
                                                     EntityType.Entity.Builder builderForValue)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • addEntities

        public SessionEntityType.Builder addEntities​(EntityType.Entity value)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • addEntities

        public SessionEntityType.Builder addEntities​(int index,
                                                     EntityType.Entity value)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • addEntities

        public SessionEntityType.Builder addEntities​(EntityType.Entity.Builder builderForValue)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • addEntities

        public SessionEntityType.Builder addEntities​(int index,
                                                     EntityType.Entity.Builder builderForValue)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • addAllEntities

        public SessionEntityType.Builder addAllEntities​(Iterable<? extends EntityType.Entity> values)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • clearEntities

        public SessionEntityType.Builder clearEntities()
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • removeEntities

        public SessionEntityType.Builder removeEntities​(int index)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • getEntitiesBuilder

        public EntityType.Entity.Builder getEntitiesBuilder​(int index)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • getEntitiesOrBuilder

        public EntityType.EntityOrBuilder getEntitiesOrBuilder​(int index)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEntitiesOrBuilder in interface SessionEntityTypeOrBuilder
      • addEntitiesBuilder

        public EntityType.Entity.Builder addEntitiesBuilder()
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • addEntitiesBuilder

        public EntityType.Entity.Builder addEntitiesBuilder​(int index)
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • getEntitiesBuilderList

        public List<EntityType.Entity.Builder> getEntitiesBuilderList()
         Required. The collection of entities associated with this session entity
         type.
         
        repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 3 [(.google.api.field_behavior) = REQUIRED];
      • setUnknownFields

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

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