Class SessionInfo.Builder

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

    public static final class SessionInfo.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<SessionInfo.Builder>
    implements SessionInfoOrBuilder
     Represents session information communicated to and from the webhook.
     
    Protobuf type google.cloud.dialogflow.cx.v3.SessionInfo
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<SessionInfo.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<SessionInfo.Builder>
      • internalGetFieldAccessorTable

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

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

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

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

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

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

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

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

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

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

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

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

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

        public SessionInfo.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<SessionInfo.Builder>
        Throws:
        IOException
      • getSession

        public String getSession()
         Always present for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for
         [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The
         unique identifier of the
         [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This
         field can be used by the webhook to identify a session.
         Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
         ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
         ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
         if environment is specified.
         
        string session = 1 [(.google.api.resource_reference) = { ... }
        Specified by:
        getSession in interface SessionInfoOrBuilder
        Returns:
        The session.
      • getSessionBytes

        public com.google.protobuf.ByteString getSessionBytes()
         Always present for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for
         [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The
         unique identifier of the
         [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This
         field can be used by the webhook to identify a session.
         Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
         ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
         ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
         if environment is specified.
         
        string session = 1 [(.google.api.resource_reference) = { ... }
        Specified by:
        getSessionBytes in interface SessionInfoOrBuilder
        Returns:
        The bytes for session.
      • setSession

        public SessionInfo.Builder setSession​(String value)
         Always present for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for
         [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The
         unique identifier of the
         [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This
         field can be used by the webhook to identify a session.
         Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
         ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
         ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
         if environment is specified.
         
        string session = 1 [(.google.api.resource_reference) = { ... }
        Parameters:
        value - The session to set.
        Returns:
        This builder for chaining.
      • clearSession

        public SessionInfo.Builder clearSession()
         Always present for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for
         [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The
         unique identifier of the
         [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This
         field can be used by the webhook to identify a session.
         Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
         ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
         ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
         if environment is specified.
         
        string session = 1 [(.google.api.resource_reference) = { ... }
        Returns:
        This builder for chaining.
      • setSessionBytes

        public SessionInfo.Builder setSessionBytes​(com.google.protobuf.ByteString value)
         Always present for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for
         [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The
         unique identifier of the
         [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This
         field can be used by the webhook to identify a session.
         Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
         ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
         ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
         if environment is specified.
         
        string session = 1 [(.google.api.resource_reference) = { ... }
        Parameters:
        value - The bytes for session to set.
        Returns:
        This builder for chaining.
      • getParametersCount

        public int getParametersCount()
        Description copied from interface: SessionInfoOrBuilder
         Optional for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional
         for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All
         parameters collected from forms and intents during the session. Parameters
         can be created, updated, or removed by the webhook. To remove a parameter
         from the session, the webhook should explicitly set the parameter value to
         null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
         The map is keyed by parameters' display names.
         
        map<string, .google.protobuf.Value> parameters = 2;
        Specified by:
        getParametersCount in interface SessionInfoOrBuilder
      • containsParameters

        public boolean containsParameters​(String key)
         Optional for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional
         for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All
         parameters collected from forms and intents during the session. Parameters
         can be created, updated, or removed by the webhook. To remove a parameter
         from the session, the webhook should explicitly set the parameter value to
         null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
         The map is keyed by parameters' display names.
         
        map<string, .google.protobuf.Value> parameters = 2;
        Specified by:
        containsParameters in interface SessionInfoOrBuilder
      • getParametersMap

        public Map<String,​com.google.protobuf.Value> getParametersMap()
         Optional for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional
         for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All
         parameters collected from forms and intents during the session. Parameters
         can be created, updated, or removed by the webhook. To remove a parameter
         from the session, the webhook should explicitly set the parameter value to
         null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
         The map is keyed by parameters' display names.
         
        map<string, .google.protobuf.Value> parameters = 2;
        Specified by:
        getParametersMap in interface SessionInfoOrBuilder
      • getParametersOrDefault

        public com.google.protobuf.Value getParametersOrDefault​(String key,
                                                                com.google.protobuf.Value defaultValue)
         Optional for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional
         for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All
         parameters collected from forms and intents during the session. Parameters
         can be created, updated, or removed by the webhook. To remove a parameter
         from the session, the webhook should explicitly set the parameter value to
         null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
         The map is keyed by parameters' display names.
         
        map<string, .google.protobuf.Value> parameters = 2;
        Specified by:
        getParametersOrDefault in interface SessionInfoOrBuilder
      • getParametersOrThrow

        public com.google.protobuf.Value getParametersOrThrow​(String key)
         Optional for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional
         for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All
         parameters collected from forms and intents during the session. Parameters
         can be created, updated, or removed by the webhook. To remove a parameter
         from the session, the webhook should explicitly set the parameter value to
         null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
         The map is keyed by parameters' display names.
         
        map<string, .google.protobuf.Value> parameters = 2;
        Specified by:
        getParametersOrThrow in interface SessionInfoOrBuilder
      • removeParameters

        public SessionInfo.Builder removeParameters​(String key)
         Optional for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional
         for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All
         parameters collected from forms and intents during the session. Parameters
         can be created, updated, or removed by the webhook. To remove a parameter
         from the session, the webhook should explicitly set the parameter value to
         null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
         The map is keyed by parameters' display names.
         
        map<string, .google.protobuf.Value> parameters = 2;
      • getMutableParameters

        @Deprecated
        public Map<String,​com.google.protobuf.Value> getMutableParameters()
        Deprecated.
        Use alternate mutation accessors instead.
      • putParameters

        public SessionInfo.Builder putParameters​(String key,
                                                 com.google.protobuf.Value value)
         Optional for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional
         for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All
         parameters collected from forms and intents during the session. Parameters
         can be created, updated, or removed by the webhook. To remove a parameter
         from the session, the webhook should explicitly set the parameter value to
         null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
         The map is keyed by parameters' display names.
         
        map<string, .google.protobuf.Value> parameters = 2;
      • putAllParameters

        public SessionInfo.Builder putAllParameters​(Map<String,​com.google.protobuf.Value> values)
         Optional for
         [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional
         for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. All
         parameters collected from forms and intents during the session. Parameters
         can be created, updated, or removed by the webhook. To remove a parameter
         from the session, the webhook should explicitly set the parameter value to
         null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
         The map is keyed by parameters' display names.
         
        map<string, .google.protobuf.Value> parameters = 2;
      • setUnknownFields

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

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