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.Optioninstance, isBuilt| Modifier and Type | Method and Description |
|---|---|
Option.Builder |
clearName()
The option's name.
|
Option.Builder |
clearValue()
The option's value.
|
String |
getName()
The option's name.
|
ByteString |
getNameBytes()
The option's name.
|
Any |
getValue()
The option's value.
|
boolean |
hasValue()
The option's value.
|
Option.Builder |
mergeValue(Any value)
The option's value.
|
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.
|
Option.Builder |
setValue(Any value)
The option's value.
|
build, buildPartial, clear, clone, copyOnWrite, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFromaddAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultInstanceForType, isInitializedpublic String getName()
The option's name. For example, `"java_package"`.
optional string name = 1;getName in interface OptionOrBuilderpublic ByteString getNameBytes()
The option's name. For example, `"java_package"`.
optional string name = 1;getNameBytes in interface OptionOrBuilderpublic Option.Builder setName(String value)
The option's name. For example, `"java_package"`.
optional string name = 1;public Option.Builder clearName()
The option's name. For example, `"java_package"`.
optional string name = 1;public Option.Builder setNameBytes(ByteString value)
The option's name. For example, `"java_package"`.
optional string name = 1;public boolean hasValue()
The option's value. For example, `"com.google.protobuf"`.
optional .google.protobuf.Any value = 2;hasValue in interface OptionOrBuilderpublic Any getValue()
The option's value. For example, `"com.google.protobuf"`.
optional .google.protobuf.Any value = 2;getValue in interface OptionOrBuilderpublic Option.Builder setValue(Any value)
The option's value. For example, `"com.google.protobuf"`.
optional .google.protobuf.Any value = 2;public Option.Builder setValue(Any.Builder builderForValue)
The option's value. For example, `"com.google.protobuf"`.
optional .google.protobuf.Any value = 2;public Option.Builder mergeValue(Any value)
The option's value. For example, `"com.google.protobuf"`.
optional .google.protobuf.Any value = 2;public Option.Builder clearValue()
The option's value. For example, `"com.google.protobuf"`.
optional .google.protobuf.Any value = 2;Copyright © 2008–2016 Google. All rights reserved.