Skip to content

Commit

Permalink
feat(spanner): add proto and enum types
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 599046867

Source-Link: googleapis/googleapis@64a5bfe

Source-Link: googleapis/googleapis-gen@6e96ab8
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU3Bhbm5lci5WMS8uT3dsQm90LnlhbWwiLCJoIjoiNmU5NmFiOGJiMWVjNDUzNmM1YTBjNGQwOTVmNTNjZTA1NzhjYjhhNCJ9
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Jan 17, 2024
1 parent 5a56330 commit ea75989
Showing 1 changed file with 64 additions and 10 deletions.
74 changes: 64 additions & 10 deletions apis/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/Type.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,20 @@ public static partial class TypeReflection {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Chxnb29nbGUvc3Bhbm5lci92MS90eXBlLnByb3RvEhFnb29nbGUuc3Bhbm5l",
"ci52MRofZ29vZ2xlL2FwaS9maWVsZF9iZWhhdmlvci5wcm90byLfAQoEVHlw",
"ci52MRofZ29vZ2xlL2FwaS9maWVsZF9iZWhhdmlvci5wcm90byL3AQoEVHlw",
"ZRIuCgRjb2RlGAEgASgOMhsuZ29vZ2xlLnNwYW5uZXIudjEuVHlwZUNvZGVC",
"A+BBAhIzChJhcnJheV9lbGVtZW50X3R5cGUYAiABKAsyFy5nb29nbGUuc3Bh",
"bm5lci52MS5UeXBlEjIKC3N0cnVjdF90eXBlGAMgASgLMh0uZ29vZ2xlLnNw",
"YW5uZXIudjEuU3RydWN0VHlwZRI+Cg90eXBlX2Fubm90YXRpb24YBCABKA4y",
"JS5nb29nbGUuc3Bhbm5lci52MS5UeXBlQW5ub3RhdGlvbkNvZGUifwoKU3Ry",
"dWN0VHlwZRIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUuc3Bhbm5lci52MS5T",
"dHJ1Y3RUeX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Bhbm5lci52MUIJVHlwZVByb3RvUAFaNWNsb3VkLmdvb2dsZS5jb20v",
Expand All @@ -47,7 +48,7 @@ public static partial class TypeReflection {
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Cloud.Spanner.V1.TypeCode), typeof(global::Google.Cloud.Spanner.V1.TypeAnnotationCode), }, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.Type), global::Google.Cloud.Spanner.V1.Type.Parser, new[]{ "Code", "ArrayElementType", "StructType", "TypeAnnotation" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.Type), global::Google.Cloud.Spanner.V1.Type.Parser, new[]{ "Code", "ArrayElementType", "StructType", "TypeAnnotation", "ProtoTypeFqn" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.StructType), global::Google.Cloud.Spanner.V1.StructType.Parser, new[]{ "Fields" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Spanner.V1.StructType.Types.Field), global::Google.Cloud.Spanner.V1.StructType.Types.Field.Parser, new[]{ "Name", "Type" }, null, null, null, null)})
}));
}
Expand Down Expand Up @@ -140,6 +141,15 @@ public enum TypeCode {
/// - JSON array elements will have their order preserved.
/// </summary>
[pbr::OriginalName("JSON")] Json = 11,
/// <summary>
/// Encoded as a base64-encoded `string`, as described in RFC 4648,
/// section 4.
/// </summary>
[pbr::OriginalName("PROTO")] Proto = 13,
/// <summary>
/// Encoded as `string`, in decimal format.
/// </summary>
[pbr::OriginalName("ENUM")] Enum = 14,
}

/// <summary>
Expand Down Expand Up @@ -225,6 +235,7 @@ public sealed partial class Type : pb::IMessage<Type>
arrayElementType_ = other.arrayElementType_ != null ? other.arrayElementType_.Clone() : null;
structType_ = other.structType_ != null ? other.structType_.Clone() : null;
typeAnnotation_ = other.typeAnnotation_;
protoTypeFqn_ = other.protoTypeFqn_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

