Esempio n. 1
0
        public override int GetHashCode()
        {
            int hashCode = -1815713267;

            if (Context != null)
            {
                hashCode += Context.GetHashCode();
            }

            if (Id != null)
            {
                hashCode += Id.GetHashCode();
            }

            if (FirstName != null)
            {
                hashCode += FirstName.GetHashCode();
            }

            if (LastName != null)
            {
                hashCode += LastName.GetHashCode();
            }

            if (RoleIds != null)
            {
                hashCode += RoleIds.GetHashCode();
            }

            if (AuthorizedLocationIds != null)
            {
                hashCode += AuthorizedLocationIds.GetHashCode();
            }

            if (Email != null)
            {
                hashCode += Email.GetHashCode();
            }

            if (Status != null)
            {
                hashCode += Status.GetHashCode();
            }

            if (ExternalId != null)
            {
                hashCode += ExternalId.GetHashCode();
            }

            if (CreatedAt != null)
            {
                hashCode += CreatedAt.GetHashCode();
            }

            if (UpdatedAt != null)
            {
                hashCode += UpdatedAt.GetHashCode();
            }

            return(hashCode);
        }
Esempio n. 2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is V1Employee other &&
                   ((Context == null && other.Context == null) || (Context?.Equals(other.Context) == true)) &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((FirstName == null && other.FirstName == null) || (FirstName?.Equals(other.FirstName) == true)) &&
                   ((LastName == null && other.LastName == null) || (LastName?.Equals(other.LastName) == true)) &&
                   ((RoleIds == null && other.RoleIds == null) || (RoleIds?.Equals(other.RoleIds) == true)) &&
                   ((AuthorizedLocationIds == null && other.AuthorizedLocationIds == null) || (AuthorizedLocationIds?.Equals(other.AuthorizedLocationIds) == true)) &&
                   ((Email == null && other.Email == null) || (Email?.Equals(other.Email) == true)) &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((ExternalId == null && other.ExternalId == null) || (ExternalId?.Equals(other.ExternalId) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)));
        }