Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add FieldInfo for API field information #727

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
321 changes: 321 additions & 0 deletions Google.Api.CommonProtos/Api/FieldInfo.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,321 @@
/*
* Copyright 2023 Google LLC All Rights Reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file or at
* https://developers.google.com/open-source/licenses/bsd
*/

// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/field_info.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021, 8981
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Api {

/// <summary>Holder for reflection information generated from google/api/field_info.proto</summary>
public static partial class FieldInfoReflection {

#region Descriptor
/// <summary>File descriptor for google/api/field_info.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;

static FieldInfoReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Chtnb29nbGUvYXBpL2ZpZWxkX2luZm8ucHJvdG8SCmdvb2dsZS5hcGkaIGdv",
"b2dsZS9wcm90b2J1Zi9kZXNjcmlwdG9yLnByb3RvIowBCglGaWVsZEluZm8S",
"LAoGZm9ybWF0GAEgASgOMhwuZ29vZ2xlLmFwaS5GaWVsZEluZm8uRm9ybWF0",
"IlEKBkZvcm1hdBIWChJGT1JNQVRfVU5TUEVDSUZJRUQQABIJCgVVVUlENBAB",
"EggKBElQVjQQAhIICgRJUFY2EAMSEAoMSVBWNF9PUl9JUFY2EAQ6TAoKZmll",
"bGRfaW5mbxIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMYzPH5igEg",
"ASgLMhUuZ29vZ2xlLmFwaS5GaWVsZEluZm9CbAoOY29tLmdvb2dsZS5hcGlC",
"DkZpZWxkSW5mb1Byb3RvUAFaQWdvb2dsZS5nb2xhbmcub3JnL2dlbnByb3Rv",
"L2dvb2dsZWFwaXMvYXBpL2Fubm90YXRpb25zO2Fubm90YXRpb25zogIER0FQ",
"SWIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pb::Extension[] { FieldInfoExtensions.FieldInfo }, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Api.FieldInfo), global::Google.Api.FieldInfo.Parser, new[]{ "Format" }, null, new[]{ typeof(global::Google.Api.FieldInfo.Types.Format) }, null, null)
}));
}
#endregion

}
/// <summary>Holder for extension identifiers generated from the top level of google/api/field_info.proto</summary>
public static partial class FieldInfoExtensions {
/// <summary>
/// Rich semantic descriptor of an API field beyond the basic typing.
///
/// Examples:
///
/// string request_id = 1 [(google.api.field_info).format = UUID4];
/// string old_ip_address = 2 [(google.api.field_info).format = IPV4];
/// string new_ip_address = 3 [(google.api.field_info).format = IPV6];
/// string actual_ip_address = 4 [
/// (google.api.field_info).format = IPV4_OR_IPV6
/// ];
/// </summary>
public static readonly pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, global::Google.Api.FieldInfo> FieldInfo =
new pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, global::Google.Api.FieldInfo>(291403980, pb::FieldCodec.ForMessage(2331231842, global::Google.Api.FieldInfo.Parser));
}

#region Messages
/// <summary>
/// Rich semantic information of an API field beyond basic typing.
/// </summary>
public sealed partial class FieldInfo : pb::IMessage<FieldInfo>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<FieldInfo> _parser = new pb::MessageParser<FieldInfo>(() => new FieldInfo());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<FieldInfo> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Api.FieldInfoReflection.Descriptor.MessageTypes[0]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public FieldInfo() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public FieldInfo(FieldInfo other) : this() {
format_ = other.format_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public FieldInfo Clone() {
return new FieldInfo(this);
}

/// <summary>Field number for the "format" field.</summary>
public const int FormatFieldNumber = 1;
private global::Google.Api.FieldInfo.Types.Format format_ = global::Google.Api.FieldInfo.Types.Format.Unspecified;
/// <summary>
/// The standard format of a field value. This does not explicitly configure
/// any API consumer, just documents the API's format for the field it is
/// applied to.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Google.Api.FieldInfo.Types.Format Format {
get { return format_; }
set {
format_ = value;
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as FieldInfo);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(FieldInfo other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Format != other.Format) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (Format != global::Google.Api.FieldInfo.Types.Format.Unspecified) hash ^= Format.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (Format != global::Google.Api.FieldInfo.Types.Format.Unspecified) {
output.WriteRawTag(8);
output.WriteEnum((int) Format);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}

#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (Format != global::Google.Api.FieldInfo.Types.Format.Unspecified) {
output.WriteRawTag(8);
output.WriteEnum((int) Format);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (Format != global::Google.Api.FieldInfo.Types.Format.Unspecified) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Format);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(FieldInfo other) {
if (other == null) {
return;
}
if (other.Format != global::Google.Api.FieldInfo.Types.Format.Unspecified) {
Format = other.Format;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
Format = (global::Google.Api.FieldInfo.Types.Format) input.ReadEnum();
break;
}
}
}
#endif
}

#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
Format = (global::Google.Api.FieldInfo.Types.Format) input.ReadEnum();
break;
}
}
}
}
#endif

#region Nested types
/// <summary>Container for nested types declared in the FieldInfo message type.</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static partial class Types {
/// <summary>
/// The standard format of a field value. The supported formats are all backed
/// by either an RFC defined by the IETF or a Google-defined AIP.
/// </summary>
public enum Format {
/// <summary>
/// Default, unspecified value.
/// </summary>
[pbr::OriginalName("FORMAT_UNSPECIFIED")] Unspecified = 0,
/// <summary>
/// Universally Unique Identifier, version 4, value as defined by
/// https://datatracker.ietf.org/doc/html/rfc4122. The value may be
/// normalized to entirely lowercase letters. For example, the value
/// `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to
/// `f47ac10b-58cc-0372-8567-0e02b2c3d479`.
/// </summary>
[pbr::OriginalName("UUID4")] Uuid4 = 1,
/// <summary>
/// Internet Protocol v4 value as defined by [RFC
/// 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be
/// condensed, with leading zeros in each octet stripped. For example,
/// `001.022.233.040` would be condensed to `1.22.233.40`.
/// </summary>
[pbr::OriginalName("IPV4")] Ipv4 = 2,
/// <summary>
/// Internet Protocol v6 value as defined by [RFC
/// 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be
/// normalized to entirely lowercase letters, and zero-padded partial and
/// empty octets. For example, the value `2001:DB8::` would be normalized to
/// `2001:0db8:0:0`.
/// </summary>
[pbr::OriginalName("IPV6")] Ipv6 = 3,
/// <summary>
/// An IP address in either v4 or v6 format as described by the individual
/// values defined herein. See the comments on the IPV4 and IPV6 types for
/// allowed normalizations of each.
/// </summary>
[pbr::OriginalName("IPV4_OR_IPV6")] Ipv4OrIpv6 = 4,
}

}
#endregion

}

#endregion

}

#endregion Designer generated code