Beispiel #1
0
        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);
        }
Beispiel #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (messageTypeCase_ == MessageTypeOneofCase.AppEngineHttpRequest)
            {
                hash ^= AppEngineHttpRequest.GetHashCode();
            }
            if (messageTypeCase_ == MessageTypeOneofCase.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 != global::Google.Cloud.Tasks.V2.Task.Types.View.Unspecified)
            {
                hash ^= View.GetHashCode();
            }
            hash ^= (int)messageTypeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Beispiel #3
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);
        }
Beispiel #4
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.dispatchDeadline_ != null)
            {
                if (dispatchDeadline_ == null)
                {
                    DispatchDeadline = new global::Google.Protobuf.WellKnownTypes.Duration();
                }
                DispatchDeadline.MergeFrom(other.DispatchDeadline);
            }
            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.V2.Attempt();
                }
                FirstAttempt.MergeFrom(other.FirstAttempt);
            }
            if (other.lastAttempt_ != null)
            {
                if (lastAttempt_ == null)
                {
                    LastAttempt = new global::Google.Cloud.Tasks.V2.Attempt();
                }
                LastAttempt.MergeFrom(other.LastAttempt);
            }
            if (other.View != global::Google.Cloud.Tasks.V2.Task.Types.View.Unspecified)
            {
                View = other.View;
            }
            switch (other.MessageTypeCase)
            {
            case MessageTypeOneofCase.AppEngineHttpRequest:
                if (AppEngineHttpRequest == null)
                {
                    AppEngineHttpRequest = new global::Google.Cloud.Tasks.V2.AppEngineHttpRequest();
                }
                AppEngineHttpRequest.MergeFrom(other.AppEngineHttpRequest);
                break;

            case MessageTypeOneofCase.HttpRequest:
                if (HttpRequest == null)
                {
                    HttpRequest = new global::Google.Cloud.Tasks.V2.HttpRequest();
                }
                HttpRequest.MergeFrom(other.HttpRequest);
                break;
            }

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