public static final class Method.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder> implements MethodOrBuilder
Method represents a method of an API interface.Protobuf type
google.protobuf.Method| Modifier and Type | Method and Description |
|---|---|
Method.Builder |
addAllOptions(java.lang.Iterable<? extends Option> values)
Any metadata attached to the method.
|
Method.Builder |
addOptions(int index,
Option.Builder builderForValue)
Any metadata attached to the method.
|
Method.Builder |
addOptions(int index,
Option value)
Any metadata attached to the method.
|
Method.Builder |
addOptions(Option.Builder builderForValue)
Any metadata attached to the method.
|
Method.Builder |
addOptions(Option value)
Any metadata attached to the method.
|
Option.Builder |
addOptionsBuilder()
Any metadata attached to the method.
|
Option.Builder |
addOptionsBuilder(int index)
Any metadata attached to the method.
|
Method.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value)
Like
setRepeatedField, but appends the value as a new element. |
Method |
build()
Constructs the message based on the state of the Builder.
|
Method |
buildPartial()
Like
MessageLite.Builder.build(), but does not throw an exception if the message is missing required
fields. |
Method.Builder |
clear()
Called by the initialization and clear code paths to allow subclasses to
reset any of their builtin fields back to the initial values.
|
Method.Builder |
clearField(Descriptors.FieldDescriptor field)
Clears the field.
|
Method.Builder |
clearName()
The simple name of this method.
|
Method.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
|
Method.Builder |
clearOptions()
Any metadata attached to the method.
|
Method.Builder |
clearRequestStreaming()
If true, the request is streamed.
|
Method.Builder |
clearRequestTypeUrl()
A URL of the input message type.
|
Method.Builder |
clearResponseStreaming()
If true, the response is streamed.
|
Method.Builder |
clearResponseTypeUrl()
The URL of the output message type.
|
Method.Builder |
clearSyntax()
The source syntax of this method.
|
Method.Builder |
clone()
Clones the Builder.
|
Method |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType()
Get the message's type's descriptor.
|
java.lang.String |
getName()
The simple name of this method.
|
ByteString |
getNameBytes()
The simple name of this method.
|
Option |
getOptions(int index)
Any metadata attached to the method.
|
Option.Builder |
getOptionsBuilder(int index)
Any metadata attached to the method.
|
java.util.List<Option.Builder> |
getOptionsBuilderList()
Any metadata attached to the method.
|
int |
getOptionsCount()
Any metadata attached to the method.
|
java.util.List<Option> |
getOptionsList()
Any metadata attached to the method.
|
OptionOrBuilder |
getOptionsOrBuilder(int index)
Any metadata attached to the method.
|
java.util.List<? extends OptionOrBuilder> |
getOptionsOrBuilderList()
Any metadata attached to the method.
|
boolean |
getRequestStreaming()
If true, the request is streamed.
|
java.lang.String |
getRequestTypeUrl()
A URL of the input message type.
|
ByteString |
getRequestTypeUrlBytes()
A URL of the input message type.
|
boolean |
getResponseStreaming()
If true, the response is streamed.
|
java.lang.String |
getResponseTypeUrl()
The URL of the output message type.
|
ByteString |
getResponseTypeUrlBytes()
The URL of the output message type.
|
Syntax |
getSyntax()
The source syntax of this method.
|
int |
getSyntaxValue()
The source syntax of this method.
|
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded messages are set, false
otherwise.
|
Method.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry)
Like
MessageLite.Builder.mergeFrom(CodedInputStream), but also parses extensions. |
Method.Builder |
mergeFrom(Message other)
Merge
other into the message being built. |
Method.Builder |
mergeFrom(Method other) |
Method.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Merge some unknown fields into the
UnknownFieldSet for this message. |
Method.Builder |
removeOptions(int index)
Any metadata attached to the method.
|
Method.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value)
Sets a field to the given value.
|
Method.Builder |
setName(java.lang.String value)
The simple name of this method.
|
Method.Builder |
setNameBytes(ByteString value)
The simple name of this method.
|
Method.Builder |
setOptions(int index,
Option.Builder builderForValue)
Any metadata attached to the method.
|
Method.Builder |
setOptions(int index,
Option value)
Any metadata attached to the method.
|
Method.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value)
Sets an element of a repeated field to the given value.
|
Method.Builder |
setRequestStreaming(boolean value)
If true, the request is streamed.
|
Method.Builder |
setRequestTypeUrl(java.lang.String value)
A URL of the input message type.
|
Method.Builder |
setRequestTypeUrlBytes(ByteString value)
A URL of the input message type.
|
Method.Builder |
setResponseStreaming(boolean value)
If true, the response is streamed.
|
Method.Builder |
setResponseTypeUrl(java.lang.String value)
The URL of the output message type.
|
Method.Builder |
setResponseTypeUrlBytes(ByteString value)
The URL of the output message type.
|
Method.Builder |
setSyntax(Syntax value)
The source syntax of this method.
|
Method.Builder |
setSyntaxValue(int value)
The source syntax of this method.
|
Method.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Set the
UnknownFieldSet for this message. |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, newBuilderForFieldfindInitializationErrors, getInitializationErrorString, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, toStringmergeFromequals, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofmergeFrompublic static final Descriptors.Descriptor getDescriptor()
public Method.Builder clear()
com.google.protobuf.GeneratedMessageV3.Builderclear in interface Message.Builderclear in interface MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>public Descriptors.Descriptor getDescriptorForType()
Message.BuilderMessageOrBuilder.getDescriptorForType().getDescriptorForType in interface Message.BuildergetDescriptorForType in interface MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>public Method getDefaultInstanceForType()
MessageLiteOrBuildergetDefaultInstance() method of generated
message classes in that this method is an abstract method of the MessageLite interface
whereas getDefaultInstance() is a static method of a specific class. They return the
same thing.getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilderpublic Method build()
MessageLite.Builderbuild in interface Message.Builderbuild in interface MessageLite.Builderpublic Method buildPartial()
MessageLite.BuilderMessageLite.Builder.build(), but does not throw an exception if the message is missing required
fields. Instead, a partial message is returned. Subsequent changes to the Builder will not
affect the returned message.buildPartial in interface Message.BuilderbuildPartial in interface MessageLite.Builderpublic Method.Builder clone()
MessageLite.Builderclone in interface Message.Builderclone in interface MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>Object.clone()public Method.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
Message.BuilderMessageOrBuilder.getField(Descriptors.FieldDescriptor) would return.setField in interface Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>public Method.Builder clearField(Descriptors.FieldDescriptor field)
Message.BuilderclearField in interface Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>public Method.Builder clearOneof(Descriptors.OneofDescriptor oneof)
AbstractMessage.BuilderclearOneof in interface Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>public Method.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Message.BuilderMessageOrBuilder.getRepeatedField(Descriptors.FieldDescriptor,int) would return.setRepeatedField in interface Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>public Method.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
Message.BuildersetRepeatedField, but appends the value as a new element.addRepeatedField in interface Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>public Method.Builder mergeFrom(Message other)
Message.Builderother into the message being built. other must have the exact same type
as this (i.e. getDescriptorForType() == other.getDescriptorForType()).
Merging occurs as follows. For each field:
* For singular primitive fields, if the field is set in other, then other's
value overwrites the value in this message.
* For singular message fields, if the field is set in other, it is merged into the
corresponding sub-message of this message using the same merging rules.
* For repeated fields, the elements in other are concatenated with the elements in
this message.
* For oneof groups, if the other message has one of the fields set, the group of this message
is cleared and replaced by the field of the other message, so that the oneof constraint is
preserved.
This is equivalent to the Message::MergeFrom method in C++.
mergeFrom in interface Message.BuildermergeFrom in class AbstractMessage.Builder<Method.Builder>public Method.Builder mergeFrom(Method other)
public final boolean isInitialized()
MessageLiteOrBuilderisInitialized in interface MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>public Method.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
MessageLite.BuilderMessageLite.Builder.mergeFrom(CodedInputStream), but also parses extensions. The extensions
that you want to be able to parse must be registered in extensionRegistry. Extensions
not in the registry will be treated as unknown fields.mergeFrom in interface Message.BuildermergeFrom in interface MessageLite.BuildermergeFrom in class AbstractMessage.Builder<Method.Builder>java.io.IOExceptionpublic java.lang.String getName()
The simple name of this method.
string name = 1;getName in interface MethodOrBuilderpublic ByteString getNameBytes()
The simple name of this method.
string name = 1;getNameBytes in interface MethodOrBuilderpublic Method.Builder setName(java.lang.String value)
The simple name of this method.
string name = 1;value - The name to set.public Method.Builder clearName()
The simple name of this method.
string name = 1;public Method.Builder setNameBytes(ByteString value)
The simple name of this method.
string name = 1;value - The bytes for name to set.public java.lang.String getRequestTypeUrl()
A URL of the input message type.
string request_type_url = 2;getRequestTypeUrl in interface MethodOrBuilderpublic ByteString getRequestTypeUrlBytes()
A URL of the input message type.
string request_type_url = 2;getRequestTypeUrlBytes in interface MethodOrBuilderpublic Method.Builder setRequestTypeUrl(java.lang.String value)
A URL of the input message type.
string request_type_url = 2;value - The requestTypeUrl to set.public Method.Builder clearRequestTypeUrl()
A URL of the input message type.
string request_type_url = 2;public Method.Builder setRequestTypeUrlBytes(ByteString value)
A URL of the input message type.
string request_type_url = 2;value - The bytes for requestTypeUrl to set.public boolean getRequestStreaming()
If true, the request is streamed.
bool request_streaming = 3;getRequestStreaming in interface MethodOrBuilderpublic Method.Builder setRequestStreaming(boolean value)
If true, the request is streamed.
bool request_streaming = 3;value - The requestStreaming to set.public Method.Builder clearRequestStreaming()
If true, the request is streamed.
bool request_streaming = 3;public java.lang.String getResponseTypeUrl()
The URL of the output message type.
string response_type_url = 4;getResponseTypeUrl in interface MethodOrBuilderpublic ByteString getResponseTypeUrlBytes()
The URL of the output message type.
string response_type_url = 4;getResponseTypeUrlBytes in interface MethodOrBuilderpublic Method.Builder setResponseTypeUrl(java.lang.String value)
The URL of the output message type.
string response_type_url = 4;value - The responseTypeUrl to set.public Method.Builder clearResponseTypeUrl()
The URL of the output message type.
string response_type_url = 4;public Method.Builder setResponseTypeUrlBytes(ByteString value)
The URL of the output message type.
string response_type_url = 4;value - The bytes for responseTypeUrl to set.public boolean getResponseStreaming()
If true, the response is streamed.
bool response_streaming = 5;getResponseStreaming in interface MethodOrBuilderpublic Method.Builder setResponseStreaming(boolean value)
If true, the response is streamed.
bool response_streaming = 5;value - The responseStreaming to set.public Method.Builder clearResponseStreaming()
If true, the response is streamed.
bool response_streaming = 5;public java.util.List<Option> getOptionsList()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;getOptionsList in interface MethodOrBuilderpublic int getOptionsCount()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;getOptionsCount in interface MethodOrBuilderpublic Option getOptions(int index)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;getOptions in interface MethodOrBuilderpublic Method.Builder setOptions(int index, Option value)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public Method.Builder setOptions(int index, Option.Builder builderForValue)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public Method.Builder addOptions(Option value)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public Method.Builder addOptions(int index, Option value)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public Method.Builder addOptions(Option.Builder builderForValue)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public Method.Builder addOptions(int index, Option.Builder builderForValue)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public Method.Builder addAllOptions(java.lang.Iterable<? extends Option> values)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public Method.Builder clearOptions()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public Method.Builder removeOptions(int index)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public Option.Builder getOptionsBuilder(int index)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public OptionOrBuilder getOptionsOrBuilder(int index)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;getOptionsOrBuilder in interface MethodOrBuilderpublic java.util.List<? extends OptionOrBuilder> getOptionsOrBuilderList()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;getOptionsOrBuilderList in interface MethodOrBuilderpublic Option.Builder addOptionsBuilder()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public Option.Builder addOptionsBuilder(int index)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public java.util.List<Option.Builder> getOptionsBuilderList()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;public int getSyntaxValue()
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;getSyntaxValue in interface MethodOrBuilderpublic Method.Builder setSyntaxValue(int value)
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;value - The enum numeric value on the wire for syntax to set.public Syntax getSyntax()
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;getSyntax in interface MethodOrBuilderpublic Method.Builder setSyntax(Syntax value)
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;value - The syntax to set.public Method.Builder clearSyntax()
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;public final Method.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Message.BuilderUnknownFieldSet for this message.setUnknownFields in interface Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>public final Method.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Message.BuilderUnknownFieldSet for this message.mergeUnknownFields in interface Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>