예제 #1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    global::Google.Ads.GoogleAds.V3.Resources.SharedSet subBuilder = new global::Google.Ads.GoogleAds.V3.Resources.SharedSet();
                    if (operationCase_ == OperationOneofCase.Create)
                    {
                        subBuilder.MergeFrom(Create);
                    }
                    input.ReadMessage(subBuilder);
                    Create = subBuilder;
                    break;
                }

                case 18: {
                    global::Google.Ads.GoogleAds.V3.Resources.SharedSet subBuilder = new global::Google.Ads.GoogleAds.V3.Resources.SharedSet();
                    if (operationCase_ == OperationOneofCase.Update)
                    {
                        subBuilder.MergeFrom(Update);
                    }
                    input.ReadMessage(subBuilder);
                    Update = subBuilder;
                    break;
                }

                case 26: {
                    Remove = input.ReadString();
                    break;
                }

                case 34: {
                    if (updateMask_ == null)
                    {
                        UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
                    }
                    input.ReadMessage(UpdateMask);
                    break;
                }
                }
            }
        }
예제 #2
0
        public void MergeFrom(SharedSetOperation other)
        {
            if (other == null)
            {
                return;
            }
            if (other.updateMask_ != null)
            {
                if (updateMask_ == null)
                {
                    UpdateMask = new global::Google.Protobuf.WellKnownTypes.FieldMask();
                }
                UpdateMask.MergeFrom(other.UpdateMask);
            }
            switch (other.OperationCase)
            {
            case OperationOneofCase.Create:
                if (Create == null)
                {
                    Create = new global::Google.Ads.GoogleAds.V3.Resources.SharedSet();
                }
                Create.MergeFrom(other.Create);
                break;

            case OperationOneofCase.Update:
                if (Update == null)
                {
                    Update = new global::Google.Ads.GoogleAds.V3.Resources.SharedSet();
                }
                Update.MergeFrom(other.Update);
                break;

            case OperationOneofCase.Remove:
                Remove = other.Remove;
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }