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

            return
                ((
                     ProgramId == other.ProgramId ||
                     ProgramId != null &&
                     ProgramId.Equals(other.ProgramId)
                     ) &&
                 (
                     RepositoryId == other.RepositoryId ||

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

            return
                ((
                     Service == other.Service ||
                     Service != null &&
                     Service.Equals(other.Service)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Date == other.Date ||
                     Date != null &&
                     Date.Equals(other.Date)
                 ) &&
                 (
                     ProgramId == other.ProgramId ||

                     ProgramId.Equals(other.ProgramId)
                 ) &&
                 (
                     EnvironmentId == other.EnvironmentId ||

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

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     ProgramId == other.ProgramId ||
                     ProgramId != null &&
                     ProgramId.Equals(other.ProgramId)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     Type == other.Type ||

                     Type.Equals(other.Type)
                 ) &&
                 (
                     Links == other.Links ||
                     Links != null &&
                     Links.Equals(other.Links)
                 ));
        }
Exemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is LoyaltyAccount other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((Mappings == null && other.Mappings == null) || (Mappings?.Equals(other.Mappings) == true)) &&
                   ((ProgramId == null && other.ProgramId == null) || (ProgramId?.Equals(other.ProgramId) == true)) &&
                   ((Balance == null && other.Balance == null) || (Balance?.Equals(other.Balance) == true)) &&
                   ((LifetimePoints == null && other.LifetimePoints == null) || (LifetimePoints?.Equals(other.LifetimePoints) == true)) &&
                   ((CustomerId == null && other.CustomerId == null) || (CustomerId?.Equals(other.CustomerId) == true)) &&
                   ((EnrolledAt == null && other.EnrolledAt == null) || (EnrolledAt?.Equals(other.EnrolledAt) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)));
        }
        /// <summary>
        /// Returns true if PipelineExecution instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineExecution to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineExecution other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     ProgramId == other.ProgramId ||
                     ProgramId != null &&
                     ProgramId.Equals(other.ProgramId)
                 ) &&
                 (
                     PipelineId == other.PipelineId ||
                     PipelineId != null &&
                     PipelineId.Equals(other.PipelineId)
                 ) &&
                 (
                     ArtifactsVersion == other.ArtifactsVersion ||
                     ArtifactsVersion != null &&
                     ArtifactsVersion.Equals(other.ArtifactsVersion)
                 ) &&
                 (
                     User == other.User ||
                     User != null &&
                     User.Equals(other.User)
                 ) &&
                 (
                     Status == other.Status ||

                     Status.Equals(other.Status)
                 ) &&
                 (
                     Trigger == other.Trigger ||

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

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     ProgramId == other.ProgramId ||
                     ProgramId != null &&
                     ProgramId.Equals(other.ProgramId)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Trigger == other.Trigger ||

                     Trigger.Equals(other.Trigger)
                 ) &&
                 (
                     Status == other.Status ||

                     Status.Equals(other.Status)
                 ) &&
                 (
                     CreatedAt == other.CreatedAt ||
                     CreatedAt != null &&
                     CreatedAt.Equals(other.CreatedAt)
                 ) &&
                 (
                     UpdatedAt == other.UpdatedAt ||
                     UpdatedAt != null &&
                     UpdatedAt.Equals(other.UpdatedAt)
                 ) &&
                 (
                     LastStartedAt == other.LastStartedAt ||
                     LastStartedAt != null &&
                     LastStartedAt.Equals(other.LastStartedAt)
                 ) &&
                 (
                     LastFinishedAt == other.LastFinishedAt ||
                     LastFinishedAt != null &&
                     LastFinishedAt.Equals(other.LastFinishedAt)
                 ) &&
                 (
                     Phases == other.Phases ||
                     Phases != null &&
                     other.Phases != null &&
                     Phases.SequenceEqual(other.Phases)
                 ) &&
                 (
                     Links == other.Links ||
                     Links != null &&
                     Links.Equals(other.Links)
                 ));
        }