Esempio n. 1
0
        /// <summary>
        /// Returns true if PipelineImpl instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineImpl to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineImpl other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                     ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     EstimatedDurationInMillis == other.EstimatedDurationInMillis ||

                     EstimatedDurationInMillis.Equals(other.EstimatedDurationInMillis)
                 ) &&
                 (
                     FullName == other.FullName ||
                     FullName != null &&
                     FullName.Equals(other.FullName)
                 ) &&
                 (
                     LatestRun == other.LatestRun ||
                     LatestRun != null &&
                     LatestRun.Equals(other.LatestRun)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.Equals(other.Organization)
                 ) &&
                 (
                     WeatherScore == other.WeatherScore ||

                     WeatherScore.Equals(other.WeatherScore)
                 ) &&
                 (
                     Links == other.Links ||
                     Links != null &&
                     Links.Equals(other.Links)
                 ));
        }
        /// <summary>
        /// Returns true if PipelineBranchesitem instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineBranchesitem to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineBranchesitem other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                     ) &&
                 (
                     EstimatedDurationInMillis == other.EstimatedDurationInMillis ||
                     EstimatedDurationInMillis != null &&
                     EstimatedDurationInMillis.Equals(other.EstimatedDurationInMillis)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     WeatherScore == other.WeatherScore ||
                     WeatherScore != null &&
                     WeatherScore.Equals(other.WeatherScore)
                 ) &&
                 (
                     LatestRun == other.LatestRun ||
                     LatestRun != null &&
                     LatestRun.Equals(other.LatestRun)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.Equals(other.Organization)
                 ) &&
                 (
                     PullRequest == other.PullRequest ||
                     PullRequest != null &&
                     PullRequest.Equals(other.PullRequest)
                 ) &&
                 (
                     TotalNumberOfPullRequests == other.TotalNumberOfPullRequests ||
                     TotalNumberOfPullRequests != null &&
                     TotalNumberOfPullRequests.Equals(other.TotalNumberOfPullRequests)
                 ) &&
                 (
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                 ));
        }
