diff --git a/apis/Google.Cloud.Firestore.V1/Google.Cloud.Firestore.V1/Query.cs b/apis/Google.Cloud.Firestore.V1/Google.Cloud.Firestore.V1/Query.cs index 230f25cc2031..f88f54cf2eba 100644 --- a/apis/Google.Cloud.Firestore.V1/Google.Cloud.Firestore.V1/Query.cs +++ b/apis/Google.Cloud.Firestore.V1/Google.Cloud.Firestore.V1/Query.cs @@ -27,7 +27,7 @@ public static partial class QueryReflection { "Ch9nb29nbGUvZmlyZXN0b3JlL3YxL3F1ZXJ5LnByb3RvEhNnb29nbGUuZmly", "ZXN0b3JlLnYxGiJnb29nbGUvZmlyZXN0b3JlL3YxL2RvY3VtZW50LnByb3Rv", "Gh5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8aHGdvb2dsZS9hcGkv", - "YW5ub3RhdGlvbnMucHJvdG8i2g4KD1N0cnVjdHVyZWRRdWVyeRI/CgZzZWxl", + "YW5ub3RhdGlvbnMucHJvdG8i+g4KD1N0cnVjdHVyZWRRdWVyeRI/CgZzZWxl", "Y3QYASABKAsyLy5nb29nbGUuZmlyZXN0b3JlLnYxLlN0cnVjdHVyZWRRdWVy", "eS5Qcm9qZWN0aW9uEkUKBGZyb20YAiADKAsyNy5nb29nbGUuZmlyZXN0b3Jl", "LnYxLlN0cnVjdHVyZWRRdWVyeS5Db2xsZWN0aW9uU2VsZWN0b3ISOgoFd2hl", @@ -48,33 +48,34 @@ public static partial class QueryReflection { "b2dsZS5maXJlc3RvcmUudjEuU3RydWN0dXJlZFF1ZXJ5LkNvbXBvc2l0ZUZp", "bHRlci5PcGVyYXRvchI8CgdmaWx0ZXJzGAIgAygLMisuZ29vZ2xlLmZpcmVz", "dG9yZS52MS5TdHJ1Y3R1cmVkUXVlcnkuRmlsdGVyIi0KCE9wZXJhdG9yEhgK", - "FE9QRVJBVE9SX1VOU1BFQ0lGSUVEEAASBwoDQU5EEAEa3QIKC0ZpZWxkRmls", + "FE9QRVJBVE9SX1VOU1BFQ0lGSUVE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TBADQg4KDG9wZXJhbmRfdHlwZRpRCgpQcm9qZWN0aW9uEkMKBmZpZWxk", + "cxgCIAMoCzIzLmdvb2dsZS5maXJlc3RvcmUudjEuU3RydWN0dXJlZFF1ZXJ5", + "LkZpZWxkUmVmZXJlbmNlGo4BCgVPcmRlchJCCgVmaWVsZBgBIAEoCzIzLmdv", + "b2dsZS5maXJlc3RvcmUudjEuU3RydWN0dXJlZFF1ZXJ5LkZpZWxkUmVmZXJl", + "bmNlEkEKCWRpcmVjdGlvbhgCIAEoDjIuLmdvb2dsZS5maXJlc3RvcmUudjEu", + "U3RydWN0dXJlZFF1ZXJ5LkRpcmVjdGlvbhokCg5GaWVsZFJlZmVyZW5jZRIS", + "CgpmaWVsZF9wYXRoGAIgASgJIkUKCURpcmVjdGlvbhIZChVESVJFQ1RJT05f", + "VU5TUEVDSUZJRUQQABINCglBU0NFTkRJTkcQARIOCgpERVNDRU5ESU5HEAIi", + "RAoGQ3Vyc29yEioKBnZhbHVlcxgBIAMoCzIaLmdvb2dsZS5maXJlc3RvcmUu", + "djEuVmFsdWUSDgoGYmVmb3JlGAIgASgIQqQBChdjb20uZ29vZ2xlLmZpcmVz", + "dG9yZS52MUIKUXVlcnlQcm90b1ABWjxnb29nbGUuZ29sYW5nLm9yZy9nZW5w", + "cm90by9nb29nbGVhcGlzL2ZpcmVzdG9yZS92MTtmaXJlc3RvcmWiAgRHQ0ZT", + "qgIZR29vZ2xlLkNsb3VkLkZpcmVzdG9yZS5WMcoCGUdvb2dsZVxDbG91ZFxG", + "aXJlc3RvcmVcVjFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Cloud.Firestore.V1.DocumentReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, global::Google.Api.AnnotationsReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { @@ -83,9 +84,9 @@ public static partial class QueryReflection { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.CompositeFilter), global::Google.Cloud.Firestore.V1.StructuredQuery.Types.CompositeFilter.Parser, new[]{ "Op", "Filters" }, null, new[]{ typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.CompositeFilter.Types.Operator) }, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldFilter), global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldFilter.Parser, new[]{ "Field", "Op", "Value" }, null, new[]{ typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldFilter.Types.Operator) }, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.UnaryFilter), global::Google.Cloud.Firestore.V1.StructuredQuery.Types.UnaryFilter.Parser, new[]{ "Op", "Field" }, new[]{ "OperandType" }, new[]{ typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.UnaryFilter.Types.Operator) }, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Projection), global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Projection.Parser, new[]{ "Fields" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Order), global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Order.Parser, new[]{ "Field", "Direction" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference), global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference.Parser, new[]{ "FieldPath" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Projection), global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Projection.Parser, new[]{ "Fields" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference), global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference.Parser, new[]{ "FieldPath" }, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.Firestore.V1.Cursor), global::Google.Cloud.Firestore.V1.Cursor.Parser, new[]{ "Values", "Before" }, null, null, null) })); } @@ -1350,6 +1351,16 @@ public enum Operator { /// Contains. Requires that the field is an array. /// [pbr::OriginalName("ARRAY_CONTAINS")] ArrayContains = 7, + /// + /// In. Requires that `value` is a non-empty ArrayValue with at most 10 + /// values. + /// + [pbr::OriginalName("IN")] In = 8, + /// + /// Contains any. Requires that the field is an array and + /// `value` is a non-empty ArrayValue with at most 10 values. + /// + [pbr::OriginalName("ARRAY_CONTAINS_ANY")] ArrayContainsAny = 9, } } @@ -1585,13 +1596,13 @@ public enum Operator { } /// - /// An order on a field. + /// The projection of document's fields to return. /// - public sealed partial class Order : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Order()); + public sealed partial class Projection : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Projection()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { @@ -1604,75 +1615,60 @@ public sealed partial class Order : pb::IMessage { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Order() { + public Projection() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Order(Order other) : this() { - field_ = other.field_ != null ? other.field_.Clone() : null; - direction_ = other.direction_; + public Projection(Projection other) : this() { + fields_ = other.fields_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Order Clone() { - return new Order(this); - } - - /// Field number for the "field" field. - public const int FieldFieldNumber = 1; - private global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference field_; - /// - /// The field to order by. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference Field { - get { return field_; } - set { - field_ = value; - } + public Projection Clone() { + return new Projection(this); } - /// Field number for the "direction" field. - public const int DirectionFieldNumber = 2; - private global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Direction direction_ = 0; + /// Field number for the "fields" field. + public const int FieldsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_fields_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference.Parser); + private readonly pbc::RepeatedField fields_ = new pbc::RepeatedField(); /// - /// The direction to order by. Defaults to `ASCENDING`. + /// The fields to return. + /// + /// If empty, all fields are returned. To only return the name + /// of the document, use `['__name__']`. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Direction Direction { - get { return direction_; } - set { - direction_ = value; - } + public pbc::RepeatedField Fields { + get { return fields_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { - return Equals(other as Order); + return Equals(other as Projection); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Order other) { + public bool Equals(Projection other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(Field, other.Field)) return false; - if (Direction != other.Direction) return false; + if(!fields_.Equals(other.fields_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (field_ != null) hash ^= Field.GetHashCode(); - if (Direction != 0) hash ^= Direction.GetHashCode(); + hash ^= fields_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1686,14 +1682,7 @@ public sealed partial class Order : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (field_ != null) { - output.WriteRawTag(10); - output.WriteMessage(Field); - } - if (Direction != 0) { - output.WriteRawTag(16); - output.WriteEnum((int) Direction); - } + fields_.WriteTo(output, _repeated_fields_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1702,12 +1691,7 @@ public sealed partial class Order : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (field_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(Field); - } - if (Direction != 0) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Direction); - } + size += fields_.CalculateSize(_repeated_fields_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1715,19 +1699,11 @@ public sealed partial class Order : pb::IMessage { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Order other) { + public void MergeFrom(Projection other) { if (other == null) { return; } - if (other.field_ != null) { - if (field_ == null) { - Field = new global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference(); - } - Field.MergeFrom(other.Field); - } - if (other.Direction != 0) { - Direction = other.Direction; - } + fields_.Add(other.fields_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1739,15 +1715,8 @@ public sealed partial class Order : pb::IMessage { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - if (field_ == null) { - Field = new global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference(); - } - input.ReadMessage(Field); - break; - } - case 16: { - Direction = (global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Direction) input.ReadEnum(); + case 18: { + fields_.AddEntriesFrom(input, _repeated_fields_codec); break; } } @@ -1757,13 +1726,13 @@ public sealed partial class Order : pb::IMessage { } /// - /// A reference to a field, such as `max(messages.time) as max_time`. + /// An order on a field. /// - public sealed partial class FieldReference : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldReference()); + public sealed partial class Order : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Order()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { @@ -1776,55 +1745,75 @@ public sealed partial class FieldReference : pb::IMessage { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public FieldReference() { + public Order() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public FieldReference(FieldReference other) : this() { - fieldPath_ = other.fieldPath_; + public Order(Order other) : this() { + field_ = other.field_ != null ? other.field_.Clone() : null; + direction_ = other.direction_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public FieldReference Clone() { - return new FieldReference(this); + public Order Clone() { + return new Order(this); } - /// Field number for the "field_path" field. - public const int FieldPathFieldNumber = 2; - private string fieldPath_ = ""; + /// Field number for the "field" field. + public const int FieldFieldNumber = 1; + private global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference field_; + /// + /// The field to order by. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string FieldPath { - get { return fieldPath_; } + public global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference Field { + get { return field_; } set { - fieldPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + field_ = value; + } + } + + /// Field number for the "direction" field. + public const int DirectionFieldNumber = 2; + private global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Direction direction_ = 0; + /// + /// The direction to order by. Defaults to `ASCENDING`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Direction Direction { + get { return direction_; } + set { + direction_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { - return Equals(other as FieldReference); + return Equals(other as Order); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(FieldReference other) { + public bool Equals(Order other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (FieldPath != other.FieldPath) return false; + if (!object.Equals(Field, other.Field)) return false; + if (Direction != other.Direction) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (FieldPath.Length != 0) hash ^= FieldPath.GetHashCode(); + if (field_ != null) hash ^= Field.GetHashCode(); + if (Direction != 0) hash ^= Direction.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1838,9 +1827,13 @@ public sealed partial class FieldReference : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (FieldPath.Length != 0) { - output.WriteRawTag(18); - output.WriteString(FieldPath); + if (field_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Field); + } + if (Direction != 0) { + output.WriteRawTag(16); + output.WriteEnum((int) Direction); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -1850,8 +1843,11 @@ public sealed partial class FieldReference : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (FieldPath.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(FieldPath); + if (field_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Field); + } + if (Direction != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Direction); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -1860,12 +1856,18 @@ public sealed partial class FieldReference : pb::IMessage { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(FieldReference other) { + public void MergeFrom(Order other) { if (other == null) { return; } - if (other.FieldPath.Length != 0) { - FieldPath = other.FieldPath; + if (other.field_ != null) { + if (field_ == null) { + Field = new global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference(); + } + Field.MergeFrom(other.Field); + } + if (other.Direction != 0) { + Direction = other.Direction; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1878,8 +1880,15 @@ public sealed partial class FieldReference : pb::IMessage { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 18: { - FieldPath = input.ReadString(); + case 10: { + if (field_ == null) { + Field = new global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference(); + } + input.ReadMessage(Field); + break; + } + case 16: { + Direction = (global::Google.Cloud.Firestore.V1.StructuredQuery.Types.Direction) input.ReadEnum(); break; } } @@ -1889,13 +1898,13 @@ public sealed partial class FieldReference : pb::IMessage { } /// - /// The projection of document's fields to return. + /// A reference to a field, such as `max(messages.time) as max_time`. /// - public sealed partial class Projection : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Projection()); + public sealed partial class FieldReference : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FieldReference()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { @@ -1908,60 +1917,55 @@ public sealed partial class Projection : pb::IMessage { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Projection() { + public FieldReference() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Projection(Projection other) : this() { - fields_ = other.fields_.Clone(); + public FieldReference(FieldReference other) : this() { + fieldPath_ = other.fieldPath_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Projection Clone() { - return new Projection(this); + public FieldReference Clone() { + return new FieldReference(this); } - /// Field number for the "fields" field. - public const int FieldsFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_fields_codec - = pb::FieldCodec.ForMessage(18, global::Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference.Parser); - private readonly pbc::RepeatedField fields_ = new pbc::RepeatedField(); - /// - /// The fields to return. - /// - /// If empty, all fields are returned. To only return the name - /// of the document, use `['__name__']`. - /// + /// Field number for the "field_path" field. + public const int FieldPathFieldNumber = 2; + private string fieldPath_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Fields { - get { return fields_; } + public string FieldPath { + get { return fieldPath_; } + set { + fieldPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { - return Equals(other as Projection); + return Equals(other as FieldReference); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Projection other) { + public bool Equals(FieldReference other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!fields_.Equals(other.fields_)) return false; + if (FieldPath != other.FieldPath) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - hash ^= fields_.GetHashCode(); + if (FieldPath.Length != 0) hash ^= FieldPath.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1975,7 +1979,10 @@ public sealed partial class Projection : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - fields_.WriteTo(output, _repeated_fields_codec); + if (FieldPath.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FieldPath); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1984,7 +1991,9 @@ public sealed partial class Projection : pb::IMessage { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - size += fields_.CalculateSize(_repeated_fields_codec); + if (FieldPath.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FieldPath); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1992,11 +2001,13 @@ public sealed partial class Projection : pb::IMessage { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Projection other) { + public void MergeFrom(FieldReference other) { if (other == null) { return; } - fields_.Add(other.fields_); + if (other.FieldPath.Length != 0) { + FieldPath = other.FieldPath; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -2009,7 +2020,7 @@ public sealed partial class Projection : pb::IMessage { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 18: { - fields_.AddEntriesFrom(input, _repeated_fields_codec); + FieldPath = input.ReadString(); break; } }