Class ProductAttributes.QuestionAndAnswer.Builder (1.23.0)

public static final class ProductAttributes.QuestionAndAnswer.Builder extends GeneratedMessage.Builder<ProductAttributes.QuestionAndAnswer.Builder> implements ProductAttributes.QuestionAndAnswerOrBuilder

The question and answer for the product.

Protobuf type google.shopping.merchant.products.v1.ProductAttributes.QuestionAndAnswer

Static Methods

getDescriptor()

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

Methods

build()

public ProductAttributes.QuestionAndAnswer build()
Returns
Type Description
ProductAttributes.QuestionAndAnswer

buildPartial()

public ProductAttributes.QuestionAndAnswer buildPartial()
Returns
Type Description
ProductAttributes.QuestionAndAnswer

clear()

public ProductAttributes.QuestionAndAnswer.Builder clear()
Returns
Type Description
ProductAttributes.QuestionAndAnswer.Builder
Overrides

clearAnswer()

public ProductAttributes.QuestionAndAnswer.Builder clearAnswer()

Required. The answer text.

string answer = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.QuestionAndAnswer.Builder

This builder for chaining.

clearQuestion()

public ProductAttributes.QuestionAndAnswer.Builder clearQuestion()

Required. The question text.

string question = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProductAttributes.QuestionAndAnswer.Builder

This builder for chaining.

getAnswer()

public String getAnswer()

Required. The answer text.

string answer = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The answer.

getAnswerBytes()

public ByteString getAnswerBytes()

Required. The answer text.

string answer = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for answer.

getDefaultInstanceForType()

public ProductAttributes.QuestionAndAnswer getDefaultInstanceForType()
Returns
Type Description
ProductAttributes.QuestionAndAnswer

getDescriptorForType()

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

getQuestion()

public String getQuestion()

Required. The question text.

string question = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The question.

getQuestionBytes()

public ByteString getQuestionBytes()

Required. The question text.

string question = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for question.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(ProductAttributes.QuestionAndAnswer other)

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

setAnswer(String value)

public ProductAttributes.QuestionAndAnswer.Builder setAnswer(String value)

Required. The answer text.

string answer = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The answer to set.

Returns
Type Description
ProductAttributes.QuestionAndAnswer.Builder

This builder for chaining.

setAnswerBytes(ByteString value)

public ProductAttributes.QuestionAndAnswer.Builder setAnswerBytes(ByteString value)

Required. The answer text.

string answer = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for answer to set.

Returns
Type Description
ProductAttributes.QuestionAndAnswer.Builder

This builder for chaining.

setQuestion(String value)

public ProductAttributes.QuestionAndAnswer.Builder setQuestion(String value)

Required. The question text.

string question = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The question to set.

Returns
Type Description
ProductAttributes.QuestionAndAnswer.Builder

This builder for chaining.

setQuestionBytes(ByteString value)

public ProductAttributes.QuestionAndAnswer.Builder setQuestionBytes(ByteString value)

Required. The question text.

string question = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for question to set.

Returns
Type Description
ProductAttributes.QuestionAndAnswer.Builder

This builder for chaining.