public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (payloadTypeCase_ == PayloadTypeOneofCase.AppEngineHttpRequest)
            {
                hash ^= AppEngineHttpRequest.GetHashCode();
            }
            if (payloadTypeCase_ == PayloadTypeOneofCase.HttpRequest)
            {
                hash ^= HttpRequest.GetHashCode();
            }
            if (scheduleTime_ != null)
            {
                hash ^= ScheduleTime.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (dispatchDeadline_ != null)
            {
                hash ^= DispatchDeadline.GetHashCode();
            }
            if (DispatchCount != 0)
            {
                hash ^= DispatchCount.GetHashCode();
            }
            if (ResponseCount != 0)
            {
                hash ^= ResponseCount.GetHashCode();
            }
            if (firstAttempt_ != null)
            {
                hash ^= FirstAttempt.GetHashCode();
            }
            if (lastAttempt_ != null)
            {
                hash ^= LastAttempt.GetHashCode();
            }
            if (View != 0)
            {
                hash ^= View.GetHashCode();
            }
            hash ^= (int)payloadTypeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #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);
        }