Class Environment.Builder (4.61.0)

public static final class Environment.Builder extends GeneratedMessageV3.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:

Protobuf type google.cloud.dialogflow.v2beta1.Environment

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Environment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Environment.Builder
Overrides

build()

public Environment build()
Returns
Type Description
Environment

buildPartial()

public Environment buildPartial()
Returns
Type Description
Environment

clear()

public Environment.Builder clear()
Returns
Type Description
Environment.Builder
Overrides

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
Type Description
Environment.Builder

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
Type Description
Environment.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Environment.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Environment.Builder
Overrides

clearFulfillment()

public Environment.Builder clearFulfillment()

Optional. The fulfillment settings to use for this environment.

.google.cloud.dialogflow.v2beta1.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Environment.Builder

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>

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Environment.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Environment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Environment.Builder
Overrides

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.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Environment.Builder

This builder for chaining.

clearTextToSpeechSettings()

public Environment.Builder clearTextToSpeechSettings()

Optional. Text to speech settings for this environment.

.google.cloud.dialogflow.v2beta1.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Environment.Builder

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];

Returns
Type Description
Environment.Builder

clone()

public Environment.Builder clone()
Returns
Type Description
Environment.Builder
Overrides

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) = { ... }

Returns
Type Description
String

The agentVersion.

getAgentVersionBytes()

public 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) = { ... }

Returns
Type Description
ByteString

The bytes for agentVersion.

getDefaultInstanceForType()

public Environment getDefaultInstanceForType()
Returns
Type Description
Environment

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];

Returns
Type Description
String

The description.

getDescriptionBytes()

public 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];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFulfillment()

public Fulfillment getFulfillment()

Optional. The fulfillment settings to use for this environment.

.google.cloud.dialogflow.v2beta1.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Fulfillment

The fulfillment.

getFulfillmentBuilder()

public Fulfillment.Builder getFulfillmentBuilder()

Optional. The fulfillment settings to use for this environment.

.google.cloud.dialogflow.v2beta1.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Fulfillment.Builder

getFulfillmentOrBuilder()

public FulfillmentOrBuilder getFulfillmentOrBuilder()

Optional. The fulfillment settings to use for this environment.

.google.cloud.dialogflow.v2beta1.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FulfillmentOrBuilder

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>

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public 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>

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

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.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Environment.State

The state.

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.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getTextToSpeechSettings()

public TextToSpeechSettings getTextToSpeechSettings()

Optional. Text to speech settings for this environment.

.google.cloud.dialogflow.v2beta1.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TextToSpeechSettings

The textToSpeechSettings.

getTextToSpeechSettingsBuilder()

public TextToSpeechSettings.Builder getTextToSpeechSettingsBuilder()

Optional. Text to speech settings for this environment.

.google.cloud.dialogflow.v2beta1.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TextToSpeechSettings.Builder

getTextToSpeechSettingsOrBuilder()

public TextToSpeechSettingsOrBuilder getTextToSpeechSettingsOrBuilder()

Optional. Text to speech settings for this environment.

.google.cloud.dialogflow.v2beta1.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TextToSpeechSettingsOrBuilder

getUpdateTime()

public 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];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public 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];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public 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];

Returns
Type Description
TimestampOrBuilder

hasFulfillment()

public boolean hasFulfillment()

Optional. The fulfillment settings to use for this environment.

.google.cloud.dialogflow.v2beta1.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the fulfillment field is set.

hasTextToSpeechSettings()

public boolean hasTextToSpeechSettings()

Optional. Text to speech settings for this environment.

.google.cloud.dialogflow.v2beta1.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the textToSpeechSettings field is set.

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];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Environment other)

public Environment.Builder mergeFrom(Environment other)
Parameter
Name Description
other Environment
Returns
Type Description
Environment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Environment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Environment.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Environment.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Environment.Builder
Overrides

mergeFulfillment(Fulfillment value)

public Environment.Builder mergeFulfillment(Fulfillment value)

Optional. The fulfillment settings to use for this environment.

.google.cloud.dialogflow.v2beta1.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Fulfillment
Returns
Type Description
Environment.Builder

mergeTextToSpeechSettings(TextToSpeechSettings value)

public Environment.Builder mergeTextToSpeechSettings(TextToSpeechSettings value)

Optional. Text to speech settings for this environment.

.google.cloud.dialogflow.v2beta1.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value TextToSpeechSettings
Returns
Type Description
Environment.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Environment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Environment.Builder
Overrides

mergeUpdateTime(Timestamp value)

public Environment.Builder mergeUpdateTime(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];

Parameter
Name Description
value Timestamp
Returns
Type Description
Environment.Builder

setAgentVersion(String value)

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) = { ... }

Parameter
Name Description
value String

The agentVersion to set.

Returns
Type Description
Environment.Builder

This builder for chaining.

setAgentVersionBytes(ByteString value)

public Environment.Builder setAgentVersionBytes(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) = { ... }

Parameter
Name Description
value ByteString

The bytes for agentVersion to set.

Returns
Type Description
Environment.Builder

This builder for chaining.

setDescription(String value)

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];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Environment.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Environment.Builder setDescriptionBytes(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];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Environment.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Environment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Environment.Builder
Overrides

setFulfillment(Fulfillment value)

public Environment.Builder setFulfillment(Fulfillment value)

Optional. The fulfillment settings to use for this environment.

.google.cloud.dialogflow.v2beta1.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Fulfillment
Returns
Type Description
Environment.Builder

setFulfillment(Fulfillment.Builder builderForValue)

public Environment.Builder setFulfillment(Fulfillment.Builder builderForValue)

Optional. The fulfillment settings to use for this environment.

.google.cloud.dialogflow.v2beta1.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Fulfillment.Builder
Returns
Type Description
Environment.Builder

setName(String value)

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>

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Environment.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Environment.Builder setNameBytes(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>

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Environment.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Environment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Environment.Builder
Overrides

setState(Environment.State value)

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.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Environment.State

The state to set.

Returns
Type Description
Environment.Builder

This builder for chaining.

setStateValue(int value)

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.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
Environment.Builder

This builder for chaining.

setTextToSpeechSettings(TextToSpeechSettings value)

public Environment.Builder setTextToSpeechSettings(TextToSpeechSettings value)

Optional. Text to speech settings for this environment.

.google.cloud.dialogflow.v2beta1.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value TextToSpeechSettings
Returns
Type Description
Environment.Builder

setTextToSpeechSettings(TextToSpeechSettings.Builder builderForValue)

public Environment.Builder setTextToSpeechSettings(TextToSpeechSettings.Builder builderForValue)

Optional. Text to speech settings for this environment.

.google.cloud.dialogflow.v2beta1.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue TextToSpeechSettings.Builder
Returns
Type Description
Environment.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Environment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Environment.Builder
Overrides

setUpdateTime(Timestamp value)

public Environment.Builder setUpdateTime(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];

Parameter
Name Description
value Timestamp
Returns
Type Description
Environment.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Environment.Builder setUpdateTime(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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Environment.Builder