Class Version.Builder

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

public static final class Version.Builder extends com.google.protobuf.GeneratedMessage.Builder<Version.Builder> implements VersionOrBuilder
 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.Version
  • 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<Version.Builder>
    • clear

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

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

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

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

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

      public Version.Builder mergeFrom(Version other)
    • isInitialized

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

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

      public String getName()
       Output only. The unique identifier of this agent version.
       Supported formats:
      
       - `projects/<Project ID>/agent/versions/<Version ID>`
       - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
       ID>`
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface VersionOrBuilder
      Returns:
      The name.
    • getNameBytes

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

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

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

      public Version.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. The unique identifier of this agent version.
       Supported formats:
      
       - `projects/<Project ID>/agent/versions/<Version ID>`
       - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
       ID>`
       
      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 of this version.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface VersionOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. The developer-provided description of this version.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface VersionOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public Version.Builder setDescription(String value)
       Optional. The developer-provided description of this version.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public Version.Builder clearDescription()
       Optional. The developer-provided description of this version.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public Version.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. The developer-provided description of this version.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getVersionNumber

      public int getVersionNumber()
       Output only. The sequential number of this version. This field is read-only
       which means it cannot be set by create and update methods.
       
      int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getVersionNumber in interface VersionOrBuilder
      Returns:
      The versionNumber.
    • setVersionNumber

      public Version.Builder setVersionNumber(int value)
       Output only. The sequential number of this version. This field is read-only
       which means it cannot be set by create and update methods.
       
      int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The versionNumber to set.
      Returns:
      This builder for chaining.
    • clearVersionNumber

      public Version.Builder clearVersionNumber()
       Output only. The sequential number of this version. This field is read-only
       which means it cannot be set by create and update methods.
       
      int32 version_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The creation time of this version. This field is read-only,
       i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface VersionOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The creation time of this version. This field is read-only,
       i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface VersionOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public Version.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. The creation time of this version. This field is read-only,
       i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public Version.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The creation time of this version. This field is read-only,
       i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public Version.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. The creation time of this version. This field is read-only,
       i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public Version.Builder clearCreateTime()
       Output only. The creation time of this version. This field is read-only,
       i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. The creation time of this version. This field is read-only,
       i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The creation time of this version. This field is read-only,
       i.e., it cannot be set by create and update methods.
       
      .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface VersionOrBuilder
    • getStatusValue

      public int getStatusValue()
       Output only. The status of this version. This field is read-only and cannot
       be set by create and update methods.
       
      .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStatusValue in interface VersionOrBuilder
      Returns:
      The enum numeric value on the wire for status.
    • setStatusValue

      public Version.Builder setStatusValue(int value)
       Output only. The status of this version. This field is read-only and cannot
       be set by create and update methods.
       
      .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for status to set.
      Returns:
      This builder for chaining.
    • getStatus

      public Version.VersionStatus getStatus()
       Output only. The status of this version. This field is read-only and cannot
       be set by create and update methods.
       
      .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStatus in interface VersionOrBuilder
      Returns:
      The status.
    • setStatus

      public Version.Builder setStatus(Version.VersionStatus value)
       Output only. The status of this version. This field is read-only and cannot
       be set by create and update methods.
       
      .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The status to set.
      Returns:
      This builder for chaining.
    • clearStatus

      public Version.Builder clearStatus()
       Output only. The status of this version. This field is read-only and cannot
       be set by create and update methods.
       
      .google.cloud.dialogflow.v2.Version.VersionStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.