Class Api
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.
Inheritance
System.Object
Api
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Google.Protobuf.dll
Syntax
public sealed class Api : IMessage<Api>, IMessage, IEquatable<Api>, IDeepCloneable<Api>
Constructors
Api()
Declaration
Api(Api)
Declaration
Parameters
Type |
Name |
Description |
Api |
other |
|
Fields
MethodsFieldNumber
Field number for the "methods" field.
Declaration
public const int MethodsFieldNumber = 2
Field Value
Type |
Description |
System.Int32 |
|
MixinsFieldNumber
Field number for the "mixins" field.
Declaration
public const int MixinsFieldNumber = 6
Field Value
Type |
Description |
System.Int32 |
|
NameFieldNumber
Field number for the "name" field.
Declaration
public const int NameFieldNumber = 1
Field Value
Type |
Description |
System.Int32 |
|
OptionsFieldNumber
Field number for the "options" field.
Declaration
public const int OptionsFieldNumber = 3
Field Value
Type |
Description |
System.Int32 |
|
SourceContextFieldNumber
Field number for the "source_context" field.
Declaration
public const int SourceContextFieldNumber = 5
Field Value
Type |
Description |
System.Int32 |
|
SyntaxFieldNumber
Field number for the "syntax" field.
Declaration
public const int SyntaxFieldNumber = 7
Field Value
Type |
Description |
System.Int32 |
|
VersionFieldNumber
Field number for the "version" field.
Declaration
public const int VersionFieldNumber = 4
Field Value
Type |
Description |
System.Int32 |
|
Properties
Descriptor
Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
Methods
The methods of this interface, in unspecified order.
Declaration
public RepeatedField<Method> Methods { get; }
Property Value
Mixins
Included interfaces. See [Mixin][].
Declaration
public RepeatedField<Mixin> Mixins { get; }
Property Value
Name
The fully qualified name of this interface, including package name
followed by the interface's simple name.
Declaration
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
Options
Any metadata attached to the interface.
Declaration
public RepeatedField<Option> Options { get; }
Property Value
Parser
Declaration
public static MessageParser<Api> Parser { get; }
Property Value
SourceContext
Source context for the protocol buffer service represented by this
message.
Declaration
public SourceContext SourceContext { get; set; }
Property Value
Syntax
The source syntax of the service.
Declaration
public Syntax Syntax { get; set; }
Property Value
Version
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.
Declaration
public string Version { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Type |
Description |
System.Int32 |
|
Implements
Clone()
Declaration
Returns
Implements
Equals(Api)
Declaration
public bool Equals(Api other)
Parameters
Type |
Name |
Description |
Api |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>.Equals(T)
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Implements
MergeFrom(Api)
Declaration
public void MergeFrom(Api other)
Parameters
Type |
Name |
Description |
Api |
other |
|
Implements
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
WriteTo(CodedOutputStream)
Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Implements
Explicit Interface Implementations
IMessage.Descriptor
Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Implements
Extension Methods