Example #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: {
                    Name = input.ReadString();
                    break;
                }

                case 26: {
                    global::Google.Cloud.Tasks.V2Beta3.AppEngineHttpRequest subBuilder = new global::Google.Cloud.Tasks.V2Beta3.AppEngineHttpRequest();
                    if (payloadTypeCase_ == PayloadTypeOneofCase.AppEngineHttpRequest)
                    {
                        subBuilder.MergeFrom(AppEngineHttpRequest);
                    }
                    input.ReadMessage(subBuilder);
                    AppEngineHttpRequest = subBuilder;
                    break;
                }

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

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

                case 48: {
                    DispatchCount = input.ReadInt32();
                    break;
                }

                case 56: {
                    ResponseCount = input.ReadInt32();
                    break;
                }

                case 66: {
                    if (firstAttempt_ == null)
                    {
                        firstAttempt_ = new global::Google.Cloud.Tasks.V2Beta3.Attempt();
                    }
                    input.ReadMessage(firstAttempt_);
                    break;
                }

                case 74: {
                    if (lastAttempt_ == null)
                    {
                        lastAttempt_ = new global::Google.Cloud.Tasks.V2Beta3.Attempt();
                    }
                    input.ReadMessage(lastAttempt_);
                    break;
                }

                case 80: {
                    view_ = (global::Google.Cloud.Tasks.V2Beta3.Task.Types.View)input.ReadEnum();
                    break;
                }
                }
            }
        }
Example #2
0
        public void MergeFrom(Task other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Name.Length != 0)
            {
                Name = other.Name;
            }
            if (other.scheduleTime_ != null)
            {
                if (scheduleTime_ == null)
                {
                    scheduleTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                ScheduleTime.MergeFrom(other.ScheduleTime);
            }
            if (other.createTime_ != null)
            {
                if (createTime_ == null)
                {
                    createTime_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                CreateTime.MergeFrom(other.CreateTime);
            }
            if (other.DispatchCount != 0)
            {
                DispatchCount = other.DispatchCount;
            }
            if (other.ResponseCount != 0)
            {
                ResponseCount = other.ResponseCount;
            }
            if (other.firstAttempt_ != null)
            {
                if (firstAttempt_ == null)
                {
                    firstAttempt_ = new global::Google.Cloud.Tasks.V2Beta3.Attempt();
                }
                FirstAttempt.MergeFrom(other.FirstAttempt);
            }
            if (other.lastAttempt_ != null)
            {
                if (lastAttempt_ == null)
                {
                    lastAttempt_ = new global::Google.Cloud.Tasks.V2Beta3.Attempt();
                }
                LastAttempt.MergeFrom(other.LastAttempt);
            }
            if (other.View != 0)
            {
                View = other.View;
            }
            switch (other.PayloadTypeCase)
            {
            case PayloadTypeOneofCase.AppEngineHttpRequest:
                if (AppEngineHttpRequest == null)
                {
                    AppEngineHttpRequest = new global::Google.Cloud.Tasks.V2Beta3.AppEngineHttpRequest();
                }
                AppEngineHttpRequest.MergeFrom(other.AppEngineHttpRequest);
                break;
            }

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