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, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessageV3.Builder
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder clear()
GeneratedMessageV3.Builder
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<Method.Builder>
public Descriptors.Descriptor getDescriptorForType()
Message.Builder
MessageOrBuilder.getDescriptorForType()
.getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<Method.Builder>
public Method getDefaultInstanceForType()
MessageLiteOrBuilder
getDefaultInstance()
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 MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public Method build()
MessageLite.Builder
build
in interface Message.Builder
build
in interface MessageLite.Builder
public Method buildPartial()
MessageLite.Builder
MessageLite.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.Builder
buildPartial
in interface MessageLite.Builder
public Method.Builder clone()
MessageLite.Builder
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<Method.Builder>
Object.clone()
public Method.Builder setField(Descriptors.FieldDescriptor field, Object value)
Message.Builder
MessageOrBuilder.getField(Descriptors.FieldDescriptor)
would return.setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder clearField(Descriptors.FieldDescriptor field)
Message.Builder
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder clearOneof(Descriptors.OneofDescriptor oneof)
AbstractMessage.Builder
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Message.Builder
MessageOrBuilder.getRepeatedField(Descriptors.FieldDescriptor,int)
would
return.setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Message.Builder
setRepeatedField
, but appends the value as a new element.addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder mergeFrom(Message other)
Message.Builder
other
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.Builder
mergeFrom
in class AbstractMessage.Builder<Method.Builder>
public Method.Builder mergeFrom(Method other)
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
MessageLite.Builder
MessageLite.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.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<Method.Builder>
IOException
public String getName()
The simple name of this method.
string name = 1;
getName
in interface MethodOrBuilder
public ByteString getNameBytes()
The simple name of this method.
string name = 1;
getNameBytes
in interface MethodOrBuilder
public 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 MethodOrBuilder
public ByteString getRequestTypeUrlBytes()
A URL of the input message type.
string request_type_url = 2;
getRequestTypeUrlBytes
in interface MethodOrBuilder
public 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 MethodOrBuilder
public 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 MethodOrBuilder
public ByteString getResponseTypeUrlBytes()
The URL of the output message type.
string response_type_url = 4;
getResponseTypeUrlBytes
in interface MethodOrBuilder
public 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 MethodOrBuilder
public 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 MethodOrBuilder
public int getOptionsCount()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
getOptionsCount
in interface MethodOrBuilder
public Option getOptions(int index)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
getOptions
in interface MethodOrBuilder
public 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 MethodOrBuilder
public List<? extends OptionOrBuilder> getOptionsOrBuilderList()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
getOptionsOrBuilderList
in interface MethodOrBuilder
public 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 MethodOrBuilder
public 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 MethodOrBuilder
public 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.Builder
UnknownFieldSet
for this message.setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<Method.Builder>
public final Method.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this
message.mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<Method.Builder>
Copyright © 2008–2017 Google. All rights reserved.