public final class Api extends com.google.protobuf.GeneratedMessageV3 implements ApiOrBuilder
Api is a light-weight descriptor for an API Interface. Interfaces are also described as "protocol buffer services" in some contexts, such as by the "service" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as "APIs" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.Protobuf type
google.protobuf.Api| Modifier and Type | Class and Description |
|---|---|
static class |
Api.Builder
Api is a light-weight descriptor for an API Interface.
|
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable| 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)
The methods of this interface, in unspecified order.
|
int |
getMethodsCount()
The methods of this interface, in unspecified order.
|
java.util.List<Method> |
getMethodsList()
The methods of this interface, in unspecified order.
|
MethodOrBuilder |
getMethodsOrBuilder(int index)
The methods of this interface, in unspecified order.
|
java.util.List<? extends MethodOrBuilder> |
getMethodsOrBuilderList()
The methods of this interface, in unspecified order.
|
Mixin |
getMixins(int index)
Included interfaces.
|
int |
getMixinsCount()
Included interfaces.
|
java.util.List<Mixin> |
getMixinsList()
Included interfaces.
|
MixinOrBuilder |
getMixinsOrBuilder(int index)
Included interfaces.
|
java.util.List<? extends MixinOrBuilder> |
getMixinsOrBuilderList()
Included interfaces.
|
java.lang.String |
getName()
The fully qualified name of this interface, including package name
followed by the interface's simple name.
|
ByteString |
getNameBytes()
The fully qualified name of this interface, including package name
followed by the interface's simple name.
|
Option |
getOptions(int index)
Any metadata attached to the interface.
|
int |
getOptionsCount()
Any metadata attached to the interface.
|
java.util.List<Option> |
getOptionsList()
Any metadata attached to the interface.
|
OptionOrBuilder |
getOptionsOrBuilder(int index)
Any metadata attached to the interface.
|
java.util.List<? extends OptionOrBuilder> |
getOptionsOrBuilderList()
Any metadata attached to the interface.
|
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()
Source context for the protocol buffer service represented by this
message.
|
SourceContextOrBuilder |
getSourceContextOrBuilder()
Source context for the protocol buffer service represented by this
message.
|
Syntax |
getSyntax()
The source syntax of the service.
|
int |
getSyntaxValue()
The source syntax of the service.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields()
Get the
UnknownFieldSet for this message. |
java.lang.String |
getVersion()
A version string for this interface.
|
ByteString |
getVersionBytes()
A version string for this interface.
|
int |
hashCode()
Returns the hash code value for this message.
|
boolean |
hasSourceContext()
Source context for the protocol buffer service represented by this
message.
|
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(java.nio.ByteBuffer data) |
static Api |
parseFrom(java.nio.ByteBuffer 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, hasOneoffindInitializationErrors, 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 com.google.protobuf.UnknownFieldSet getUnknownFields()
MessageOrBuilderUnknownFieldSet for this message.getUnknownFields in interface MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final Descriptors.Descriptor getDescriptor()
public java.lang.String getName()
The fully qualified name of this interface, including package name followed by the interface's simple name.
string name = 1;getName in interface ApiOrBuilderpublic ByteString getNameBytes()
The fully qualified name of this interface, including package name followed by the interface's simple name.
string name = 1;getNameBytes in interface ApiOrBuilderpublic java.util.List<Method> getMethodsList()
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;getMethodsList in interface ApiOrBuilderpublic java.util.List<? extends MethodOrBuilder> getMethodsOrBuilderList()
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;getMethodsOrBuilderList in interface ApiOrBuilderpublic int getMethodsCount()
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;getMethodsCount in interface ApiOrBuilderpublic Method getMethods(int index)
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;getMethods in interface ApiOrBuilderpublic MethodOrBuilder getMethodsOrBuilder(int index)
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;getMethodsOrBuilder in interface ApiOrBuilderpublic java.util.List<Option> getOptionsList()
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;getOptionsList in interface ApiOrBuilderpublic java.util.List<? extends OptionOrBuilder> getOptionsOrBuilderList()
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;getOptionsOrBuilderList in interface ApiOrBuilderpublic int getOptionsCount()
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;getOptionsCount in interface ApiOrBuilderpublic Option getOptions(int index)
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;getOptions in interface ApiOrBuilderpublic OptionOrBuilder getOptionsOrBuilder(int index)
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;getOptionsOrBuilder in interface ApiOrBuilderpublic java.lang.String getVersion()
A version string for this interface. 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 interface, 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, non-GA interfaces.
string version = 4;getVersion in interface ApiOrBuilderpublic ByteString getVersionBytes()
A version string for this interface. 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 interface, 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, non-GA interfaces.
string version = 4;getVersionBytes in interface ApiOrBuilderpublic boolean hasSourceContext()
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5;hasSourceContext in interface ApiOrBuilderpublic SourceContext getSourceContext()
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5;getSourceContext in interface ApiOrBuilderpublic SourceContextOrBuilder getSourceContextOrBuilder()
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5;getSourceContextOrBuilder in interface ApiOrBuilderpublic java.util.List<Mixin> getMixinsList()
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;getMixinsList in interface ApiOrBuilderpublic java.util.List<? extends MixinOrBuilder> getMixinsOrBuilderList()
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;getMixinsOrBuilderList in interface ApiOrBuilderpublic int getMixinsCount()
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;getMixinsCount in interface ApiOrBuilderpublic Mixin getMixins(int index)
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;getMixins in interface ApiOrBuilderpublic MixinOrBuilder getMixinsOrBuilder(int index)
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;getMixinsOrBuilder in interface ApiOrBuilderpublic int getSyntaxValue()
The source syntax of the service.
.google.protobuf.Syntax syntax = 7;getSyntaxValue in interface ApiOrBuilderpublic Syntax getSyntax()
The source syntax of the service.
.google.protobuf.Syntax syntax = 7;getSyntax in interface ApiOrBuilderpublic final boolean isInitialized()
MessageLiteOrBuilderisInitialized in interface MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(CodedOutputStream output) throws java.io.IOException
MessageLiteoutput. This does not flush or close the
stream.writeTo in interface MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
MessageLitegetSerializedSize in interface MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public 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(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Api parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic 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 com.google.protobuf.GeneratedMessageV3public 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