Esempio n. 3
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (Class != null)
                {
                    hashCode = hashCode * 59 + Class.GetHashCode();
                }
                if (DisplayName != null)
                {
                    hashCode = hashCode * 59 + DisplayName.GetHashCode();
                }

                hashCode = hashCode * 59 + EstimatedDurationInMillis.GetHashCode();
                if (FullDisplayName != null)
                {
                    hashCode = hashCode * 59 + FullDisplayName.GetHashCode();
                }
                if (FullName != null)
                {
                    hashCode = hashCode * 59 + FullName.GetHashCode();
                }
                if (Name != null)
                {
                    hashCode = hashCode * 59 + Name.GetHashCode();
                }
                if (Organization != null)
                {
                    hashCode = hashCode * 59 + Organization.GetHashCode();
                }
                if (Parameters != null)
                {
                    hashCode = hashCode * 59 + Parameters.GetHashCode();
                }
                if (Permissions != null)
                {
                    hashCode = hashCode * 59 + Permissions.GetHashCode();
                }

                hashCode = hashCode * 59 + WeatherScore.GetHashCode();
                if (PullRequest != null)
                {
                    hashCode = hashCode * 59 + PullRequest.GetHashCode();
                }
                if (Links != null)
                {
                    hashCode = hashCode * 59 + Links.GetHashCode();
                }
                if (LatestRun != null)
                {
                    hashCode = hashCode * 59 + LatestRun.GetHashCode();
                }
                return(hashCode);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (DisplayName != null)
                {
                    hashCode = hashCode * 59 + DisplayName.GetHashCode();
                }

                hashCode = hashCode * 59 + EstimatedDurationInMillis.GetHashCode();
                if (LatestRun != null)
                {
                    hashCode = hashCode * 59 + LatestRun.GetHashCode();
                }
                if (Name != null)
                {
                    hashCode = hashCode * 59 + Name.GetHashCode();
                }
                if (Organization != null)
                {
                    hashCode = hashCode * 59 + Organization.GetHashCode();
                }

                hashCode = hashCode * 59 + WeatherScore.GetHashCode();
                if (BranchNames != null)
                {
                    hashCode = hashCode * 59 + BranchNames.GetHashCode();
                }

                hashCode = hashCode * 59 + NumberOfFailingBranches.GetHashCode();

                hashCode = hashCode * 59 + NumberOfFailingPullRequests.GetHashCode();

                hashCode = hashCode * 59 + NumberOfSuccessfulBranches.GetHashCode();

                hashCode = hashCode * 59 + NumberOfSuccessfulPullRequests.GetHashCode();

                hashCode = hashCode * 59 + TotalNumberOfBranches.GetHashCode();

                hashCode = hashCode * 59 + TotalNumberOfPullRequests.GetHashCode();
                if (Class != null)
                {
                    hashCode = hashCode * 59 + Class.GetHashCode();
                }
                return(hashCode);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (Artifacts != null)
                {
                    hashCode = hashCode * 59 + Artifacts.GetHashCode();
                }

                hashCode = hashCode * 59 + DurationInMillis.GetHashCode();

                hashCode = hashCode * 59 + EstimatedDurationInMillis.GetHashCode();
                if (EnQueueTime != null)
                {
                    hashCode = hashCode * 59 + EnQueueTime.GetHashCode();
                }
                if (EndTime != null)
                {
                    hashCode = hashCode * 59 + EndTime.GetHashCode();
                }
                if (Id != null)
                {
                    hashCode = hashCode * 59 + Id.GetHashCode();
                }
                if (Organization != null)
                {
                    hashCode = hashCode * 59 + Organization.GetHashCode();
                }
                if (Pipeline != null)
                {
                    hashCode = hashCode * 59 + Pipeline.GetHashCode();
                }
                if (Result != null)
                {
                    hashCode = hashCode * 59 + Result.GetHashCode();
                }
                if (RunSummary != null)
                {
                    hashCode = hashCode * 59 + RunSummary.GetHashCode();
                }
                if (StartTime != null)
                {
                    hashCode = hashCode * 59 + StartTime.GetHashCode();
                }
                if (State != null)
                {
                    hashCode = hashCode * 59 + State.GetHashCode();
                }
                if (Type != null)
                {
                    hashCode = hashCode * 59 + Type.GetHashCode();
                }
                if (CommitId != null)
                {
                    hashCode = hashCode * 59 + CommitId.GetHashCode();
                }
                if (Class != null)
                {
                    hashCode = hashCode * 59 + Class.GetHashCode();
                }
                return(hashCode);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Returns true if PipelinelatestRun instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelinelatestRun to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelinelatestRun other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Artifacts == other.Artifacts ||
                     Artifacts != null &&
                     other.Artifacts != null &&
                     Artifacts.SequenceEqual(other.Artifacts)
                     ) &&
                 (
                     DurationInMillis == other.DurationInMillis ||

                     DurationInMillis.Equals(other.DurationInMillis)
                 ) &&
                 (
                     EstimatedDurationInMillis == other.EstimatedDurationInMillis ||

                     EstimatedDurationInMillis.Equals(other.EstimatedDurationInMillis)
                 ) &&
                 (
                     EnQueueTime == other.EnQueueTime ||
                     EnQueueTime != null &&
                     EnQueueTime.Equals(other.EnQueueTime)
                 ) &&
                 (
                     EndTime == other.EndTime ||
                     EndTime != null &&
                     EndTime.Equals(other.EndTime)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.Equals(other.Organization)
                 ) &&
                 (
                     Pipeline == other.Pipeline ||
                     Pipeline != null &&
                     Pipeline.Equals(other.Pipeline)
                 ) &&
                 (
                     Result == other.Result ||
                     Result != null &&
                     Result.Equals(other.Result)
                 ) &&
                 (
                     RunSummary == other.RunSummary ||
                     RunSummary != null &&
                     RunSummary.Equals(other.RunSummary)
                 ) &&
                 (
                     StartTime == other.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(other.StartTime)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     CommitId == other.CommitId ||
                     CommitId != null &&
                     CommitId.Equals(other.CommitId)
                 ) &&
                 (
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                 ));
        }
