public final class Api extends GeneratedMessage implements ApiOrBuilder
google.protobuf.Api
Api is a light-weight descriptor for a protocol buffer service.
| Modifier and Type | Class and Description |
|---|---|
static class |
Api.Builder
Protobuf type
google.protobuf.Api |
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 |
METHODS_FIELD_NUMBER |
static int |
MIXINS_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
OPTIONS_FIELD_NUMBER |
static int |
SOURCE_CONTEXT_FIELD_NUMBER |
static int |
SYNTAX_FIELD_NUMBER |
static int |
VERSION_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this message for equality.
|
static Api |
getDefaultInstance() |
Api |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
static Descriptors.Descriptor |
getDescriptor() |
Method |
getMethods(int index)
repeated .google.protobuf.Method methods = 2; |
int |
getMethodsCount()
repeated .google.protobuf.Method methods = 2; |
java.util.List<Method> |
getMethodsList()
repeated .google.protobuf.Method methods = 2; |
MethodOrBuilder |
getMethodsOrBuilder(int index)
repeated .google.protobuf.Method methods = 2; |
java.util.List<? extends MethodOrBuilder> |
getMethodsOrBuilderList()
repeated .google.protobuf.Method methods = 2; |
Mixin |
getMixins(int index)
repeated .google.protobuf.Mixin mixins = 6; |
int |
getMixinsCount()
repeated .google.protobuf.Mixin mixins = 6; |
java.util.List<Mixin> |
getMixinsList()
repeated .google.protobuf.Mixin mixins = 6; |
MixinOrBuilder |
getMixinsOrBuilder(int index)
repeated .google.protobuf.Mixin mixins = 6; |
java.util.List<? extends MixinOrBuilder> |
getMixinsOrBuilderList()
repeated .google.protobuf.Mixin mixins = 6; |
java.lang.String |
getName()
optional string name = 1; |
ByteString |
getNameBytes()
optional string name = 1; |
Option |
getOptions(int index)
repeated .google.protobuf.Option options = 3; |
int |
getOptionsCount()
repeated .google.protobuf.Option options = 3; |
java.util.List<Option> |
getOptionsList()
repeated .google.protobuf.Option options = 3; |
OptionOrBuilder |
getOptionsOrBuilder(int index)
repeated .google.protobuf.Option options = 3; |
java.util.List<? extends OptionOrBuilder> |
getOptionsOrBuilderList()
repeated .google.protobuf.Option options = 3; |
Parser<Api> |
getParserForType()
Gets the parser for a message of the same type as this message.
|
int |
getSerializedSize()
Get the number of bytes required to encode this message.
|
SourceContext |
getSourceContext()
optional .google.protobuf.SourceContext source_context = 5; |
SourceContextOrBuilder |
getSourceContextOrBuilder()
optional .google.protobuf.SourceContext source_context = 5; |
Syntax |
getSyntax()
optional .google.protobuf.Syntax syntax = 7; |
int |
getSyntaxValue()
optional .google.protobuf.Syntax syntax = 7; |
UnknownFieldSet |
getUnknownFields()
Get the
UnknownFieldSet for this message. |
java.lang.String |
getVersion()
optional string version = 4; |
ByteString |
getVersionBytes()
optional string version = 4; |
int |
hashCode()
Returns the hash code value for this message.
|
boolean |
hasSourceContext()
optional .google.protobuf.SourceContext source_context = 5; |
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded
messages are set, false otherwise.
|
static Api.Builder |
newBuilder() |
static Api.Builder |
newBuilder(Api prototype) |
Api.Builder |
newBuilderForType()
Constructs a new builder for a message of the same type as this message.
|
static Api |
parseDelimitedFrom(java.io.InputStream input) |
static Api |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Api |
parseFrom(byte[] data) |
static Api |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Api |
parseFrom(ByteString data) |
static Api |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static Api |
parseFrom(CodedInputStream input) |
static Api |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static Api |
parseFrom(java.io.InputStream input) |
static Api |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<Api> |
parser() |
Api.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 METHODS_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER
public static final int VERSION_FIELD_NUMBER
public static final int SOURCE_CONTEXT_FIELD_NUMBER
public static final int MIXINS_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 fully qualified name of this api, including package name followed by the api's simple name.
getName in interface ApiOrBuilderpublic ByteString getNameBytes()
optional string name = 1;
The fully qualified name of this api, including package name followed by the api's simple name.
getNameBytes in interface ApiOrBuilderpublic java.util.List<Method> getMethodsList()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsList in interface ApiOrBuilderpublic java.util.List<? extends MethodOrBuilder> getMethodsOrBuilderList()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsOrBuilderList in interface ApiOrBuilderpublic int getMethodsCount()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsCount in interface ApiOrBuilderpublic Method getMethods(int index)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethods in interface ApiOrBuilderpublic MethodOrBuilder getMethodsOrBuilder(int index)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsOrBuilder in interface ApiOrBuilderpublic java.util.List<Option> getOptionsList()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsList in interface ApiOrBuilderpublic java.util.List<? extends OptionOrBuilder> getOptionsOrBuilderList()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsOrBuilderList in interface ApiOrBuilderpublic int getOptionsCount()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsCount in interface ApiOrBuilderpublic Option getOptions(int index)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptions in interface ApiOrBuilderpublic OptionOrBuilder getOptionsOrBuilder(int index)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsOrBuilder in interface ApiOrBuilderpublic java.lang.String getVersion()
optional string version = 4;
A version string for this api. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the API, which must end in `v<major-version>`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, none-GA apis.
getVersion in interface ApiOrBuilderpublic ByteString getVersionBytes()
optional string version = 4;
A version string for this api. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the API, which must end in `v<major-version>`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, none-GA apis.
getVersionBytes in interface ApiOrBuilderpublic boolean hasSourceContext()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
hasSourceContext in interface ApiOrBuilderpublic SourceContext getSourceContext()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
getSourceContext in interface ApiOrBuilderpublic SourceContextOrBuilder getSourceContextOrBuilder()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
getSourceContextOrBuilder in interface ApiOrBuilderpublic java.util.List<Mixin> getMixinsList()
repeated .google.protobuf.Mixin mixins = 6;
Included APIs. See [Mixin][].
getMixinsList in interface ApiOrBuilderpublic java.util.List<? extends MixinOrBuilder> getMixinsOrBuilderList()
repeated .google.protobuf.Mixin mixins = 6;
Included APIs. See [Mixin][].
getMixinsOrBuilderList in interface ApiOrBuilderpublic int getMixinsCount()
repeated .google.protobuf.Mixin mixins = 6;
Included APIs. See [Mixin][].
getMixinsCount in interface ApiOrBuilderpublic Mixin getMixins(int index)
repeated .google.protobuf.Mixin mixins = 6;
Included APIs. See [Mixin][].
getMixins in interface ApiOrBuilderpublic MixinOrBuilder getMixinsOrBuilder(int index)
repeated .google.protobuf.Mixin mixins = 6;
Included APIs. See [Mixin][].
getMixinsOrBuilder in interface ApiOrBuilderpublic int getSyntaxValue()
optional .google.protobuf.Syntax syntax = 7;
The source syntax of the service.
getSyntaxValue in interface ApiOrBuilderpublic Syntax getSyntax()
optional .google.protobuf.Syntax syntax = 7;
The source syntax of the service.
getSyntax in interface ApiOrBuilderpublic 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 Api parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Api parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Api parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Api parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Api parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Api parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Api parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Api parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Api parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Api parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic Api.Builder newBuilderForType()
MessageLitenewBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static Api.Builder newBuilder()
public static Api.Builder newBuilder(Api prototype)
public Api.Builder toBuilder()
MessageLitetoBuilder in interface MessagetoBuilder in interface MessageLitepublic static Api getDefaultInstance()
public Parser<Api> getParserForType()
MessageLitegetParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessagepublic Api 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