From 18e0a2e5ec883d665a4e8fe57a1eb3e603340de7 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 1 Oct 2015 10:38:01 +0100 Subject: Generated code from previous commit. --- csharp/src/Google.Protobuf/WellKnownTypes/Api.cs | 154 +++++++++++++++++++++++ 1 file changed, 154 insertions(+) (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/Api.cs') diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs index f2166ca5..2c64314d 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs @@ -54,6 +54,9 @@ namespace Google.Protobuf.WellKnownTypes { } } #region Messages + /// + /// Api is a light-weight descriptor for a protocol buffer service. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Api : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Api()); @@ -87,8 +90,13 @@ namespace Google.Protobuf.WellKnownTypes { return new Api(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; + /// + /// The fully qualified name of this api, including package name + /// followed by the api's simple name. + /// public string Name { get { return name_; } set { @@ -96,24 +104,53 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "methods" field. public const int MethodsFieldNumber = 2; private static readonly pb::FieldCodec _repeated_methods_codec = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Method.Parser); private readonly pbc::RepeatedField methods_ = new pbc::RepeatedField(); + /// + /// The methods of this api, in unspecified order. + /// public pbc::RepeatedField Methods { get { return methods_; } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 3; private static readonly pb::FieldCodec _repeated_options_codec = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// Any metadata attached to the API. + /// public pbc::RepeatedField Options { get { return options_; } } + /// Field number for the "version" field. public const int VersionFieldNumber = 4; private string version_ = ""; + /// + /// 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. + /// public string Version { get { return version_; } set { @@ -121,8 +158,13 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "source_context" field. public const int SourceContextFieldNumber = 5; private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; + /// + /// Source context for the protocol buffer service represented by this + /// message. + /// public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { get { return sourceContext_; } set { @@ -130,16 +172,24 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "mixins" field. public const int MixinsFieldNumber = 6; private static readonly pb::FieldCodec _repeated_mixins_codec = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Mixin.Parser); private readonly pbc::RepeatedField mixins_ = new pbc::RepeatedField(); + /// + /// Included APIs. See [Mixin][]. + /// public pbc::RepeatedField Mixins { get { return mixins_; } } + /// Field number for the "syntax" field. public const int SyntaxFieldNumber = 7; private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2; + /// + /// The source syntax of the service. + /// public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { @@ -294,6 +344,9 @@ namespace Google.Protobuf.WellKnownTypes { } + /// + /// Method represents a method of an api. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Method : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Method()); @@ -327,8 +380,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Method(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; + /// + /// The simple name of this method. + /// public string Name { get { return name_; } set { @@ -336,8 +393,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "request_type_url" field. public const int RequestTypeUrlFieldNumber = 2; private string requestTypeUrl_ = ""; + /// + /// A URL of the input message type. + /// public string RequestTypeUrl { get { return requestTypeUrl_; } set { @@ -345,8 +406,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "request_streaming" field. public const int RequestStreamingFieldNumber = 3; private bool requestStreaming_; + /// + /// If true, the request is streamed. + /// public bool RequestStreaming { get { return requestStreaming_; } set { @@ -354,8 +419,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "response_type_url" field. public const int ResponseTypeUrlFieldNumber = 4; private string responseTypeUrl_ = ""; + /// + /// The URL of the output message type. + /// public string ResponseTypeUrl { get { return responseTypeUrl_; } set { @@ -363,8 +432,12 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "response_streaming" field. public const int ResponseStreamingFieldNumber = 5; private bool responseStreaming_; + /// + /// If true, the response is streamed. + /// public bool ResponseStreaming { get { return responseStreaming_; } set { @@ -372,16 +445,24 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "options" field. public const int OptionsFieldNumber = 6; private static readonly pb::FieldCodec _repeated_options_codec = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Option.Parser); private readonly pbc::RepeatedField options_ = new pbc::RepeatedField(); + /// + /// Any metadata attached to the method. + /// public pbc::RepeatedField Options { get { return options_; } } + /// Field number for the "syntax" field. public const int SyntaxFieldNumber = 7; private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = global::Google.Protobuf.WellKnownTypes.Syntax.SYNTAX_PROTO2; + /// + /// The source syntax of this method. + /// public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { get { return syntax_; } set { @@ -544,6 +625,70 @@ namespace Google.Protobuf.WellKnownTypes { } + /// + /// Declares an API to be included in this API. The including API must + /// redeclare all the methods from the included API, but documentation + /// and options are inherited as follows: + /// - If after comment and whitespace stripping, the documentation + /// string of the redeclared method is empty, it will be inherited + /// from the original method. + /// - Each annotation belonging to the service config (http, + /// visibility) which is not set in the redeclared method will be + /// inherited. + /// - If an http annotation is inherited, the path pattern will be + /// modified as follows. Any version prefix will be replaced by the + /// version of the including API plus the [root][] path if specified. + /// Example of a simple mixin: + /// package google.acl.v1; + /// service AccessControl { + /// // Get the underlying ACL object. + /// rpc GetAcl(GetAclRequest) returns (Acl) { + /// option (google.api.http).get = "/v1/{resource=**}:getAcl"; + /// } + /// } + /// package google.storage.v2; + /// service Storage { + /// // (-- see AccessControl.GetAcl --) + /// rpc GetAcl(GetAclRequest) returns (Acl); + /// // Get a data record. + /// rpc GetData(GetDataRequest) returns (Data) { + /// option (google.api.http).get = "/v2/{resource=**}"; + /// } + /// } + /// Example of a mixin configuration: + /// apis: + /// - name: google.storage.v2.Storage + /// mixins: + /// - name: google.acl.v1.AccessControl + /// The mixin construct implies that all methods in `AccessControl` are + /// also declared with same name and request/response types in + /// `Storage`. A documentation generator or annotation processor will + /// see the effective `Storage.GetAcl` method after inherting + /// documentation and annotations as follows: + /// service Storage { + /// // Get the underlying ACL object. + /// rpc GetAcl(GetAclRequest) returns (Acl) { + /// option (google.api.http).get = "/v2/{resource=**}:getAcl"; + /// } + /// ... + /// } + /// Note how the version in the path pattern changed from `v1` to `v2`. + /// If the `root` field in the mixin is specified, it should be a + /// relative path under which inherited HTTP paths are placed. Example: + /// apis: + /// - name: google.storage.v2.Storage + /// mixins: + /// - name: google.acl.v1.AccessControl + /// root: acls + /// This implies the following inherited HTTP annotation: + /// service Storage { + /// // Get the underlying ACL object. + /// rpc GetAcl(GetAclRequest) returns (Acl) { + /// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; + /// } + /// ... + /// } + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public sealed partial class Mixin : pb::IMessage { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Mixin()); @@ -572,8 +717,12 @@ namespace Google.Protobuf.WellKnownTypes { return new Mixin(this); } + /// Field number for the "name" field. public const int NameFieldNumber = 1; private string name_ = ""; + /// + /// The fully qualified name of the API which is included. + /// public string Name { get { return name_; } set { @@ -581,8 +730,13 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "root" field. public const int RootFieldNumber = 2; private string root_ = ""; + /// + /// If non-empty specifies a path under which inherited HTTP paths + /// are rooted. + /// public string Root { get { return root_; } set { -- cgit v1.2.3