public static final class Method.Builder extends 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(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,
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)
TODO(jieluo): Clear it when all subclasses have implemented this method.
|
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.
|
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.
|
List<Option.Builder> |
getOptionsBuilderList()
Any metadata attached to the method.
|
int |
getOptionsCount()
Any metadata attached to the method.
|
List<Option> |
getOptionsList()
Any metadata attached to the method.
|
OptionOrBuilder |
getOptionsOrBuilder(int index)
Any metadata attached to the method.
|
List<? extends OptionOrBuilder> |
getOptionsOrBuilderList()
Any metadata attached to the method.
|
boolean |
getRequestStreaming()
If true, the request is streamed.
|
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.
|
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.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable()
Get the FieldAccessorTable for this type.
|
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(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,
Object value)
Sets a field to the given value.
|
Method.Builder |
setName(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,
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(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(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(UnknownFieldSet unknownFields)
Set the
UnknownFieldSet for this message. |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofmergeFrompublic static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessageV3.BuilderinternalGetFieldAccessorTable in class GeneratedMessageV3.Builder<Method.Builder>public Method.Builder clear()
GeneratedMessageV3.Builderclear in interface Message.Builderclear in interface MessageLite.Builderclear in class GeneratedMessageV3.Builder<Method.Builder>public Descriptors.Descriptor getDescriptorForType()
Message.BuilderMessageOrBuilder.getDescriptorForType().getDescriptorForType in interface Message.BuildergetDescriptorForType in interface MessageOrBuildergetDescriptorForType in class 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 GeneratedMessageV3.Builder<Method.Builder>Object.clone()public Method.Builder setField(Descriptors.FieldDescriptor field, Object value)
Message.BuilderMessageOrBuilder.getField(Descriptors.FieldDescriptor) would return.setField in interface Message.BuildersetField in class GeneratedMessageV3.Builder<Method.Builder>public Method.Builder clearField(Descriptors.FieldDescriptor field)
Message.BuilderclearField in interface Message.BuilderclearField in class GeneratedMessageV3.Builder<Method.Builder>public Method.Builder clearOneof(Descriptors.OneofDescriptor oneof)
AbstractMessage.BuilderclearOneof in interface Message.BuilderclearOneof in class GeneratedMessageV3.Builder<Method.Builder>public Method.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Message.BuilderMessageOrBuilder.getRepeatedField(Descriptors.FieldDescriptor,int) would
return.setRepeatedField in interface Message.BuildersetRepeatedField in class GeneratedMessageV3.Builder<Method.Builder>public Method.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Message.BuildersetRepeatedField, but appends the value as a new element.addRepeatedField in interface Message.BuilderaddRepeatedField in class 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:other,
then other's value overwrites the value in this message.other,
it is merged into the corresponding sub-message of this message
using the same merging rules.other are concatenated
with the elements in this message.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 GeneratedMessageV3.Builder<Method.Builder>public Method.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws 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>IOExceptionpublic 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(String value)
The simple name of this method.
string name = 1;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;public 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(String value)
A URL of the input message type.
string request_type_url = 2;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;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;public Method.Builder clearRequestStreaming()
If true, the request is streamed.
bool request_streaming = 3;public 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(String value)
The URL of the output message type.
string response_type_url = 4;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;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;public Method.Builder clearResponseStreaming()
If true, the response is streamed.
bool response_streaming = 5;public 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(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 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 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;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;public Method.Builder clearSyntax()
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;public final Method.Builder setUnknownFields(UnknownFieldSet unknownFields)
Message.BuilderUnknownFieldSet for this message.setUnknownFields in interface Message.BuildersetUnknownFields in class GeneratedMessageV3.Builder<Method.Builder>public final Method.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Message.BuilderUnknownFieldSet for this
message.mergeUnknownFields in interface Message.BuildermergeUnknownFields in class GeneratedMessageV3.Builder<Method.Builder>Copyright © 2008–2017 Google. All rights reserved.