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
instance, isBuilt
Modifier and Type | Method and Description |
---|---|
Option.Builder |
clearName()
The option's name.
|
Option.Builder |
clearValue()
The option's value packed in an Any message.
|
String |
getName()
The option's name.
|
ByteString |
getNameBytes()
The option's name.
|
Any |
getValue()
The option's value packed in an Any message.
|
boolean |
hasValue()
The option's value packed in an Any message.
|
Option.Builder |
mergeValue(Any value)
The option's value packed in an Any message.
|
Option.Builder |
setName(String value)
The option's name.
|
Option.Builder |
setNameBytes(ByteString value)
The option's name.
|
Option.Builder |
setValue(Any.Builder builderForValue)
The option's value packed in an Any message.
|
Option.Builder |
setValue(Any value)
The option's value packed in an Any message.
|
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefaultInstanceForType, isInitialized
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;
getName
in interface OptionOrBuilder
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;
getNameBytes
in interface OptionOrBuilder
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;
value
- The name to set.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;
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;
value
- The bytes for name to set.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;
hasValue
in interface OptionOrBuilder
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;
getValue
in interface OptionOrBuilder
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;
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;
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;
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;
Copyright © 2008–2022. All rights reserved.