Esempio n. 7
0
        /// <summary>
        /// Returns true if BranchImpl instances are equal
        /// </summary>
        /// <param name="other">Instance of BranchImpl to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(BranchImpl other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                     ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     EstimatedDurationInMillis == other.EstimatedDurationInMillis ||

                     EstimatedDurationInMillis.Equals(other.EstimatedDurationInMillis)
                 ) &&
                 (
                     FullDisplayName == other.FullDisplayName ||
                     FullDisplayName != null &&
                     FullDisplayName.Equals(other.FullDisplayName)
                 ) &&
                 (
                     FullName == other.FullName ||
                     FullName != null &&
                     FullName.Equals(other.FullName)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.Equals(other.Organization)
                 ) &&
                 (
                     Parameters == other.Parameters ||
                     Parameters != null &&
                     other.Parameters != null &&
                     Parameters.SequenceEqual(other.Parameters)
                 ) &&
                 (
                     Permissions == other.Permissions ||
                     Permissions != null &&
                     Permissions.Equals(other.Permissions)
                 ) &&
                 (
                     WeatherScore == other.WeatherScore ||

                     WeatherScore.Equals(other.WeatherScore)
                 ) &&
                 (
                     PullRequest == other.PullRequest ||
                     PullRequest != null &&
                     PullRequest.Equals(other.PullRequest)
                 ) &&
                 (
                     Links == other.Links ||
                     Links != null &&
                     Links.Equals(other.Links)
                 ) &&
                 (
                     LatestRun == other.LatestRun ||
                     LatestRun != null &&
                     LatestRun.Equals(other.LatestRun)
                 ));
        }
Esempio n. 8
0
        /// <summary>
        /// Returns true if MultibranchPipeline instances are equal
        /// </summary>
        /// <param name="other">Instance of MultibranchPipeline to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MultibranchPipeline other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                     ) &&
                 (
                     EstimatedDurationInMillis == other.EstimatedDurationInMillis ||
                     EstimatedDurationInMillis != null &&
                     EstimatedDurationInMillis.Equals(other.EstimatedDurationInMillis)
                 ) &&
                 (
                     LatestRun == other.LatestRun ||
                     LatestRun != null &&
                     LatestRun.Equals(other.LatestRun)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Organization == other.Organization ||
                     Organization != null &&
                     Organization.Equals(other.Organization)
                 ) &&
                 (
                     WeatherScore == other.WeatherScore ||
                     WeatherScore != null &&
                     WeatherScore.Equals(other.WeatherScore)
                 ) &&
                 (
                     BranchNames == other.BranchNames ||
                     BranchNames != null &&
                     BranchNames.SequenceEqual(other.BranchNames)
                 ) &&
                 (
                     NumberOfFailingBranches == other.NumberOfFailingBranches ||
                     NumberOfFailingBranches != null &&
                     NumberOfFailingBranches.Equals(other.NumberOfFailingBranches)
                 ) &&
                 (
                     NumberOfFailingPullRequests == other.NumberOfFailingPullRequests ||
                     NumberOfFailingPullRequests != null &&
                     NumberOfFailingPullRequests.Equals(other.NumberOfFailingPullRequests)
                 ) &&
                 (
                     NumberOfSuccessfulBranches == other.NumberOfSuccessfulBranches ||
                     NumberOfSuccessfulBranches != null &&
                     NumberOfSuccessfulBranches.Equals(other.NumberOfSuccessfulBranches)
                 ) &&
                 (
                     NumberOfSuccessfulPullRequests == other.NumberOfSuccessfulPullRequests ||
                     NumberOfSuccessfulPullRequests != null &&
                     NumberOfSuccessfulPullRequests.Equals(other.NumberOfSuccessfulPullRequests)
                 ) &&
                 (
                     TotalNumberOfBranches == other.TotalNumberOfBranches ||
                     TotalNumberOfBranches != null &&
                     TotalNumberOfBranches.Equals(other.TotalNumberOfBranches)
                 ) &&
                 (
                     TotalNumberOfPullRequests == other.TotalNumberOfPullRequests ||
                     TotalNumberOfPullRequests != null &&
                     TotalNumberOfPullRequests.Equals(other.TotalNumberOfPullRequests)
                 ) &&
                 (
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                 ));
        }