@Generated(value="proto") public final class Api extends 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.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, 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 |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
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.
|
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.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable()
Get the FieldAccessorTable for this type.
|
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.
|
protected Api.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
TODO(xiaofeng): remove this together with GeneratedMessageV3.BuilderParent.
|
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 . |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public 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()
MessageOrBuilder
UnknownFieldSet
for this message.getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessageV3
internalGetFieldAccessorTable
in class GeneratedMessageV3
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 ApiOrBuilder
public 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 ApiOrBuilder
public java.util.List<Method> getMethodsList()
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;
getMethodsList
in interface ApiOrBuilder
public java.util.List<? extends MethodOrBuilder> getMethodsOrBuilderList()
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;
getMethodsOrBuilderList
in interface ApiOrBuilder
public int getMethodsCount()
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;
getMethodsCount
in interface ApiOrBuilder
public Method getMethods(int index)
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;
getMethods
in interface ApiOrBuilder
public MethodOrBuilder getMethodsOrBuilder(int index)
The methods of this interface, in unspecified order.
repeated .google.protobuf.Method methods = 2;
getMethodsOrBuilder
in interface ApiOrBuilder
public java.util.List<Option> getOptionsList()
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;
getOptionsList
in interface ApiOrBuilder
public java.util.List<? extends OptionOrBuilder> getOptionsOrBuilderList()
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;
getOptionsOrBuilderList
in interface ApiOrBuilder
public int getOptionsCount()
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;
getOptionsCount
in interface ApiOrBuilder
public Option getOptions(int index)
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;
getOptions
in interface ApiOrBuilder
public OptionOrBuilder getOptionsOrBuilder(int index)
Any metadata attached to the interface.
repeated .google.protobuf.Option options = 3;
getOptionsOrBuilder
in interface ApiOrBuilder
public 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 ApiOrBuilder
public 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 ApiOrBuilder
public boolean hasSourceContext()
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5;
hasSourceContext
in interface ApiOrBuilder
public SourceContext getSourceContext()
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5;
getSourceContext
in interface ApiOrBuilder
public SourceContextOrBuilder getSourceContextOrBuilder()
Source context for the protocol buffer service represented by this message.
.google.protobuf.SourceContext source_context = 5;
getSourceContextOrBuilder
in interface ApiOrBuilder
public java.util.List<Mixin> getMixinsList()
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;
getMixinsList
in interface ApiOrBuilder
public java.util.List<? extends MixinOrBuilder> getMixinsOrBuilderList()
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;
getMixinsOrBuilderList
in interface ApiOrBuilder
public int getMixinsCount()
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;
getMixinsCount
in interface ApiOrBuilder
public Mixin getMixins(int index)
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;
getMixins
in interface ApiOrBuilder
public MixinOrBuilder getMixinsOrBuilder(int index)
Included interfaces. See [Mixin][].
repeated .google.protobuf.Mixin mixins = 6;
getMixinsOrBuilder
in interface ApiOrBuilder
public int getSyntaxValue()
The source syntax of the service.
.google.protobuf.Syntax syntax = 7;
getSyntaxValue
in interface ApiOrBuilder
public Syntax getSyntax()
The source syntax of the service.
.google.protobuf.Syntax syntax = 7;
getSyntax
in interface ApiOrBuilder
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws java.io.IOException
MessageLite
output
. This does not flush or close the
stream.writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
java.io.IOException
public int getSerializedSize()
MessageLite
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(java.lang.Object obj)
Message
true
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 Message
equals
in class AbstractMessage
obj
- object to be compared for equality with this messagetrue
if the specified object is equal to this messagepublic int hashCode()
Message
Object.hashCode()
is incorrect.hashCode
in interface Message
hashCode
in class AbstractMessage
Map.hashCode()
public static Api parseFrom(java.nio.ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Api parseFrom(java.nio.ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Api parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Api parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Api parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Api parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Api parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Api parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Api parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Api parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Api parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static Api parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public Api.Builder newBuilderForType()
MessageLite
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static Api.Builder newBuilder()
public static Api.Builder newBuilder(Api prototype)
public Api.Builder toBuilder()
MessageLite
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected Api.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
GeneratedMessageV3
newBuilderForType
in class GeneratedMessageV3
public static Api getDefaultInstance()
public Parser<Api> getParserForType()
MessageLite
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public Api getDefaultInstanceForType()
MessageLiteOrBuilder
getDefaultInstance()
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 MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.