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.BuilderParent, 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 |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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; |
List<Method> |
getMethodsList()
repeated .google.protobuf.Method methods = 2; |
MethodOrBuilder |
getMethodsOrBuilder(int index)
repeated .google.protobuf.Method methods = 2; |
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; |
List<Mixin> |
getMixinsList()
repeated .google.protobuf.Mixin mixins = 6; |
MixinOrBuilder |
getMixinsOrBuilder(int index)
repeated .google.protobuf.Mixin mixins = 6; |
List<? extends MixinOrBuilder> |
getMixinsOrBuilderList()
repeated .google.protobuf.Mixin mixins = 6; |
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; |
List<Option> |
getOptionsList()
repeated .google.protobuf.Option options = 3; |
OptionOrBuilder |
getOptionsOrBuilder(int index)
repeated .google.protobuf.Option options = 3; |
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. |
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; |
protected GeneratedMessage.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(GeneratedMessage.BuilderParent parent) |
static Api |
parseDelimitedFrom(InputStream input) |
static Api |
parseDelimitedFrom(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(InputStream input) |
static Api |
parseFrom(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 . |
computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtension, parseUnknownField, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashFields, toString
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 GeneratedMessage
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessage
internalGetFieldAccessorTable
in class GeneratedMessage
public 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 ApiOrBuilder
public 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 ApiOrBuilder
public List<Method> getMethodsList()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsList
in interface ApiOrBuilder
public List<? extends MethodOrBuilder> getMethodsOrBuilderList()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsOrBuilderList
in interface ApiOrBuilder
public int getMethodsCount()
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsCount
in interface ApiOrBuilder
public Method getMethods(int index)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethods
in interface ApiOrBuilder
public MethodOrBuilder getMethodsOrBuilder(int index)
repeated .google.protobuf.Method methods = 2;
The methods of this api, in unspecified order.
getMethodsOrBuilder
in interface ApiOrBuilder
public List<Option> getOptionsList()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsList
in interface ApiOrBuilder
public List<? extends OptionOrBuilder> getOptionsOrBuilderList()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsOrBuilderList
in interface ApiOrBuilder
public int getOptionsCount()
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsCount
in interface ApiOrBuilder
public Option getOptions(int index)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptions
in interface ApiOrBuilder
public OptionOrBuilder getOptionsOrBuilder(int index)
repeated .google.protobuf.Option options = 3;
Any metadata attached to the API.
getOptionsOrBuilder
in interface ApiOrBuilder
public 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 ApiOrBuilder
public 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 ApiOrBuilder
public boolean hasSourceContext()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
hasSourceContext
in interface ApiOrBuilder
public SourceContext getSourceContext()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
getSourceContext
in interface ApiOrBuilder
public SourceContextOrBuilder getSourceContextOrBuilder()
optional .google.protobuf.SourceContext source_context = 5;
Source context for the protocol buffer service represented by this message.
getSourceContextOrBuilder
in interface ApiOrBuilder
public List<Mixin> getMixinsList()
repeated .google.protobuf.Mixin mixins = 6;
Included APIs. See [Mixin][].
getMixinsList
in interface ApiOrBuilder
public List<? extends MixinOrBuilder> getMixinsOrBuilderList()
repeated .google.protobuf.Mixin mixins = 6;
Included APIs. See [Mixin][].
getMixinsOrBuilderList
in interface ApiOrBuilder
public int getMixinsCount()
repeated .google.protobuf.Mixin mixins = 6;
Included APIs. See [Mixin][].
getMixinsCount
in interface ApiOrBuilder
public Mixin getMixins(int index)
repeated .google.protobuf.Mixin mixins = 6;
Included APIs. See [Mixin][].
getMixins
in interface ApiOrBuilder
public MixinOrBuilder getMixinsOrBuilder(int index)
repeated .google.protobuf.Mixin mixins = 6;
Included APIs. See [Mixin][].
getMixinsOrBuilder
in interface ApiOrBuilder
public int getSyntaxValue()
optional .google.protobuf.Syntax syntax = 7;
The source syntax of the service.
getSyntaxValue
in interface ApiOrBuilder
public Syntax getSyntax()
optional .google.protobuf.Syntax syntax = 7;
The source syntax of the service.
getSyntax
in interface ApiOrBuilder
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessage
public void writeTo(CodedOutputStream output) throws IOException
MessageLite
output
. This does not
flush or close the stream.writeTo
in interface MessageLite
writeTo
in class GeneratedMessage
IOException
public int getSerializedSize()
MessageLite
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessage
public boolean equals(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(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(InputStream input) throws IOException
IOException
public static Api parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Api parseDelimitedFrom(InputStream input) throws IOException
IOException
public static Api parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static Api parseFrom(CodedInputStream input) throws IOException
IOException
public static Api parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
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(GeneratedMessage.BuilderParent parent)
newBuilderForType
in class GeneratedMessage
public static Api getDefaultInstance()
public Parser<Api> getParserForType()
MessageLite
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessage
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 © 2008–2015 Google. All rights reserved.