public final class Method extends GeneratedMessage implements MethodOrBuilder
google.protobuf.Method
Method represents a method of an api.
| Modifier and Type | Class and Description |
|---|---|
static class |
Method.Builder
Protobuf type
google.protobuf.Method |
GeneratedMessage.ExtendableBuilder<MessageType extends GeneratedMessage.ExtendableMessage,BuilderType extends GeneratedMessage.ExtendableBuilder>, GeneratedMessage.ExtendableMessage<MessageType extends GeneratedMessage.ExtendableMessage>, GeneratedMessage.ExtendableMessageOrBuilder<MessageType extends GeneratedMessage.ExtendableMessage>, GeneratedMessage.FieldAccessorTable, GeneratedMessage.GeneratedExtension<ContainingType extends Message,Type>| Modifier and Type | Field and Description |
|---|---|
static int |
NAME_FIELD_NUMBER |
static int |
OPTIONS_FIELD_NUMBER |
static int |
REQUEST_STREAMING_FIELD_NUMBER |
static int |
REQUEST_TYPE_URL_FIELD_NUMBER |
static int |
RESPONSE_STREAMING_FIELD_NUMBER |
static int |
RESPONSE_TYPE_URL_FIELD_NUMBER |
static int |
SYNTAX_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this message for equality.
|
static Method |
getDefaultInstance() |
Method |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
static Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getName()
optional string name = 1; |
ByteString |
getNameBytes()
optional string name = 1; |
Option |
getOptions(int index)
repeated .google.protobuf.Option options = 6; |
int |
getOptionsCount()
repeated .google.protobuf.Option options = 6; |
java.util.List<Option> |
getOptionsList()
repeated .google.protobuf.Option options = 6; |
OptionOrBuilder |
getOptionsOrBuilder(int index)
repeated .google.protobuf.Option options = 6; |
java.util.List<? extends OptionOrBuilder> |
getOptionsOrBuilderList()
repeated .google.protobuf.Option options = 6; |
Parser<Method> |
getParserForType()
Gets the parser for a message of the same type as this message.
|
boolean |
getRequestStreaming()
optional bool request_streaming = 3; |
java.lang.String |
getRequestTypeUrl()
optional string request_type_url = 2; |
ByteString |
getRequestTypeUrlBytes()
optional string request_type_url = 2; |
boolean |
getResponseStreaming()
optional bool response_streaming = 5; |
java.lang.String |
getResponseTypeUrl()
optional string response_type_url = 4; |
ByteString |
getResponseTypeUrlBytes()
optional string response_type_url = 4; |
int |
getSerializedSize()
Get the number of bytes required to encode this message.
|
Syntax |
getSyntax()
optional .google.protobuf.Syntax syntax = 7; |
int |
getSyntaxValue()
optional .google.protobuf.Syntax syntax = 7; |
UnknownFieldSet |
getUnknownFields()
Get the
UnknownFieldSet for this message. |
int |
hashCode()
Returns the hash code value for this message.
|
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded
messages are set, false otherwise.
|
static Method.Builder |
newBuilder() |
static Method.Builder |
newBuilder(Method prototype) |
Method.Builder |
newBuilderForType()
Constructs a new builder for a message of the same type as this message.
|
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 Parser<Method> |
parser() |
Method.Builder |
toBuilder()
Constructs a builder initialized with the current message.
|
void |
writeTo(CodedOutputStream output)
Serializes the message and writes it to
output. |
getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtensionfindInitializationErrors, getInitializationErrorString, toStringtoByteArray, toByteString, writeDelimitedTo, writeTofindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static final int NAME_FIELD_NUMBER
public static final int REQUEST_TYPE_URL_FIELD_NUMBER
public static final int REQUEST_STREAMING_FIELD_NUMBER
public static final int RESPONSE_TYPE_URL_FIELD_NUMBER
public static final int RESPONSE_STREAMING_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER
public static final int SYNTAX_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
MessageOrBuilderUnknownFieldSet for this message.getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessagepublic static final Descriptors.Descriptor getDescriptor()
public java.lang.String getName()
optional string name = 1;
The simple name of this method.
getName in interface MethodOrBuilderpublic ByteString getNameBytes()
optional string name = 1;
The simple name of this method.
getNameBytes in interface MethodOrBuilderpublic java.lang.String getRequestTypeUrl()
optional string request_type_url = 2;
A URL of the input message type.
getRequestTypeUrl in interface MethodOrBuilderpublic ByteString getRequestTypeUrlBytes()
optional string request_type_url = 2;
A URL of the input message type.
getRequestTypeUrlBytes in interface MethodOrBuilderpublic boolean getRequestStreaming()
optional bool request_streaming = 3;
If true, the request is streamed.
getRequestStreaming in interface MethodOrBuilderpublic java.lang.String getResponseTypeUrl()
optional string response_type_url = 4;
The URL of the output message type.
getResponseTypeUrl in interface MethodOrBuilderpublic ByteString getResponseTypeUrlBytes()
optional string response_type_url = 4;
The URL of the output message type.
getResponseTypeUrlBytes in interface MethodOrBuilderpublic boolean getResponseStreaming()
optional bool response_streaming = 5;
If true, the response is streamed.
getResponseStreaming in interface MethodOrBuilderpublic java.util.List<Option> getOptionsList()
repeated .google.protobuf.Option options = 6;
Any metadata attached to the method.
getOptionsList in interface MethodOrBuilderpublic java.util.List<? extends OptionOrBuilder> getOptionsOrBuilderList()
repeated .google.protobuf.Option options = 6;
Any metadata attached to the method.
getOptionsOrBuilderList in interface MethodOrBuilderpublic int getOptionsCount()
repeated .google.protobuf.Option options = 6;
Any metadata attached to the method.
getOptionsCount in interface MethodOrBuilderpublic Option getOptions(int index)
repeated .google.protobuf.Option options = 6;
Any metadata attached to the method.
getOptions in interface MethodOrBuilderpublic OptionOrBuilder getOptionsOrBuilder(int index)
repeated .google.protobuf.Option options = 6;
Any metadata attached to the method.
getOptionsOrBuilder in interface MethodOrBuilderpublic int getSyntaxValue()
optional .google.protobuf.Syntax syntax = 7;
The source syntax of this method.
getSyntaxValue in interface MethodOrBuilderpublic Syntax getSyntax()
optional .google.protobuf.Syntax syntax = 7;
The source syntax of this method.
getSyntax in interface MethodOrBuilderpublic final boolean isInitialized()
MessageLiteOrBuilderisInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessagepublic void writeTo(CodedOutputStream output) throws java.io.IOException
MessageLiteoutput. This does not
flush or close the stream.writeTo in interface MessageLitewriteTo in class GeneratedMessagejava.io.IOExceptionpublic int getSerializedSize()
MessageLitegetSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessagepublic boolean equals(java.lang.Object obj)
Messagetrue if the given object is a message of the same type (as
defined by getDescriptorForType()) and has identical values for
all of its fields. Subclasses must implement this; inheriting
Object.equals() is incorrect.equals in interface Messageequals in class AbstractMessageobj - object to be compared for equality with this messagetrue if the specified object is equal to this messagepublic int hashCode()
MessageObject.hashCode() is incorrect.hashCode in interface MessagehashCode in class AbstractMessageMap.hashCode()public static Method parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Method parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Method parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Method parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Method parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Method parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Method parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Method parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Method parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Method parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic Method.Builder newBuilderForType()
MessageLitenewBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static Method.Builder newBuilder()
public static Method.Builder newBuilder(Method prototype)
public Method.Builder toBuilder()
MessageLitetoBuilder in interface MessagetoBuilder in interface MessageLitepublic static Method getDefaultInstance()
public Parser<Method> getParserForType()
MessageLitegetParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessagepublic 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 MessageOrBuilder