コード例 #1
0
ファイル: Event.cs プロジェクト: zoercai/google-cloud-dotnet
        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 10: {
                    RequestId = input.ReadString();
                    break;
                }

                case 18: {
                    EventId = input.ReadString();
                    break;
                }

                case 34: {
                    if (createTime_ == null)
                    {
                        CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(CreateTime);
                    break;
                }

                case 42: {
                    global::Google.Cloud.Talent.V4.JobEvent subBuilder = new global::Google.Cloud.Talent.V4.JobEvent();
                    if (eventCase_ == EventOneofCase.JobEvent)
                    {
                        subBuilder.MergeFrom(JobEvent);
                    }
                    input.ReadMessage(subBuilder);
                    JobEvent = subBuilder;
                    break;
                }

                case 74: {
                    EventNotes = input.ReadString();
                    break;
                }
                }
            }
        }
コード例 #2
0
        public void MergeFrom(ClientEvent other)
        {
            if (other == null)
            {
                return;
            }
            if (other.RequestId.Length != 0)
            {
                RequestId = other.RequestId;
            }
            if (other.EventId.Length != 0)
            {
                EventId = other.EventId;
            }
            if (other.createTime_ != null)
            {
                if (createTime_ == null)
                {
                    CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                CreateTime.MergeFrom(other.CreateTime);
            }
            if (other.EventNotes.Length != 0)
            {
                EventNotes = other.EventNotes;
            }
            switch (other.EventCase)
            {
            case EventOneofCase.JobEvent:
                if (JobEvent == null)
                {
                    JobEvent = new global::Google.Cloud.Talent.V4.JobEvent();
                }
                JobEvent.MergeFrom(other.JobEvent);
                break;
            }

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