Expand Down Expand Up @@ -301,6 +312,25 @@ public sealed partial class Type : pb::IMessage<Type>
}
}

/// <summary>Field number for the "proto_type_fqn" field.</summary>
public const int ProtoTypeFqnFieldNumber = 5;
private string protoTypeFqn_ = "";
/// <summary>
/// If [code][google.spanner.v1.Type.code] ==
/// [PROTO][google.spanner.v1.TypeCode.PROTO] or
/// [code][google.spanner.v1.Type.code] ==
/// [ENUM][google.spanner.v1.TypeCode.ENUM], then `proto_type_fqn` is the fully
/// qualified name of the proto type representing the proto/enum definition.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string ProtoTypeFqn {
get { return protoTypeFqn_; }
set {
protoTypeFqn_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
Expand All @@ -320,6 +350,7 @@ public sealed partial class Type : pb::IMessage<Type>
if (!object.Equals(ArrayElementType, other.ArrayElementType)) return false;
if (!object.Equals(StructType, other.StructType)) return false;
if (TypeAnnotation != other.TypeAnnotation) return false;
if (ProtoTypeFqn != other.ProtoTypeFqn) return false;
return Equals(_unknownFields, other._unknownFields);
}

Expand All @@ -331,6 +362,7 @@ public sealed partial class Type : pb::IMessage<Type>
if (arrayElementType_ != null) hash ^= ArrayElementType.GetHashCode();
if (structType_ != null) hash ^= StructType.GetHashCode();
if (TypeAnnotation != global::Google.Cloud.Spanner.V1.TypeAnnotationCode.Unspecified) hash ^= TypeAnnotation.GetHashCode();
if (ProtoTypeFqn.Length != 0) hash ^= ProtoTypeFqn.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
Expand Down Expand Up @@ -365,6 +397,10 @@ public sealed partial class Type : pb::IMessage<Type>
output.WriteRawTag(32);
output.WriteEnum((int) TypeAnnotation);
}
if (ProtoTypeFqn.Length != 0) {
output.WriteRawTag(42);
output.WriteString(ProtoTypeFqn);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
Expand All @@ -391,6 +427,10 @@ public sealed partial class Type : pb::IMessage<Type>
output.WriteRawTag(32);
output.WriteEnum((int) TypeAnnotation);
}
if (ProtoTypeFqn.Length != 0) {
output.WriteRawTag(42);
output.WriteString(ProtoTypeFqn);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
Expand All @@ -413,6 +453,9 @@ public sealed partial class Type : pb::IMessage<Type>
if (TypeAnnotation != global::Google.Cloud.Spanner.V1.TypeAnnotationCode.Unspecified) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TypeAnnotation);
}
if (ProtoTypeFqn.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(ProtoTypeFqn);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
Expand Down Expand Up @@ -443,6 +486,9 @@ public sealed partial class Type : pb::IMessage<Type>
if (other.TypeAnnotation != global::Google.Cloud.Spanner.V1.TypeAnnotationCode.Unspecified) {
TypeAnnotation = other.TypeAnnotation;
}
if (other.ProtoTypeFqn.Length != 0) {
ProtoTypeFqn = other.ProtoTypeFqn;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

Expand Down Expand Up @@ -480,6 +526,10 @@ public sealed partial class Type : pb::IMessage<Type>
TypeAnnotation = (global::Google.Cloud.Spanner.V1.TypeAnnotationCode) input.ReadEnum();
break;
}
case 42: {
ProtoTypeFqn = input.ReadString();
break;
}
}
}
#endif
Expand Down Expand Up @@ -517,6 +567,10 @@ public sealed partial class Type : pb::IMessage<Type>
TypeAnnotation = (global::Google.Cloud.Spanner.V1.TypeAnnotationCode) input.ReadEnum();
break;
}
case 42: {
ProtoTypeFqn = input.ReadString();
break;
}
}
}
}
Expand Down

0 comments on commit ea75989

Please sign in to comment.