Class Comment.Builder (0.1.0)

public static final class Comment.Builder extends GeneratedMessageV3.Builder<Comment.Builder> implements CommentOrBuilder

A comment on an order.

Protobuf type google.cloud.gdchardwaremanagement.v1alpha.Comment

Implements

CommentOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Comment build()
Returns
Type Description
Comment

buildPartial()

public Comment buildPartial()
Returns
Type Description
Comment

clear()

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

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

This builder for chaining.

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

Returns
Type Description
Comment.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

public Comment.Builder clearLabels()
Returns
Type Description
Comment.Builder

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

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

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

This builder for chaining.

clone()

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

containsLabels(String key)

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.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

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

Returns
Type Description
String

The author.

getAuthorBytes()

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

Returns
Type Description
ByteString

The bytes for author.

getCreateTime()

public Timestamp getCreateTime()

Output only. Time when this comment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time when this comment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time when this comment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Comment getDefaultInstanceForType()
Returns
Type Description
Comment

getDescriptorForType()

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

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. Labels associated with this comment as key value pairs. For more information about labels, see Create and manage labels.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

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.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

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.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

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.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Name of this comment. Format: projects/{project}/locations/{location}/orders/{order}/comments/{comment}

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

Returns
Type Description
ByteString

The bytes for name.

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

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

Required. Text of this comment. The length of text must be <= 1000 characters.

string text = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for text.

hasCreateTime()

public boolean hasCreateTime()

Output only. Time when this comment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Comment.Builder mergeCreateTime(Timestamp value)

Output only. Time when this comment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Comment.Builder

mergeFrom(Comment other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

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.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
Comment.Builder

putLabels(String key, String value)

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.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
Comment.Builder

removeLabels(String key)

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.

map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
Comment.Builder

setAuthor(String value)

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

Parameter
Name Description
value String

The author to set.

Returns
Type Description
Comment.Builder

This builder for chaining.

setAuthorBytes(ByteString value)

public Comment.Builder setAuthorBytes(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];

Parameter
Name Description
value ByteString

The bytes for author to set.

Returns
Type Description
Comment.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public Comment.Builder setCreateTime(Timestamp value)

Output only. Time when this comment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Comment.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Comment.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Time when this comment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Comment.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Comment.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Comment.Builder setNameBytes(ByteString value)

Identifier. Name of this comment. Format: projects/{project}/locations/{location}/orders/{order}/comments/{comment}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Comment.Builder

This builder for chaining.

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

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

setText(String value)

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

Parameter
Name Description
value String

The text to set.

Returns
Type Description
Comment.Builder

This builder for chaining.

setTextBytes(ByteString value)

public Comment.Builder setTextBytes(ByteString value)

Required. Text of this comment. The length of text must be <= 1000 characters.

string text = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for text to set.

Returns
Type Description
Comment.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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