public sealed class Api : object, IMessage<Api>, IEquatable<Api>, IDeepCloneable<Api>, IBufferMessage, IMessage
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.
Namespace
Google.Protobuf.WellKnownTypes
Assembly
Google.Protobuf.dll
Constructors
Api()
Api(Api)
Parameter
Fields
MethodsFieldNumber
public const int MethodsFieldNumber = null
Field number for the "methods" field.
Field Value
MixinsFieldNumber
public const int MixinsFieldNumber = null
Field number for the "mixins" field.
Field Value
NameFieldNumber
public const int NameFieldNumber = null
Field number for the "name" field.
Field Value
OptionsFieldNumber
public const int OptionsFieldNumber = null
Field number for the "options" field.
Field Value
SourceContextFieldNumber
public const int SourceContextFieldNumber = null
Field number for the "source_context" field.
Field Value
SyntaxFieldNumber
public const int SyntaxFieldNumber = null
Field number for the "syntax" field.
Field Value
VersionFieldNumber
public const int VersionFieldNumber = null
Field number for the "version" field.
Field Value
Properties
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
Methods
public RepeatedField<Method> Methods { get; }
The methods of this interface, in unspecified order.
Property Value
Mixins
public RepeatedField<Mixin> Mixins { get; }
Included interfaces. See [Mixin][].
Property Value
Name
public string Name { get; set; }
The fully qualified name of this interface, including package name
followed by the interface's simple name.
Property Value
Options
public RepeatedField<Option> Options { get; }
Any metadata attached to the interface.
Property Value
Parser
public static MessageParser<Api> Parser { get; }
Property Value
SourceContext
public SourceContext SourceContext { get; set; }
Source context for the protocol buffer service represented by this
message.
Property Value
Syntax
public Syntax Syntax { get; set; }
The source syntax of the service.
Property Value
Version
public string Version { get; set; }
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 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.
Property Value
Methods
CalculateSize()
public int CalculateSize()
Returns
Clone()
Returns
Equals(Api)
public bool Equals(Api other)
Parameter
Returns
Equals(Object)
public override bool Equals(object other)
Parameter
Returns
GetHashCode()
public override int GetHashCode()
Returns
public void MergeFrom(CodedInputStream input)
Parameter
MergeFrom(Api)
public void MergeFrom(Api other)
Parameter
ToString()
public override string ToString()
Returns
WriteTo(CodedOutputStream)
public void WriteTo(CodedOutputStream output)
Parameter
Explicit Interface Implementations
IBufferMessage.InternalMergeFrom(ref ParseContext)
void IBufferMessage.InternalMergeFrom(ref ParseContext input)
Parameter
IBufferMessage.InternalWriteTo(ref WriteContext)
void IBufferMessage.InternalWriteTo(ref WriteContext output)
Parameter
IMessage.Descriptor
MessageDescriptor IMessage.Descriptor { get; }
Returns