Class Environment.Builder (4.4.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.v2.Environment

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Environment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Environment.Builder
Overrides

build()

public Environment build()
Returns
TypeDescription
Environment

buildPartial()

public Environment buildPartial()
Returns
TypeDescription
Environment

clear()

public Environment.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Environment.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Environment.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Environment.Builder
Overrides

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

Returns
TypeDescription
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> The environment ID for the default environment is -.

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

Returns
TypeDescription
Environment.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Environment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Environment.Builder

This builder for chaining.

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

Returns
TypeDescription
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
TypeDescription
Environment.Builder

clone()

public Environment.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for agentVersion.

getDefaultInstanceForType()

public Environment getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for description.

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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

Returns
TypeDescription
Fulfillment

The fulfillment.

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

Returns
TypeDescription
Fulfillment.Builder

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

Returns
TypeDescription
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> The environment ID for the default environment is -.

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

Returns
TypeDescription
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> The environment ID for the default environment is -.

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

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

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

Returns
TypeDescription
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.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
TextToSpeechSettings

The textToSpeechSettings.

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

Returns
TypeDescription
TextToSpeechSettings.Builder

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

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

Returns
TypeDescription
boolean

Whether the fulfillment field is set.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Environment other)

public Environment.Builder mergeFrom(Environment other)
Parameter
NameDescription
otherEnvironment
Returns
TypeDescription
Environment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Environment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Environment.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Environment.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Environment.Builder
Overrides

mergeFulfillment(Fulfillment value)

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

Parameter
NameDescription
valueFulfillment
Returns
TypeDescription
Environment.Builder

mergeTextToSpeechSettings(TextToSpeechSettings value)

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

Parameter
NameDescription
valueTextToSpeechSettings
Returns
TypeDescription
Environment.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Environment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueString

The agentVersion to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for agentVersion to set.

Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Environment.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Environment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Environment.Builder
Overrides

setFulfillment(Fulfillment value)

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

Parameter
NameDescription
valueFulfillment
Returns
TypeDescription
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.v2.Fulfillment fulfillment = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueFulfillment.Builder
Returns
TypeDescription
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> The environment ID for the default environment is -.

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

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
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> The environment ID for the default environment is -.

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

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueEnvironment.State

The state to set.

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

Parameter
NameDescription
valueint

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

Returns
TypeDescription
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.v2.TextToSpeechSettings text_to_speech_settings = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueTextToSpeechSettings
Returns
TypeDescription
Environment.Builder

setTextToSpeechSettings(TextToSpeechSettings.Builder builderForValue)

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

Parameter
NameDescription
builderForValueTextToSpeechSettings.Builder
Returns
TypeDescription
Environment.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Environment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
Environment.Builder