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, newBuilderForField
findInitializationErrors, getInitializationErrorString, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, toString
mergeFrom
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
public Method.Builder clear()
com.google.protobuf.GeneratedMessageV3.Builder
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>
public Descriptors.Descriptor getDescriptorForType()
Message.Builder
MessageOrBuilder.getDescriptorForType()
.getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.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 com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>
Object.clone()
public Method.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
Message.Builder
MessageOrBuilder.getField(Descriptors.FieldDescriptor)
would return.setField
in interface Message.Builder
setField
in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder clearField(Descriptors.FieldDescriptor field)
Message.Builder
clearField
in interface Message.Builder
clearField
in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder clearOneof(Descriptors.OneofDescriptor oneof)
AbstractMessage.Builder
clearOneof
in interface Message.Builder
clearOneof
in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Message.Builder
MessageOrBuilder.getRepeatedField(Descriptors.FieldDescriptor,int)
would return.setRepeatedField
in interface Message.Builder
setRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
Message.Builder
setRepeatedField
, but appends the value as a new element.addRepeatedField
in interface Message.Builder
addRepeatedField
in class com.google.protobuf.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:
* 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.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 com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>
public Method.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.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>
java.io.IOException
public java.lang.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(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 MethodOrBuilder
public ByteString getRequestTypeUrlBytes()
A URL of the input message type.
string request_type_url = 2;
getRequestTypeUrlBytes
in interface MethodOrBuilder
public 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 MethodOrBuilder
public 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 MethodOrBuilder
public ByteString getResponseTypeUrlBytes()
The URL of the output message type.
string response_type_url = 4;
getResponseTypeUrlBytes
in interface MethodOrBuilder
public 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 MethodOrBuilder
public 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 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(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 MethodOrBuilder
public java.util.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 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 MethodOrBuilder
public 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 MethodOrBuilder
public 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.Builder
UnknownFieldSet
for this message.setUnknownFields
in interface Message.Builder
setUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>
public final Method.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this message.mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Method.Builder>