Class Comment.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Comment.Builder>
com.google.cloud.gdchardwaremanagement.v1alpha.Comment.Builder
All Implemented Interfaces:
CommentOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Comment

public static final class Comment.Builder extends com.google.protobuf.GeneratedMessage.Builder<Comment.Builder> implements CommentOrBuilder
 A comment on an order.
 
Protobuf type google.cloud.gdchardwaremanagement.v1alpha.Comment
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Comment.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Comment.Builder>
    • internalGetFieldAccessorTable

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

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

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

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

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

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

      public Comment.Builder mergeFrom(Comment other)
    • isInitialized

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

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

      public String getName()
       Identifier. Name of this comment.
       Format:
       `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface CommentOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. Name of this comment.
       Format:
       `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface CommentOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Comment.Builder setName(String value)
       Identifier. Name of this comment.
       Format:
       `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Comment.Builder clearName()
       Identifier. Name of this comment.
       Format:
       `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Comment.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. Name of this comment.
       Format:
       `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Time when this comment was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface CommentOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Time when this comment was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface CommentOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public Comment.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Time when this comment was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public Comment.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Time when this comment was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public Comment.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. Time when this comment was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public Comment.Builder clearCreateTime()
       Output only. Time when this comment was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. Time when this comment was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Time when this comment was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface CommentOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: CommentOrBuilder
       Optional. Labels associated with this comment as key value pairs.
       For more information about labels, see [Create and manage
       labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
       
      map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsCount in interface CommentOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Optional. Labels associated with this comment as key value pairs.
       For more information about labels, see [Create and manage
       labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
       
      map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsLabels in interface CommentOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface CommentOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Optional. Labels associated with this comment as key value pairs.
       For more information about labels, see [Create and manage
       labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
       
      map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsMap in interface CommentOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Optional. Labels associated with this comment as key value pairs.
       For more information about labels, see [Create and manage
       labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
       
      map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrDefault in interface CommentOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Optional. Labels associated with this comment as key value pairs.
       For more information about labels, see [Create and manage
       labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
       
      map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrThrow in interface CommentOrBuilder
    • clearLabels

      public Comment.Builder clearLabels()
    • removeLabels

      public Comment.Builder removeLabels(String key)
       Optional. Labels associated with this comment as key value pairs.
       For more information about labels, see [Create and manage
       labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
       
      map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public Comment.Builder putLabels(String key, String value)
       Optional. Labels associated with this comment as key value pairs.
       For more information about labels, see [Create and manage
       labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
       
      map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
    • putAllLabels

      public Comment.Builder putAllLabels(Map<String,String> values)
       Optional. Labels associated with this comment as key value pairs.
       For more information about labels, see [Create and manage
       labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels).
       
      map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
    • getAuthor

      public String getAuthor()
       Output only. Username of the author of this comment. This is auto-populated
       from the credentials used during creation of the comment.
       
      string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getAuthor in interface CommentOrBuilder
      Returns:
      The author.
    • getAuthorBytes

      public com.google.protobuf.ByteString getAuthorBytes()
       Output only. Username of the author of this comment. This is auto-populated
       from the credentials used during creation of the comment.
       
      string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getAuthorBytes in interface CommentOrBuilder
      Returns:
      The bytes for author.
    • setAuthor

      public Comment.Builder setAuthor(String value)
       Output only. Username of the author of this comment. This is auto-populated
       from the credentials used during creation of the comment.
       
      string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The author to set.
      Returns:
      This builder for chaining.
    • clearAuthor

      public Comment.Builder clearAuthor()
       Output only. Username of the author of this comment. This is auto-populated
       from the credentials used during creation of the comment.
       
      string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setAuthorBytes

      public Comment.Builder setAuthorBytes(com.google.protobuf.ByteString value)
       Output only. Username of the author of this comment. This is auto-populated
       from the credentials used during creation of the comment.
       
      string author = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for author to set.
      Returns:
      This builder for chaining.
    • getText

      public String getText()
       Required. Text of this comment. The length of text must be <= 1000
       characters.
       
      string text = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getText in interface CommentOrBuilder
      Returns:
      The text.
    • getTextBytes

      public com.google.protobuf.ByteString getTextBytes()
       Required. Text of this comment. The length of text must be <= 1000
       characters.
       
      string text = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTextBytes in interface CommentOrBuilder
      Returns:
      The bytes for text.
    • setText

      public Comment.Builder setText(String value)
       Required. Text of this comment. The length of text must be <= 1000
       characters.
       
      string text = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The text to set.
      Returns:
      This builder for chaining.
    • clearText

      public Comment.Builder clearText()
       Required. Text of this comment. The length of text must be <= 1000
       characters.
       
      string text = 5 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setTextBytes

      public Comment.Builder setTextBytes(com.google.protobuf.ByteString value)
       Required. Text of this comment. The length of text must be <= 1000
       characters.
       
      string text = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for text to set.
      Returns:
      This builder for chaining.
    • hasCustomerViewedTime

      public boolean hasCustomerViewedTime()
       Output only. Timestamp of the first time this comment was viewed by the
       customer. If the comment wasn't viewed then this timestamp will be unset.
       
      .google.protobuf.Timestamp customer_viewed_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCustomerViewedTime in interface CommentOrBuilder
      Returns:
      Whether the customerViewedTime field is set.
    • getCustomerViewedTime

      public com.google.protobuf.Timestamp getCustomerViewedTime()
       Output only. Timestamp of the first time this comment was viewed by the
       customer. If the comment wasn't viewed then this timestamp will be unset.
       
      .google.protobuf.Timestamp customer_viewed_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCustomerViewedTime in interface CommentOrBuilder
      Returns:
      The customerViewedTime.
    • setCustomerViewedTime

      public Comment.Builder setCustomerViewedTime(com.google.protobuf.Timestamp value)
       Output only. Timestamp of the first time this comment was viewed by the
       customer. If the comment wasn't viewed then this timestamp will be unset.
       
      .google.protobuf.Timestamp customer_viewed_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCustomerViewedTime

      public Comment.Builder setCustomerViewedTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Timestamp of the first time this comment was viewed by the
       customer. If the comment wasn't viewed then this timestamp will be unset.
       
      .google.protobuf.Timestamp customer_viewed_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCustomerViewedTime

      public Comment.Builder mergeCustomerViewedTime(com.google.protobuf.Timestamp value)
       Output only. Timestamp of the first time this comment was viewed by the
       customer. If the comment wasn't viewed then this timestamp will be unset.
       
      .google.protobuf.Timestamp customer_viewed_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCustomerViewedTime

      public Comment.Builder clearCustomerViewedTime()
       Output only. Timestamp of the first time this comment was viewed by the
       customer. If the comment wasn't viewed then this timestamp will be unset.
       
      .google.protobuf.Timestamp customer_viewed_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCustomerViewedTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCustomerViewedTimeBuilder()
       Output only. Timestamp of the first time this comment was viewed by the
       customer. If the comment wasn't viewed then this timestamp will be unset.
       
      .google.protobuf.Timestamp customer_viewed_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCustomerViewedTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCustomerViewedTimeOrBuilder()
       Output only. Timestamp of the first time this comment was viewed by the
       customer. If the comment wasn't viewed then this timestamp will be unset.
       
      .google.protobuf.Timestamp customer_viewed_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCustomerViewedTimeOrBuilder in interface CommentOrBuilder
    • getAuthorEntityValue

      public int getAuthorEntityValue()
       Output only. The entity the author belongs to.
       
      .google.cloud.gdchardwaremanagement.v1alpha.Entity author_entity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getAuthorEntityValue in interface CommentOrBuilder
      Returns:
      The enum numeric value on the wire for authorEntity.
    • setAuthorEntityValue

      public Comment.Builder setAuthorEntityValue(int value)
       Output only. The entity the author belongs to.
       
      .google.cloud.gdchardwaremanagement.v1alpha.Entity author_entity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for authorEntity to set.
      Returns:
      This builder for chaining.
    • getAuthorEntity

      public Entity getAuthorEntity()
       Output only. The entity the author belongs to.
       
      .google.cloud.gdchardwaremanagement.v1alpha.Entity author_entity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getAuthorEntity in interface CommentOrBuilder
      Returns:
      The authorEntity.
    • setAuthorEntity

      public Comment.Builder setAuthorEntity(Entity value)
       Output only. The entity the author belongs to.
       
      .google.cloud.gdchardwaremanagement.v1alpha.Entity author_entity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The authorEntity to set.
      Returns:
      This builder for chaining.
    • clearAuthorEntity

      public Comment.Builder clearAuthorEntity()
       Output only. The entity the author belongs to.
       
      .google.cloud.gdchardwaremanagement.v1alpha.Entity author_entity = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.