Class Environment.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Environment.Builder>
com.google.cloud.dialogflow.v2.Environment.Builder
All Implemented Interfaces:
EnvironmentOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Environment

public static final class Environment.Builder extends com.google.protobuf.GeneratedMessage.Builder<Environment.Builder> implements EnvironmentOrBuilder
 You can create multiple versions of your agent and publish them to separate
 environments.

 When you edit an agent, you are editing the draft agent. At any point, you
 can save the draft agent as an agent version, which is an immutable snapshot
 of your agent.

 When you save the draft agent, it is published to the default environment.
 When you create agent versions, you can publish them to custom environments.
 You can create a variety of custom environments for:

 - testing
 - development
 - production
 - etc.

 For more information, see the [versions and environments
 guide](https://cloud.google.com/dialogflow/docs/agents-versions).
 
Protobuf type google.cloud.dialogflow.v2.Environment
  • 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<Environment.Builder>
    • clear

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

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

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

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

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

      public Environment.Builder mergeFrom(Environment other)
    • isInitialized

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

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

      public String getName()
       Output only. The unique identifier of this agent environment.
       Supported formats:
      
       - `projects/<Project ID>/agent/environments/<Environment ID>`
       - `projects/<Project ID>/locations/<Location
       ID>/agent/environments/<Environment ID>`
      
       The environment ID for the default environment is `-`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface EnvironmentOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. The unique identifier of this agent environment.
       Supported formats:
      
       - `projects/<Project ID>/agent/environments/<Environment ID>`
       - `projects/<Project ID>/locations/<Location
       ID>/agent/environments/<Environment ID>`
      
       The environment ID for the default environment is `-`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface EnvironmentOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Environment.Builder setName(String value)
       Output only. The unique identifier of this agent environment.
       Supported formats:
      
       - `projects/<Project ID>/agent/environments/<Environment ID>`
       - `projects/<Project ID>/locations/<Location
       ID>/agent/environments/<Environment ID>`
      
       The environment ID for the default environment is `-`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Environment.Builder clearName()
       Output only. The unique identifier of this agent environment.
       Supported formats:
      
       - `projects/<Project ID>/agent/environments/<Environment ID>`
       - `projects/<Project ID>/locations/<Location
       ID>/agent/environments/<Environment ID>`
      
       The environment ID for the default environment is `-`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Environment.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. The unique identifier of this agent environment.
       Supported formats:
      
       - `projects/<Project ID>/agent/environments/<Environment ID>`
       - `projects/<Project ID>/locations/<Location
       ID>/agent/environments/<Environment ID>`
      
       The environment ID for the default environment is `-`.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Optional. The developer-provided description for this environment.
       The maximum length is 500 characters. If exceeded, the request is rejected.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface EnvironmentOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. The developer-provided description for this environment.
       The maximum length is 500 characters. If exceeded, the request is rejected.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface EnvironmentOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public Environment.Builder setDescription(String value)
       Optional. The developer-provided description for this environment.
       The maximum length is 500 characters. If exceeded, the request is rejected.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public Environment.Builder clearDescription()
       Optional. The developer-provided description for this environment.
       The maximum length is 500 characters. If exceeded, the request is rejected.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public Environment.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. The developer-provided description for this environment.
       The maximum length is 500 characters. If exceeded, the request is rejected.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getAgentVersion

      public String getAgentVersion()
       Optional. The agent version loaded into this environment.
       Supported formats:
      
       - `projects/<Project ID>/agent/versions/<Version ID>`
       - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
       ID>`
       
      string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getAgentVersion in interface EnvironmentOrBuilder
      Returns:
      The agentVersion.
    • getAgentVersionBytes

      public com.google.protobuf.ByteString getAgentVersionBytes()
       Optional. The agent version loaded into this environment.
       Supported formats:
      
       - `projects/<Project ID>/agent/versions/<Version ID>`
       - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
       ID>`
       
      string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getAgentVersionBytes in interface EnvironmentOrBuilder
      Returns:
      The bytes for agentVersion.
    • setAgentVersion

      public Environment.Builder setAgentVersion(String value)
       Optional. The agent version loaded into this environment.
       Supported formats:
      
       - `projects/<Project ID>/agent/versions/<Version ID>`
       - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
       ID>`
       
      string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The agentVersion to set.
      Returns:
      This builder for chaining.
    • clearAgentVersion

      public Environment.Builder clearAgentVersion()
       Optional. The agent version loaded into this environment.
       Supported formats:
      
       - `projects/<Project ID>/agent/versions/<Version ID>`
       - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
       ID>`
       
      string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setAgentVersionBytes

      public Environment.Builder setAgentVersionBytes(com.google.protobuf.ByteString value)
       Optional. The agent version loaded into this environment.
       Supported formats:
      
       - `projects/<Project ID>/agent/versions/<Version ID>`
       - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
       ID>`
       
      string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for agentVersion to set.
      Returns:
      This builder for chaining.
    • getStateValue

      public int getStateValue()
       Output only. The state of this environment. This field is read-only, i.e.,
       it cannot be set by create and update methods.
       
      .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateValue in interface EnvironmentOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      public Environment.Builder setStateValue(int value)
       Output only. The state of this environment. This field is read-only, i.e.,
       it cannot be set by create and update methods.
       
      .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
    • getState

      public Environment.State getState()
       Output only. The state of this environment. This field is read-only, i.e.,
       it cannot be set by create and update methods.
       
      .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getState in interface EnvironmentOrBuilder
      Returns:
      The state.
    • setState

      public Environment.Builder setState(Environment.State value)
       Output only. The state of this environment. This field is read-only, i.e.,
       it cannot be set by create and update methods.
       
      .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

      public Environment.Builder clearState()
       Output only. The state of this environment. This field is read-only, i.e.,
       it cannot be set by create and update methods.
       
      .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The last update time of this environment. This field is
       read-only, i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface EnvironmentOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The last update time of this environment. This field is
       read-only, i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface EnvironmentOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public Environment.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. The last update time of this environment. This field is
       read-only, i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

      public Environment.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The last update time of this environment. This field is
       read-only, i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeUpdateTime

      public Environment.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. The last update time of this environment. This field is
       read-only, i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearUpdateTime

      public Environment.Builder clearUpdateTime()
       Output only. The last update time of this environment. This field is
       read-only, i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. The last update time of this environment. This field is
       read-only, i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The last update time of this environment. This field is
       read-only, i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface EnvironmentOrBuilder
    • hasTextToSpeechSettings

      public boolean hasTextToSpeechSettings()
       Optional. Text to speech settings for this environment.
       
      .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasTextToSpeechSettings in interface EnvironmentOrBuilder
      Returns:
      Whether the textToSpeechSettings field is set.
    • getTextToSpeechSettings

      public TextToSpeechSettings getTextToSpeechSettings()
       Optional. Text to speech settings for this environment.
       
      .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTextToSpeechSettings in interface EnvironmentOrBuilder
      Returns:
      The textToSpeechSettings.
    • setTextToSpeechSettings

      public Environment.Builder setTextToSpeechSettings(TextToSpeechSettings value)
       Optional. Text to speech settings for this environment.
       
      .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];
    • setTextToSpeechSettings

      public Environment.Builder setTextToSpeechSettings(TextToSpeechSettings.Builder builderForValue)
       Optional. Text to speech settings for this environment.
       
      .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];
    • mergeTextToSpeechSettings

      public Environment.Builder mergeTextToSpeechSettings(TextToSpeechSettings value)
       Optional. Text to speech settings for this environment.
       
      .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];
    • clearTextToSpeechSettings

      public Environment.Builder clearTextToSpeechSettings()
       Optional. Text to speech settings for this environment.
       
      .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getTextToSpeechSettingsBuilder

      public TextToSpeechSettings.Builder getTextToSpeechSettingsBuilder()
       Optional. Text to speech settings for this environment.
       
      .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getTextToSpeechSettingsOrBuilder

      public TextToSpeechSettingsOrBuilder getTextToSpeechSettingsOrBuilder()
       Optional. Text to speech settings for this environment.
       
      .google.cloud.dialogflow.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTextToSpeechSettingsOrBuilder in interface EnvironmentOrBuilder
    • hasFulfillment

      public boolean hasFulfillment()
       Optional. The fulfillment settings to use for this environment.
       
      .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasFulfillment in interface EnvironmentOrBuilder
      Returns:
      Whether the fulfillment field is set.
    • getFulfillment

      public Fulfillment getFulfillment()
       Optional. The fulfillment settings to use for this environment.
       
      .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFulfillment in interface EnvironmentOrBuilder
      Returns:
      The fulfillment.
    • setFulfillment

      public Environment.Builder setFulfillment(Fulfillment value)
       Optional. The fulfillment settings to use for this environment.
       
      .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];
    • setFulfillment

      public Environment.Builder setFulfillment(Fulfillment.Builder builderForValue)
       Optional. The fulfillment settings to use for this environment.
       
      .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];
    • mergeFulfillment

      public Environment.Builder mergeFulfillment(Fulfillment value)
       Optional. The fulfillment settings to use for this environment.
       
      .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];
    • clearFulfillment

      public Environment.Builder clearFulfillment()
       Optional. The fulfillment settings to use for this environment.
       
      .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];
    • getFulfillmentBuilder

      public Fulfillment.Builder getFulfillmentBuilder()
       Optional. The fulfillment settings to use for this environment.
       
      .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];
    • getFulfillmentOrBuilder

      public FulfillmentOrBuilder getFulfillmentOrBuilder()
       Optional. The fulfillment settings to use for this environment.
       
      .google.cloud.dialogflow.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFulfillmentOrBuilder in interface EnvironmentOrBuilder