Package com.google.protobuf
Class Method
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
-
- com.google.protobuf.GeneratedMessageLite<Method,Method.Builder>
-
- com.google.protobuf.Method
-
- All Implemented Interfaces:
MessageLite
,MessageLiteOrBuilder
,MethodOrBuilder
public final class Method extends GeneratedMessageLite<Method,Method.Builder> implements MethodOrBuilder
Method represents a method of an API interface.
Protobuf typegoogle.protobuf.Method
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Method.Builder
Method represents a method of an API interface.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
GeneratedMessageLite.DefaultInstanceBasedParser<T extends GeneratedMessageLite<T,?>>, GeneratedMessageLite.ExtendableBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageLite.ExtendableMessage<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageLite.ExtensionDescriptor, GeneratedMessageLite.GeneratedExtension<ContainingType extends MessageLite,Type>, GeneratedMessageLite.MethodToInvoke, GeneratedMessageLite.SerializedForm
-
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
AbstractMessageLite.InternalOneOfEnum
-
-
Field Summary
Fields Modifier and Type Field Description private static Method
DEFAULT_INSTANCE
private java.lang.String
name_
static int
NAME_FIELD_NUMBER
private Internal.ProtobufList<Option>
options_
static int
OPTIONS_FIELD_NUMBER
private static Parser<Method>
PARSER
static int
REQUEST_STREAMING_FIELD_NUMBER
static int
REQUEST_TYPE_URL_FIELD_NUMBER
private boolean
requestStreaming_
private java.lang.String
requestTypeUrl_
static int
RESPONSE_STREAMING_FIELD_NUMBER
static int
RESPONSE_TYPE_URL_FIELD_NUMBER
private boolean
responseStreaming_
private java.lang.String
responseTypeUrl_
private int
syntax_
static int
SYNTAX_FIELD_NUMBER
-
Fields inherited from class com.google.protobuf.GeneratedMessageLite
UNINITIALIZED_HASH_CODE, UNINITIALIZED_SERIALIZED_SIZE, unknownFields
-
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Method()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addAllOptions(java.lang.Iterable<? extends Option> values)
Any metadata attached to the method.private void
addOptions(int index, Option value)
Any metadata attached to the method.private void
addOptions(Option value)
Any metadata attached to the method.private void
clearName()
The simple name of this method.private void
clearOptions()
Any metadata attached to the method.private void
clearRequestStreaming()
If true, the request is streamed.private void
clearRequestTypeUrl()
A URL of the input message type.private void
clearResponseStreaming()
If true, the response is streamed.private void
clearResponseTypeUrl()
The URL of the output message type.private void
clearSyntax()
The source syntax of this method.protected java.lang.Object
dynamicMethod(GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)
A method that implements different types of operations described inGeneratedMessageLite.MethodToInvoke
.private void
ensureOptionsIsMutable()
static Method
getDefaultInstance()
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.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.static Method.Builder
newBuilder()
static Method.Builder
newBuilder(Method prototype)
static Method
parseDelimitedFrom(java.io.InputStream input)
static Method
parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry)
static Method
parseFrom(byte[] data)
static Method
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
static Method
parseFrom(ByteString data)
static Method
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
static Method
parseFrom(CodedInputStream input)
static Method
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
static Method
parseFrom(java.io.InputStream input)
static Method
parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry)
static Method
parseFrom(java.nio.ByteBuffer data)
static Method
parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry)
static Parser<Method>
parser()
private void
removeOptions(int index)
Any metadata attached to the method.private void
setName(java.lang.String value)
The simple name of this method.private void
setNameBytes(ByteString value)
The simple name of this method.private void
setOptions(int index, Option value)
Any metadata attached to the method.private void
setRequestStreaming(boolean value)
If true, the request is streamed.private void
setRequestTypeUrl(java.lang.String value)
A URL of the input message type.private void
setRequestTypeUrlBytes(ByteString value)
A URL of the input message type.private void
setResponseStreaming(boolean value)
If true, the response is streamed.private void
setResponseTypeUrl(java.lang.String value)
The URL of the output message type.private void
setResponseTypeUrlBytes(ByteString value)
The URL of the output message type.private void
setSyntax(Syntax value)
The source syntax of this method.private void
setSyntaxValue(int value)
The source syntax of this method.-
Methods inherited from class com.google.protobuf.GeneratedMessageLite
buildMessageInfo, clearMemoizedHashCode, clearMemoizedSerializedSize, computeHashCode, createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstance, getDefaultInstanceForType, getMemoizedHashCode, getMemoizedSerializedSize, getMethodOrDie, getParserForType, getSerializedSize, getSerializedSize, hashCode, hashCodeIsNotMemoized, invokeOrDie, isInitialized, isInitialized, isMutable, makeImmutable, markImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newMutableInstance, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, setMemoizedHashCode, setMemoizedSerializedSize, toBuilder, toString, writeTo
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, newUninitializedMessageException, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
-
-
-
Field Detail
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
name_
private java.lang.String name_
-
REQUEST_TYPE_URL_FIELD_NUMBER
public static final int REQUEST_TYPE_URL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
requestTypeUrl_
private java.lang.String requestTypeUrl_
-
REQUEST_STREAMING_FIELD_NUMBER
public static final int REQUEST_STREAMING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
requestStreaming_
private boolean requestStreaming_
-
RESPONSE_TYPE_URL_FIELD_NUMBER
public static final int RESPONSE_TYPE_URL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
responseTypeUrl_
private java.lang.String responseTypeUrl_
-
RESPONSE_STREAMING_FIELD_NUMBER
public static final int RESPONSE_STREAMING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
responseStreaming_
private boolean responseStreaming_
-
OPTIONS_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
options_
private Internal.ProtobufList<Option> options_
-
SYNTAX_FIELD_NUMBER
public static final int SYNTAX_FIELD_NUMBER
- See Also:
- Constant Field Values
-
syntax_
private int syntax_
-
DEFAULT_INSTANCE
private static final Method DEFAULT_INSTANCE
-
-
Method Detail
-
getName
public java.lang.String getName()
The simple name of this method.
string name = 1;
- Specified by:
getName
in interfaceMethodOrBuilder
- Returns:
- The name.
-
getNameBytes
public ByteString getNameBytes()
The simple name of this method.
string name = 1;
- Specified by:
getNameBytes
in interfaceMethodOrBuilder
- Returns:
- The bytes for name.
-
setName
private void setName(java.lang.String value)
The simple name of this method.
string name = 1;
- Parameters:
value
- The name to set.
-
clearName
private void clearName()
The simple name of this method.
string name = 1;
-
setNameBytes
private void setNameBytes(ByteString value)
The simple name of this method.
string name = 1;
- Parameters:
value
- The bytes for name to set.
-
getRequestTypeUrl
public java.lang.String getRequestTypeUrl()
A URL of the input message type.
string request_type_url = 2;
- Specified by:
getRequestTypeUrl
in interfaceMethodOrBuilder
- Returns:
- The requestTypeUrl.
-
getRequestTypeUrlBytes
public ByteString getRequestTypeUrlBytes()
A URL of the input message type.
string request_type_url = 2;
- Specified by:
getRequestTypeUrlBytes
in interfaceMethodOrBuilder
- Returns:
- The bytes for requestTypeUrl.
-
setRequestTypeUrl
private void setRequestTypeUrl(java.lang.String value)
A URL of the input message type.
string request_type_url = 2;
- Parameters:
value
- The requestTypeUrl to set.
-
clearRequestTypeUrl
private void clearRequestTypeUrl()
A URL of the input message type.
string request_type_url = 2;
-
setRequestTypeUrlBytes
private void setRequestTypeUrlBytes(ByteString value)
A URL of the input message type.
string request_type_url = 2;
- Parameters:
value
- The bytes for requestTypeUrl to set.
-
getRequestStreaming
public boolean getRequestStreaming()
If true, the request is streamed.
bool request_streaming = 3;
- Specified by:
getRequestStreaming
in interfaceMethodOrBuilder
- Returns:
- The requestStreaming.
-
setRequestStreaming
private void setRequestStreaming(boolean value)
If true, the request is streamed.
bool request_streaming = 3;
- Parameters:
value
- The requestStreaming to set.
-
clearRequestStreaming
private void clearRequestStreaming()
If true, the request is streamed.
bool request_streaming = 3;
-
getResponseTypeUrl
public java.lang.String getResponseTypeUrl()
The URL of the output message type.
string response_type_url = 4;
- Specified by:
getResponseTypeUrl
in interfaceMethodOrBuilder
- Returns:
- The responseTypeUrl.
-
getResponseTypeUrlBytes
public ByteString getResponseTypeUrlBytes()
The URL of the output message type.
string response_type_url = 4;
- Specified by:
getResponseTypeUrlBytes
in interfaceMethodOrBuilder
- Returns:
- The bytes for responseTypeUrl.
-
setResponseTypeUrl
private void setResponseTypeUrl(java.lang.String value)
The URL of the output message type.
string response_type_url = 4;
- Parameters:
value
- The responseTypeUrl to set.
-
clearResponseTypeUrl
private void clearResponseTypeUrl()
The URL of the output message type.
string response_type_url = 4;
-
setResponseTypeUrlBytes
private void setResponseTypeUrlBytes(ByteString value)
The URL of the output message type.
string response_type_url = 4;
- Parameters:
value
- The bytes for responseTypeUrl to set.
-
getResponseStreaming
public boolean getResponseStreaming()
If true, the response is streamed.
bool response_streaming = 5;
- Specified by:
getResponseStreaming
in interfaceMethodOrBuilder
- Returns:
- The responseStreaming.
-
setResponseStreaming
private void setResponseStreaming(boolean value)
If true, the response is streamed.
bool response_streaming = 5;
- Parameters:
value
- The responseStreaming to set.
-
clearResponseStreaming
private void clearResponseStreaming()
If true, the response is streamed.
bool response_streaming = 5;
-
getOptionsList
public java.util.List<Option> getOptionsList()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
- Specified by:
getOptionsList
in interfaceMethodOrBuilder
-
getOptionsOrBuilderList
public java.util.List<? extends OptionOrBuilder> getOptionsOrBuilderList()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
-
getOptionsCount
public int getOptionsCount()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
- Specified by:
getOptionsCount
in interfaceMethodOrBuilder
-
getOptions
public Option getOptions(int index)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
- Specified by:
getOptions
in interfaceMethodOrBuilder
-
getOptionsOrBuilder
public OptionOrBuilder getOptionsOrBuilder(int index)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
-
ensureOptionsIsMutable
private void ensureOptionsIsMutable()
-
setOptions
private void setOptions(int index, Option value)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
-
addOptions
private void addOptions(Option value)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
-
addOptions
private void addOptions(int index, Option value)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
-
addAllOptions
private void addAllOptions(java.lang.Iterable<? extends Option> values)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
-
clearOptions
private void clearOptions()
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
-
removeOptions
private void removeOptions(int index)
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;
-
getSyntaxValue
public int getSyntaxValue()
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;
- Specified by:
getSyntaxValue
in interfaceMethodOrBuilder
- Returns:
- The enum numeric value on the wire for syntax.
-
getSyntax
public Syntax getSyntax()
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;
- Specified by:
getSyntax
in interfaceMethodOrBuilder
- Returns:
- The syntax.
-
setSyntaxValue
private void setSyntaxValue(int value)
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;
- Parameters:
value
- The enum numeric value on the wire for syntax to set.
-
setSyntax
private void setSyntax(Syntax value)
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;
- Parameters:
value
- The syntax to set.
-
clearSyntax
private void clearSyntax()
The source syntax of this method.
.google.protobuf.Syntax syntax = 7;
-
parseFrom
public static Method parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Method parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Method parseFrom(ByteString data) throws InvalidProtocolBufferException
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Method parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Method parseFrom(byte[] data) throws InvalidProtocolBufferException
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Method parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Method parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Method parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Method parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Method parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Method parseFrom(CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Method parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilder
public static Method.Builder newBuilder()
-
newBuilder
public static Method.Builder newBuilder(Method prototype)
-
dynamicMethod
protected final java.lang.Object dynamicMethod(GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)
Description copied from class:GeneratedMessageLite
A method that implements different types of operations described inGeneratedMessageLite.MethodToInvoke
. These different kinds of operations are required to implement message-level operations for builders in the runtime. This method bundles those operations to reduce the generated methods count.NEW_INSTANCE
returns a new instance of the protocol buffer that has not yet been made immutable. SeeMAKE_IMMUTABLE
.IS_INITIALIZED
returnsnull
for false and the default instance for true. It doesn't use or modify any memoized value.GET_MEMOIZED_IS_INITIALIZED
returns the memoizedisInitialized
byte value.SET_MEMOIZED_IS_INITIALIZED
sets the memoizedisInitialized
byte value to 1 if the first parameter is not null, or to 0 if the first parameter is null.NEW_BUILDER
returns aBuilderType
instance.
For use by generated code only.
- Specified by:
dynamicMethod
in classGeneratedMessageLite<Method,Method.Builder>
-
getDefaultInstance
public static Method getDefaultInstance()
-
-