public
static
final
class
Option
.
Builder
extends
GeneratedMessageLite
.
Builder<Option
,
Option
.
Builder
>
implements
OptionOrBuilder
A protocol buffer option, which can be attached to a message, field, enumeration, etc.
Protobuf type google.protobuf.Option
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > GeneratedMessageLite.Builder > Option.BuilderImplements
OptionOrBuilderMethods
clearName()
public
Option
.
Builder
clearName
()
The option's name. For protobuf built-in options (options defined in
descriptor.proto), this is the short name. For example, "map_entry"
.
For custom options, it should be the fully-qualified name. For example, "google.api.http"
.
string name = 1;
clearValue()
public
Option
.
Builder
clearValue
()
The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.
.google.protobuf.Any value = 2;
getName()
public
String
getName
()
The option's name. For protobuf built-in options (options defined in
descriptor.proto), this is the short name. For example, "map_entry"
.
For custom options, it should be the fully-qualified name. For example, "google.api.http"
.
string name = 1;
getNameBytes()
public
ByteString
getNameBytes
()
The option's name. For protobuf built-in options (options defined in
descriptor.proto), this is the short name. For example, "map_entry"
.
For custom options, it should be the fully-qualified name. For example, "google.api.http"
.
string name = 1;
getValue()
public
Any
getValue
()
The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.
.google.protobuf.Any value = 2;
hasValue()
public
boolean
hasValue
()
The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.
.google.protobuf.Any value = 2;
mergeValue(Any value)
public
Option
.
Builder
mergeValue
(
Any
value
)
The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.
.google.protobuf.Any value = 2;
setName(String value)
public
Option
.
Builder
setName
(
String
value
)
The option's name. For protobuf built-in options (options defined in
descriptor.proto), this is the short name. For example, "map_entry"
.
For custom options, it should be the fully-qualified name. For example, "google.api.http"
.
string name = 1;
setNameBytes(ByteString value)
public
Option
.
Builder
setNameBytes
(
ByteString
value
)
The option's name. For protobuf built-in options (options defined in
descriptor.proto), this is the short name. For example, "map_entry"
.
For custom options, it should be the fully-qualified name. For example, "google.api.http"
.
string name = 1;
setValue(Any value)
public
Option
.
Builder
setValue
(
Any
value
)
The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.
.google.protobuf.Any value = 2;
setValue(Any.Builder builderForValue)
public
Option
.
Builder
setValue
(
Any
.
Builder
builderForValue
)
The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.
.google.protobuf.Any value = 2;