Class Method
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.protobuf.Method
- All Implemented Interfaces:
Message, MessageLite, MessageLiteOrBuilder, MessageOrBuilder, MethodOrBuilder, Serializable
Method represents a method of an API interface. New usages of this message as an alternative to MethodDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.Protobuf type
google.protobuf.Method- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMethod represents a method of an API interface.Nested classes/interfaces inherited from class GeneratedMessage
GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>, GeneratedMessage.ExtendableMessage<MessageT>, GeneratedMessage.ExtendableMessageOrBuilder<MessageT>, GeneratedMessage.ExtensionDescriptorRetriever, GeneratedMessage.FieldAccessorTable, GeneratedMessage.GeneratedExtension<ContainingT, T>, GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class AbstractMessage
AbstractMessage.BuilderParentNested classes/interfaces inherited from class AbstractMessageLite
AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Methodprivate Objectstatic final intprivate byteprivate Objectstatic final intstatic final intstatic final intstatic final intprivate booleanprivate Objectstatic final intstatic final intprivate booleanprivate Objectprivate static final longprivate intstatic final intFields inherited from class GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, PRE22_GENCODE_ERROR_PROPERTY, PRE22_GENCODE_SILENCE_PROPERTY, PRE22_GENCODE_VULNERABILITY_MESSAGE, unknownFieldsFields inherited from class AbstractMessage
memoizedSizeFields inherited from class AbstractMessageLite
memoizedHashCode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMethod()privateMethod(GeneratedMessage.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares the specified object with this message for equality.static MethodGet an instance of the type with no fields set.static final Descriptors.DescriptorGet the message's type's descriptor.Deprecated.google.protobuf.Method.edition is deprecated.Deprecated.google.protobuf.Method.edition is deprecated.getName()The simple name of this method.The simple name of this method.getOptions(int index) Any metadata attached to the method.intAny metadata attached to the method.Any metadata attached to the method.getOptionsOrBuilder(int index) Any metadata attached to the method.List<? extends OptionOrBuilder> Any metadata attached to the method.TODO: Remove this unnecessary intermediate implementation of this method.booleanIf true, the request is streamed.A URL of the input message type.A URL of the input message type.booleanIf true, the response is streamed.The URL of the output message type.The URL of the output message type.intGet the number of bytes required to encode this message.Deprecated.google.protobuf.Method.syntax is deprecated.intDeprecated.google.protobuf.Method.syntax is deprecated.inthashCode()Returns the hash code value for this message.protected GeneratedMessage.FieldAccessorTableGet the FieldAccessorTable for this type.final booleanReturns true if all required fields in the message and all embedded messages are set, false otherwise.static Method.Builderstatic Method.BuildernewBuilder(Method prototype) Constructs a new builder for a message of the same type as this message.protected Method.BuilderCreate a nested builder.static MethodparseDelimitedFrom(InputStream input) static MethodparseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static MethodparseFrom(byte[] data) static MethodparseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) static MethodparseFrom(ByteString data) static MethodparseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) static MethodparseFrom(CodedInputStream input) static MethodparseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) static MethodparseFrom(InputStream input) static MethodparseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static MethodparseFrom(ByteBuffer data) static MethodparseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) parser()Constructs a builder initialized with the current message.voidwriteTo(CodedOutputStream output) Serializes the message and writes it tooutput.Methods inherited from class GeneratedMessage
computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, enableAlwaysUseFieldBuildersForTesting, getAllFields, getAllFieldsRaw, getField, getFieldRaw, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, setAlwaysUseFieldBuildersForTesting, setUnknownFields, warnPre22Gencode, writeReplace, writeString, writeStringNoTagMethods inherited from class AbstractMessage
compareFields, findInitializationErrors, getInitializationErrorString, getMemoizedSerializedSize, hashFields, newUninitializedMessageException, setMemoizedSerializedSize, toStringMethods inherited from class AbstractMessageLite
addAll, checkByteStringIsUtf8, getSerializedSize, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
name_
-
REQUEST_TYPE_URL_FIELD_NUMBER
public static final int REQUEST_TYPE_URL_FIELD_NUMBER- See Also:
-
requestTypeUrl_
-
REQUEST_STREAMING_FIELD_NUMBER
public static final int REQUEST_STREAMING_FIELD_NUMBER- See Also:
-
requestStreaming_
private boolean requestStreaming_ -
RESPONSE_TYPE_URL_FIELD_NUMBER
public static final int RESPONSE_TYPE_URL_FIELD_NUMBER- See Also:
-
responseTypeUrl_
-
RESPONSE_STREAMING_FIELD_NUMBER
public static final int RESPONSE_STREAMING_FIELD_NUMBER- See Also:
-
responseStreaming_
private boolean responseStreaming_ -
OPTIONS_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER- See Also:
-
options_
-
SYNTAX_FIELD_NUMBER
public static final int SYNTAX_FIELD_NUMBER- See Also:
-
syntax_
private int syntax_ -
EDITION_FIELD_NUMBER
public static final int EDITION_FIELD_NUMBER- See Also:
-
edition_
-
memoizedIsInitialized
private byte memoizedIsInitialized -
DEFAULT_INSTANCE
-
PARSER
-
-
Constructor Details
-
Method
-
Method
private Method()
-
-
Method Details
-
getDescriptor
-
getDescriptorForType
Description copied from interface:MessageOrBuilderGet the message's type's descriptor. This differs from thegetDescriptor()method of generated message classes in that this method is an abstract method of theMessageinterface whereasgetDescriptor()is a static method of a specific class. They return the same thing.- Specified by:
getDescriptorForTypein interfaceMessageOrBuilder- Overrides:
getDescriptorForTypein classGeneratedMessage
-
internalGetFieldAccessorTable
Description copied from class:GeneratedMessageGet the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.- Specified by:
internalGetFieldAccessorTablein classGeneratedMessage
-
getName
The simple name of this method.
string name = 1;- Specified by:
getNamein interfaceMethodOrBuilder- Returns:
- The name.
-
getNameBytes
The simple name of this method.
string name = 1;- Specified by:
getNameBytesin interfaceMethodOrBuilder- Returns:
- The bytes for name.
-
getRequestTypeUrl
A URL of the input message type.
string request_type_url = 2;- Specified by:
getRequestTypeUrlin interfaceMethodOrBuilder- Returns:
- The requestTypeUrl.
-
getRequestTypeUrlBytes
A URL of the input message type.
string request_type_url = 2;- Specified by:
getRequestTypeUrlBytesin interfaceMethodOrBuilder- Returns:
- The bytes for requestTypeUrl.
-
getRequestStreaming
public boolean getRequestStreaming()If true, the request is streamed.
bool request_streaming = 3;- Specified by:
getRequestStreamingin interfaceMethodOrBuilder- Returns:
- The requestStreaming.
-
getResponseTypeUrl
The URL of the output message type.
string response_type_url = 4;- Specified by:
getResponseTypeUrlin interfaceMethodOrBuilder- Returns:
- The responseTypeUrl.
-
getResponseTypeUrlBytes
The URL of the output message type.
string response_type_url = 4;- Specified by:
getResponseTypeUrlBytesin interfaceMethodOrBuilder- Returns:
- The bytes for responseTypeUrl.
-
getResponseStreaming
public boolean getResponseStreaming()If true, the response is streamed.
bool response_streaming = 5;- Specified by:
getResponseStreamingin interfaceMethodOrBuilder- Returns:
- The responseStreaming.
-
getOptionsList
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;- Specified by:
getOptionsListin interfaceMethodOrBuilder
-
getOptionsOrBuilderList
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;- Specified by:
getOptionsOrBuilderListin interfaceMethodOrBuilder
-
getOptionsCount
public int getOptionsCount()Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;- Specified by:
getOptionsCountin interfaceMethodOrBuilder
-
getOptions
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;- Specified by:
getOptionsin interfaceMethodOrBuilder
-
getOptionsOrBuilder
Any metadata attached to the method.
repeated .google.protobuf.Option options = 6;- Specified by:
getOptionsOrBuilderin interfaceMethodOrBuilder
-
getSyntaxValue
Deprecated.google.protobuf.Method.syntax is deprecated. See google/protobuf/api.proto;l=134The source syntax of this method. This field should be ignored, instead the syntax should be inherited from Api. This is similar to Field and EnumValue.
.google.protobuf.Syntax syntax = 7 [deprecated = true];- Specified by:
getSyntaxValuein interfaceMethodOrBuilder- Returns:
- The enum numeric value on the wire for syntax.
-
getSyntax
Deprecated.google.protobuf.Method.syntax is deprecated. See google/protobuf/api.proto;l=134The source syntax of this method. This field should be ignored, instead the syntax should be inherited from Api. This is similar to Field and EnumValue.
.google.protobuf.Syntax syntax = 7 [deprecated = true];- Specified by:
getSyntaxin interfaceMethodOrBuilder- Returns:
- The syntax.
-
getEdition
Deprecated.google.protobuf.Method.edition is deprecated. See google/protobuf/api.proto;l=140The source edition string, only valid when syntax is SYNTAX_EDITIONS. This field should be ignored, instead the edition should be inherited from Api. This is similar to Field and EnumValue.
string edition = 8 [deprecated = true];- Specified by:
getEditionin interfaceMethodOrBuilder- Returns:
- The edition.
-
getEditionBytes
Deprecated.google.protobuf.Method.edition is deprecated. See google/protobuf/api.proto;l=140The source edition string, only valid when syntax is SYNTAX_EDITIONS. This field should be ignored, instead the edition should be inherited from Api. This is similar to Field and EnumValue.
string edition = 8 [deprecated = true];- Specified by:
getEditionBytesin interfaceMethodOrBuilder- Returns:
- The bytes for edition.
-
isInitialized
public final boolean isInitialized()Description copied from interface:MessageLiteOrBuilderReturns true if all required fields in the message and all embedded messages are set, false otherwise.- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessage
-
writeTo
Description copied from interface:MessageLiteSerializes the message and writes it tooutput. This does not flush or close the stream.- Specified by:
writeToin interfaceMessageLite- Overrides:
writeToin classGeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()Description copied from interface:MessageLiteGet the number of bytes required to encode this message. The result is only computed on the first call and memoized after that. If this message requires more than Integer.MAX_VALUE bytes to encode, the return value will be smaller than the actual number of bytes required and might be negative.- Specified by:
getSerializedSizein interfaceMessageLite- Overrides:
getSerializedSizein classGeneratedMessage
-
equals
Description copied from interface:MessageCompares the specified object with this message for equality. Returnstrueif the given object is a message of the same type (as defined bygetDescriptorForType()) and has identical values for all of its fields. Subclasses must implement this; inheritingObject.equals()is incorrect.- Specified by:
equalsin interfaceMessage- Overrides:
equalsin classAbstractMessage- Parameters:
obj- object to be compared for equality with this message- Returns:
trueif the specified object is equal to this message
-
hashCode
public int hashCode()Description copied from interface:MessageReturns the hash code value for this message. The hash code of a message should mix the message's type (object identity of the descriptor) with its contents (known and unknown field values). Subclasses must implement this; inheritingObject.hashCode()is incorrect.- Specified by:
hashCodein interfaceMessage- Overrides:
hashCodein classAbstractMessage- Returns:
- the hash code value for this message
- See Also:
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Method parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Method parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Method parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Method parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Method parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Method parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
Description copied from interface:MessageLiteConstructs a new builder for a message of the same type as this message.- Specified by:
newBuilderForTypein interfaceMessage- Specified by:
newBuilderForTypein interfaceMessageLite
-
newBuilder
-
newBuilder
-
toBuilder
Description copied from interface:MessageLiteConstructs a builder initialized with the current message. Use this to derive a new message from the current one.- Specified by:
toBuilderin interfaceMessage- Specified by:
toBuilderin interfaceMessageLite
-
newBuilderForType
Description copied from class:AbstractMessageCreate a nested builder.- Overrides:
newBuilderForTypein classAbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
Description copied from class:GeneratedMessageTODO: Remove this unnecessary intermediate implementation of this method.- Specified by:
getParserForTypein interfaceMessage- Specified by:
getParserForTypein interfaceMessageLite- Overrides:
getParserForTypein classGeneratedMessage
-
getDefaultInstanceForType
Description copied from interface:MessageLiteOrBuilderGet an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from thegetDefaultInstance()method of generated message classes in that this method is an abstract method of theMessageLiteinterface whereasgetDefaultInstance()is a static method of a specific class. They return the same thing.- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-