Example #1
0
        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 18: {
                    if (primaryActionDetail_ == null)
                    {
                        PrimaryActionDetail = new global::Google.Apps.Drive.Activity.V2.ActionDetail();
                    }
                    input.ReadMessage(PrimaryActionDetail);
                    break;
                }

                case 26: {
                    actors_.AddEntriesFrom(ref input, _repeated_actors_codec);
                    break;
                }

                case 34: {
                    actions_.AddEntriesFrom(ref input, _repeated_actions_codec);
                    break;
                }

                case 42: {
                    targets_.AddEntriesFrom(ref input, _repeated_targets_codec);
                    break;
                }

                case 50: {
                    global::Google.Protobuf.WellKnownTypes.Timestamp subBuilder = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    if (timeCase_ == TimeOneofCase.Timestamp)
                    {
                        subBuilder.MergeFrom(Timestamp);
                    }
                    input.ReadMessage(subBuilder);
                    Timestamp = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Apps.Drive.Activity.V2.TimeRange subBuilder = new global::Google.Apps.Drive.Activity.V2.TimeRange();
                    if (timeCase_ == TimeOneofCase.TimeRange)
                    {
                        subBuilder.MergeFrom(TimeRange);
                    }
                    input.ReadMessage(subBuilder);
                    TimeRange = subBuilder;
                    break;
                }
                }
            }
        }
Example #2
0
        public void MergeFrom(DriveActivity other)
        {
            if (other == null)
            {
                return;
            }
            if (other.primaryActionDetail_ != null)
            {
                if (primaryActionDetail_ == null)
                {
                    PrimaryActionDetail = new global::Google.Apps.Drive.Activity.V2.ActionDetail();
                }
                PrimaryActionDetail.MergeFrom(other.PrimaryActionDetail);
            }
            actors_.Add(other.actors_);
            actions_.Add(other.actions_);
            targets_.Add(other.targets_);
            switch (other.TimeCase)
            {
            case TimeOneofCase.Timestamp:
                if (Timestamp == null)
                {
                    Timestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                Timestamp.MergeFrom(other.Timestamp);
                break;

            case TimeOneofCase.TimeRange:
                if (TimeRange == null)
                {
                    TimeRange = new global::Google.Apps.Drive.Activity.V2.TimeRange();
                }
                TimeRange.MergeFrom(other.TimeRange);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Example #3
0
        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 18: {
                    if (primaryActionDetail_ == null)
                    {
                        PrimaryActionDetail = new global::Google.Apps.Drive.Activity.V2.ActionDetail();
                    }
                    input.ReadMessage(PrimaryActionDetail);
                    break;
                }

                case 26: {
                    actors_.AddEntriesFrom(input, _repeated_actors_codec);
                    break;
                }

                case 34: {
                    actions_.AddEntriesFrom(input, _repeated_actions_codec);
                    break;
                }

                case 42: {
                    targets_.AddEntriesFrom(input, _repeated_targets_codec);
                    break;
                }

                case 50: {
                    global::Google.Protobuf.WellKnownTypes.Timestamp subBuilder = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    if (timeCase_ == TimeOneofCase.Timestamp)
                    {
                        subBuilder.MergeFrom(Timestamp);
                    }
                    input.ReadMessage(subBuilder);
                    Timestamp = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Apps.Drive.Activity.V2.TimeRange subBuilder = new global::Google.Apps.Drive.Activity.V2.TimeRange();
                    if (timeCase_ == TimeOneofCase.TimeRange)
                    {
                        subBuilder.MergeFrom(TimeRange);
                    }
                    input.ReadMessage(subBuilder);
                    TimeRange = subBuilder;
                    break;
                }
                }
            }
    #endif
        }