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

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (merchantId_ != null)
            {
                hash ^= MerchantId.GetHashCode();
            }
            if (MerchantName.Length != 0)
            {
                hash ^= MerchantName.GetHashCode();
            }
            if (Result != 0)
            {
                hash ^= Result.GetHashCode();
            }
            if (ProcessorBatchId != 0)
            {
                hash ^= ProcessorBatchId.GetHashCode();
            }
            if (TransactionCount != 0)
            {
                hash ^= TransactionCount.GetHashCode();
            }
            if (totalAmount_ != null)
            {
                hash ^= TotalAmount.GetHashCode();
            }
            if (createdAt_ != null)
            {
                hash ^= CreatedAt.GetHashCode();
            }
            hash ^= captures_.GetHashCode();
            hash ^= refunds_.GetHashCode();
            if (SequenceNumber != 0)
            {
                hash ^= SequenceNumber.GetHashCode();
            }
            return(hash);
        }
        public void MergeFrom(PlacementGroup other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Id.Length != 0)
            {
                Id = other.Id;
            }
            if (other.FolderId.Length != 0)
            {
                FolderId = other.FolderId;
            }
            if (other.createdAt_ != null)
            {
                if (createdAt_ == null)
                {
                    CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                CreatedAt.MergeFrom(other.CreatedAt);
            }
            if (other.Name.Length != 0)
            {
                Name = other.Name;
            }
            if (other.Description.Length != 0)
            {
                Description = other.Description;
            }
            labels_.Add(other.labels_);
            switch (other.PlacementStrategyCase)
            {
            case PlacementStrategyOneofCase.SpreadPlacementStrategy:
                if (SpreadPlacementStrategy == null)
                {
                    SpreadPlacementStrategy = new global::Yandex.Cloud.Compute.V1.SpreadPlacementStrategy();
                }
                SpreadPlacementStrategy.MergeFrom(other.SpreadPlacementStrategy);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (FolderId.Length != 0)
            {
                hash ^= FolderId.GetHashCode();
            }
            if (createdAt_ != null)
            {
                hash ^= CreatedAt.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            hash ^= Labels.GetHashCode();
            if (ZoneId.Length != 0)
            {
                hash ^= ZoneId.GetHashCode();
            }
            if (Status != global::Yandex.Cloud.Compute.V1.DiskPlacementGroup.Types.Status.Unspecified)
            {
                hash ^= Status.GetHashCode();
            }
            if (placementStrategyCase_ == PlacementStrategyOneofCase.SpreadPlacementStrategy)
            {
                hash ^= SpreadPlacementStrategy.GetHashCode();
            }
            hash ^= (int)placementStrategyCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Consumer.Length != 0)
            {
                hash ^= Consumer.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Type.Length != 0)
            {
                hash ^= Type.GetHashCode();
            }
            hash ^= tags_.GetHashCode();
            hash ^= targets_.GetHashCode();
            if (retentionPolicy_ != null)
            {
                hash ^= RetentionPolicy.GetHashCode();
            }
            if (createdAt_ != null)
            {
                hash ^= CreatedAt.GetHashCode();
            }
            if (updatedAt_ != null)
            {
                hash ^= UpdatedAt.GetHashCode();
            }
            if (Size != 0L)
            {
                hash ^= Size.GetHashCode();
            }
            if (truncatedAt_ != null)
            {
                hash ^= TruncatedAt.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 5
0
        /// <summary>
        /// Returns true if APIKeyInfo instances are equal
        /// </summary>
        /// <param name="input">Instance of APIKeyInfo to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(APIKeyInfo input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     ApiKey == input.ApiKey ||
                     (ApiKey != null &&
                      ApiKey.Equals(input.ApiKey))
                     ) &&
                 (
                     UserId == input.UserId ||
                     (UserId != null &&
                      UserId.Equals(input.UserId))
                 ) &&
                 (
                     Ips == input.Ips ||
                     Ips != null &&
                     Ips.SequenceEqual(input.Ips)
                 ) &&
                 (
                     Note == input.Note ||
                     (Note != null &&
                      Note.Equals(input.Note))
                 ) &&
                 (
                     Permissions == input.Permissions ||
                     Permissions != null &&
                     Permissions.SequenceEqual(input.Permissions)
                 ) &&
                 (
                     CreatedAt == input.CreatedAt ||
                     (CreatedAt != null &&
                      CreatedAt.Equals(input.CreatedAt))
                 ) &&
                 (
                     ReadOnly == input.ReadOnly ||
                     (ReadOnly != null &&
                      ReadOnly.Equals(input.ReadOnly))
                 ));
        }
Esempio n. 6
0
 public void MergeFrom(SymmetricKeyVersion other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.KeyId.Length != 0)
     {
         KeyId = other.KeyId;
     }
     if (other.Status != global::Yandex.Cloud.Kms.V1.SymmetricKeyVersion.Types.Status.Unspecified)
     {
         Status = other.Status;
     }
     if (other.Algorithm != global::Yandex.Cloud.Kms.V1.SymmetricAlgorithm.Unspecified)
     {
         Algorithm = other.Algorithm;
     }
     if (other.createdAt_ != null)
     {
         if (createdAt_ == null)
         {
             CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreatedAt.MergeFrom(other.CreatedAt);
     }
     if (other.Primary != false)
     {
         Primary = other.Primary;
     }
     if (other.destroyAt_ != null)
     {
         if (destroyAt_ == null)
         {
             DestroyAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         DestroyAt.MergeFrom(other.DestroyAt);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Esempio n. 7
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (FolderId.Length != 0)
            {
                hash ^= FolderId.GetHashCode();
            }
            if (createdAt_ != null)
            {
                hash ^= CreatedAt.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            hash ^= Labels.GetHashCode();
            if (addressCase_ == AddressOneofCase.ExternalIpv4Address)
            {
                hash ^= ExternalIpv4Address.GetHashCode();
            }
            if (Reserved != false)
            {
                hash ^= Reserved.GetHashCode();
            }
            if (Used != false)
            {
                hash ^= Used.GetHashCode();
            }
            hash ^= (int)addressCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Esempio n. 8
0
 public void MergeFrom(Training other)
 {
     if (other == null)
     {
         return;
     }
     if (other.createdAt_ != null)
     {
         if (createdAt_ == null)
         {
             CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreatedAt.MergeFrom(other.CreatedAt);
     }
     if (other.Status.Length != 0)
     {
         Status = other.Status;
     }
     if (other.TrainingStatus.Length != 0)
     {
         TrainingStatus = other.TrainingStatus;
     }
     if (other.TrainingStatusMessage.Length != 0)
     {
         TrainingStatusMessage = other.TrainingStatusMessage;
     }
     if (other.finishTime_ != null)
     {
         if (finishTime_ == null)
         {
             FinishTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         FinishTime.MergeFrom(other.FinishTime);
     }
     if (other.dataset_ != null)
     {
         if (dataset_ == null)
         {
             Dataset = new global::Asgt.Type.Dataset();
         }
         Dataset.MergeFrom(other.Dataset);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Esempio n. 9
0
        /// <summary>
        /// Converts this <see cref="TimeEntryModel"/> to a <see cref="TimeEntry"/>
        /// </summary>
        /// <returns>
        /// A <see cref="TimeEntry"/> object representing this instance of a <see cref="TimeEntryModel"/> object
        /// </returns>
        public TimeEntry ToEntity()
        {
            var entity = new TimeEntry
            {
                TimeEntryId = TimeEntryId,
                ProjectId   = ProjectId,
                UserId      = UserId,
                FromTime    = FromTime.HasValue ? DateTime.Parse(DateWorked.ToShortDateString() + " " + FromTime.Value.ToShortTimeString()) : null as DateTime?,
                ToTime      = ToTime.HasValue ? DateTime.Parse(DateWorked.ToShortDateString() + " " + ToTime.Value.ToShortTimeString()) : null as DateTime?,
                TotalTime   = TotalTime,
                DateWorked  = DateWorked,
                IsBillable  = IsBillable,
                CreatedAt   = CreatedAt.GetValueOrDefault(),
                CreatedBy   = CreatedBy,
                Description = Description
            };

            return(entity);
        }
Esempio n. 10
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (CreatedAt != null ? CreatedAt.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Currency != null ? Currency.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Domain != null ? Domain.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (IanaTimezone != null ? IanaTimezone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (MyShopifyDomain != null ? MyShopifyDomain.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ShopEmail != null ? ShopEmail.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ShopPhone != null ? ShopPhone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Timezone != null ? Timezone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (UpdatedAt != null ? UpdatedAt.GetHashCode() : 0);
         return(hashCode);
     }
 }
Esempio n. 11
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                if (ApiKey != null)
                {
                    hashCode = hashCode * 59 + ApiKey.GetHashCode();
                }

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

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

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

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

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

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

                return(hashCode);
            }
        }
Esempio n. 12
0
        public string GetParticipantsMatchStatsString(string playerName)
        {
            var stats  = GetParticipantsMatchStats(playerName);
            var values = new StringBuilder();

            values.AppendLine(stats.GetXP() + " XP");
            values.AppendLine(stats.DamageDealt.ToString("F1"));
            values.AppendLine(stats.Kills.ToString());
            values.AppendLine(stats.HeadshotKills.ToString());
            values.AppendLine(stats.Assists.ToString());
            values.AppendLine(stats.LongestKill.ToString("F1") + "  M");
            values.AppendLine(stats.KillStreaks.ToString());
            values.AppendLine(stats.DBNOs.ToString());
            values.AppendLine(stats.Revives.ToString());
            values.AppendLine(new TimeSpan(0, 0, (int)stats.TimeSurvived).ToString());
            values.AppendLine(CreatedAt.TimeAgo());

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

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

            return(obj is User other &&
                   Id.Equals(other.Id) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((Email == null && other.Email == null) || (Email?.Equals(other.Email) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)));
        }
Esempio n. 14
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is Order other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) &&
                   ((ReferenceId == null && other.ReferenceId == null) || (ReferenceId?.Equals(other.ReferenceId) == true)) &&
                   ((Source == null && other.Source == null) || (Source?.Equals(other.Source) == true)) &&
                   ((CustomerId == null && other.CustomerId == null) || (CustomerId?.Equals(other.CustomerId) == true)) &&
                   ((LineItems == null && other.LineItems == null) || (LineItems?.Equals(other.LineItems) == true)) &&
                   ((Taxes == null && other.Taxes == null) || (Taxes?.Equals(other.Taxes) == true)) &&
                   ((Discounts == null && other.Discounts == null) || (Discounts?.Equals(other.Discounts) == true)) &&
                   ((ServiceCharges == null && other.ServiceCharges == null) || (ServiceCharges?.Equals(other.ServiceCharges) == true)) &&
                   ((Fulfillments == null && other.Fulfillments == null) || (Fulfillments?.Equals(other.Fulfillments) == true)) &&
                   ((Returns == null && other.Returns == null) || (Returns?.Equals(other.Returns) == true)) &&
                   ((ReturnAmounts == null && other.ReturnAmounts == null) || (ReturnAmounts?.Equals(other.ReturnAmounts) == true)) &&
                   ((NetAmounts == null && other.NetAmounts == null) || (NetAmounts?.Equals(other.NetAmounts) == true)) &&
                   ((RoundingAdjustment == null && other.RoundingAdjustment == null) || (RoundingAdjustment?.Equals(other.RoundingAdjustment) == true)) &&
                   ((Tenders == null && other.Tenders == null) || (Tenders?.Equals(other.Tenders) == true)) &&
                   ((Refunds == null && other.Refunds == null) || (Refunds?.Equals(other.Refunds) == true)) &&
                   ((Metadata == null && other.Metadata == null) || (Metadata?.Equals(other.Metadata) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)) &&
                   ((ClosedAt == null && other.ClosedAt == null) || (ClosedAt?.Equals(other.ClosedAt) == true)) &&
                   ((State == null && other.State == null) || (State?.Equals(other.State) == true)) &&
                   ((Version == null && other.Version == null) || (Version?.Equals(other.Version) == true)) &&
                   ((TotalMoney == null && other.TotalMoney == null) || (TotalMoney?.Equals(other.TotalMoney) == true)) &&
                   ((TotalTaxMoney == null && other.TotalTaxMoney == null) || (TotalTaxMoney?.Equals(other.TotalTaxMoney) == true)) &&
                   ((TotalDiscountMoney == null && other.TotalDiscountMoney == null) || (TotalDiscountMoney?.Equals(other.TotalDiscountMoney) == true)) &&
                   ((TotalTipMoney == null && other.TotalTipMoney == null) || (TotalTipMoney?.Equals(other.TotalTipMoney) == true)) &&
                   ((TotalServiceChargeMoney == null && other.TotalServiceChargeMoney == null) || (TotalServiceChargeMoney?.Equals(other.TotalServiceChargeMoney) == true)) &&
                   ((PricingOptions == null && other.PricingOptions == null) || (PricingOptions?.Equals(other.PricingOptions) == true)) &&
                   ((Rewards == null && other.Rewards == null) || (Rewards?.Equals(other.Rewards) == true)));
        }
Esempio n. 15
0
 public override int GetHashCode()
 {
     unchecked {
         const int randomPrime = 397;
         int       hashCode    = Id.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Email != null ? Email.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Password != null ? Password.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ CreatedAt.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ (EmailConfirmedAt != null ? EmailConfirmedAt.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (DeletedAt != null ? DeletedAt.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (InviteCode != null ? InviteCode.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (UniversityId != null ? UniversityId.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (Role != null ? Role.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (AcademicField != null ? AcademicField.GetHashCode() : 0);
         hashCode = (hashCode * randomPrime) ^ (AcademicResume != null ? AcademicResume.GetHashCode() : 0);
         return(hashCode);
     }
 }
Esempio n. 16
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is Payment other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)) &&
                   ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) &&
                   ((TipMoney == null && other.TipMoney == null) || (TipMoney?.Equals(other.TipMoney) == true)) &&
                   ((TotalMoney == null && other.TotalMoney == null) || (TotalMoney?.Equals(other.TotalMoney) == true)) &&
                   ((AppFeeMoney == null && other.AppFeeMoney == null) || (AppFeeMoney?.Equals(other.AppFeeMoney) == true)) &&
                   ((ProcessingFee == null && other.ProcessingFee == null) || (ProcessingFee?.Equals(other.ProcessingFee) == true)) &&
                   ((RefundedMoney == null && other.RefundedMoney == null) || (RefundedMoney?.Equals(other.RefundedMoney) == true)) &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((DelayDuration == null && other.DelayDuration == null) || (DelayDuration?.Equals(other.DelayDuration) == true)) &&
                   ((DelayAction == null && other.DelayAction == null) || (DelayAction?.Equals(other.DelayAction) == true)) &&
                   ((DelayedUntil == null && other.DelayedUntil == null) || (DelayedUntil?.Equals(other.DelayedUntil) == true)) &&
                   ((SourceType == null && other.SourceType == null) || (SourceType?.Equals(other.SourceType) == true)) &&
                   ((CardDetails == null && other.CardDetails == null) || (CardDetails?.Equals(other.CardDetails) == true)) &&
                   ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) &&
                   ((OrderId == null && other.OrderId == null) || (OrderId?.Equals(other.OrderId) == true)) &&
                   ((ReferenceId == null && other.ReferenceId == null) || (ReferenceId?.Equals(other.ReferenceId) == true)) &&
                   ((CustomerId == null && other.CustomerId == null) || (CustomerId?.Equals(other.CustomerId) == true)) &&
                   ((EmployeeId == null && other.EmployeeId == null) || (EmployeeId?.Equals(other.EmployeeId) == true)) &&
                   ((RefundIds == null && other.RefundIds == null) || (RefundIds?.Equals(other.RefundIds) == true)) &&
                   ((RiskEvaluation == null && other.RiskEvaluation == null) || (RiskEvaluation?.Equals(other.RiskEvaluation) == true)) &&
                   ((BuyerEmailAddress == null && other.BuyerEmailAddress == null) || (BuyerEmailAddress?.Equals(other.BuyerEmailAddress) == true)) &&
                   ((BillingAddress == null && other.BillingAddress == null) || (BillingAddress?.Equals(other.BillingAddress) == true)) &&
                   ((ShippingAddress == null && other.ShippingAddress == null) || (ShippingAddress?.Equals(other.ShippingAddress) == true)) &&
                   ((Note == null && other.Note == null) || (Note?.Equals(other.Note) == true)) &&
                   ((StatementDescriptionIdentifier == null && other.StatementDescriptionIdentifier == null) || (StatementDescriptionIdentifier?.Equals(other.StatementDescriptionIdentifier) == true)) &&
                   ((ReceiptNumber == null && other.ReceiptNumber == null) || (ReceiptNumber?.Equals(other.ReceiptNumber) == true)) &&
                   ((ReceiptUrl == null && other.ReceiptUrl == null) || (ReceiptUrl?.Equals(other.ReceiptUrl) == true)));
        }
Esempio n. 17
0
        public void MergeFrom(Key other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Id.Length != 0)
            {
                Id = other.Id;
            }
            if (other.createdAt_ != null)
            {
                if (createdAt_ == null)
                {
                    CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                }
                CreatedAt.MergeFrom(other.CreatedAt);
            }
            if (other.Description.Length != 0)
            {
                Description = other.Description;
            }
            if (other.KeyAlgorithm != global::Yandex.Cloud.Iam.V1.Key.Types.Algorithm.Unspecified)
            {
                KeyAlgorithm = other.KeyAlgorithm;
            }
            if (other.PublicKey.Length != 0)
            {
                PublicKey = other.PublicKey;
            }
            switch (other.SubjectCase)
            {
            case SubjectOneofCase.UserAccountId:
                UserAccountId = other.UserAccountId;
                break;

            case SubjectOneofCase.ServiceAccountId:
                ServiceAccountId = other.ServiceAccountId;
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Esempio n. 18
0
        public override int GetHashCode()
        {
            var hashCode = -2026909135;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Id);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Repository);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Tag);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Digest);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(CreatedSince);

            hashCode = hashCode * -1521134295 + CreatedAt.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Size);

            return(hashCode);
        }
Esempio n. 19
0
        private bool TryGetNextExecution(out DateTime?nextExecution, out Exception exception)
        {
            try
            {
                nextExecution = ParseCronExpression(Cron).GetNextOccurrence(
                    LastExecution ?? CreatedAt.AddSeconds(-1),
                    TimeZone,
                    inclusive: false);

                exception = null;
                return(true);
            }
            catch (Exception ex)
            {
                exception     = ex;
                nextExecution = null;
                return(false);
            }
        }
 public void MergeFrom(PortfolioCreated other)
 {
     if (other == null)
     {
         return;
     }
     if (other.ObjectUuid.Length != 0)
     {
         ObjectUuid = other.ObjectUuid;
     }
     if (other.Client.Length != 0)
     {
         Client = other.Client;
     }
     if (other.PortfolioName.Length != 0)
     {
         PortfolioName = other.PortfolioName;
     }
     if (other.createdAt_ != null)
     {
         if (createdAt_ == null)
         {
             createdAt_ = new global::ProtocolBufferExperiments.Common.TimezoneTimestamp();
         }
         CreatedAt.MergeFrom(other.CreatedAt);
     }
     if (other.receivedAt_ != null)
     {
         if (receivedAt_ == null)
         {
             receivedAt_ = new global::ProtocolBufferExperiments.Common.TimezoneTimestamp();
         }
         ReceivedAt.MergeFrom(other.ReceivedAt);
     }
     if (other.value_ != null)
     {
         if (value_ == null)
         {
             value_ = new global::DotNet.Decimal();
         }
         Value.MergeFrom(other.Value);
     }
 }
Esempio n. 21
0
 public CRM_Customer_Profile()
 {
     this.ID                 = string.IsNullOrEmpty(ID.ToString()) ? ID : 0;
     this.CustomerID         = string.IsNullOrEmpty(CustomerID) ? CustomerID : "";
     this.CustomerName       = string.IsNullOrEmpty(CustomerName) ? CustomerName : "";
     this.Address            = string.IsNullOrEmpty(Address) ? Address : "";
     this.Phone              = string.IsNullOrEmpty(Phone) ? Phone : "";
     this.Website            = string.IsNullOrEmpty(Website) ? Website : "";
     this.BusinessCategoryID = string.IsNullOrEmpty(BusinessCategoryID) ? BusinessCategoryID : "";
     this.FoundedDate        = string.IsNullOrEmpty(FoundedDate.ToString()) ? FoundedDate : DateTime.Now;
     this.Avatar             = string.IsNullOrEmpty(Avatar) ? Avatar : Avatar;
     this.DescriptionCompany = string.IsNullOrEmpty(DescriptionCompany) ? DescriptionCompany : DescriptionCompany;
     this.Refer              = string.IsNullOrEmpty(Refer) ? DescriptionCompany : Refer;
     this.Status             = string.IsNullOrEmpty(Status.ToString()) ? Status : true;
     this.UpdatedAt          = string.IsNullOrEmpty(UpdatedAt.ToString()) ? UpdatedAt : DateTime.Parse("1900-01-01");
     this.CreatedAt          = string.IsNullOrEmpty(CreatedAt.ToString()) ? CreatedAt : DateTime.Parse("1900-01-01");
     this.CreatedBy          = string.IsNullOrEmpty(CreatedBy) ? CreatedBy : "";
     this.UpdatedBy          = string.IsNullOrEmpty(UpdatedBy) ? UpdatedBy : "";
 }
Esempio n. 22
0
        public override int GetHashCode()
        {
            int hashCode = 1946622093;

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

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

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

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

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

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

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

            return(hashCode);
        }
Esempio n. 23
0
            /// <summary>
            /// Return true if schema is valid
            /// </summary>
            /// <returns>True if valid</returns>
            public ResultReport Validate()
            {
                // Check if properties are not null
                if (SchemaVer == null || PEBakeryMinVer == null)
                {
                    return(new ResultReport(false, "Update json is corrupted"));
                }

                // Check schema_ver and pebakery_min_ver
                if (Global.Const.UpdateSchemaMaxVerInst < SchemaVer)
                {
                    return(new ResultReport(false, "Requires newer version of PEBakery"));
                }
                if (SchemaVer < Global.Const.UpdateSchemaMinVerInst)
                {
                    return(new ResultReport(false, "Update json is too old to be read by PEbakery"));
                }
                if (Global.Const.ProgramVersionInst < PEBakeryMinVer)
                {
                    return(new ResultReport(false, $"Requires PEBakery {Global.Const.ProgramVersionStr} or higher"));
                }

                // Check created_at
                if (CreatedAt.Equals(DateTime.MinValue))
                {
                    return(new ResultReport(false, "Update json is corrupted"));
                }

                // Check file index
                if (Index == null)
                {
                    return(new ResultReport(false, "Update json is corrupted"));
                }
                ResultReport report = Index.Validate();

                if (!report.Success)
                {
                    return(report);
                }

                return(new ResultReport(true));
            }
Esempio n. 24
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is V1Payment other &&
                   ((Context == null && other.Context == null) || (Context?.Equals(other.Context) == true)) &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((MerchantId == null && other.MerchantId == null) || (MerchantId?.Equals(other.MerchantId) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((CreatorId == null && other.CreatorId == null) || (CreatorId?.Equals(other.CreatorId) == true)) &&
                   ((Device == null && other.Device == null) || (Device?.Equals(other.Device) == true)) &&
                   ((PaymentUrl == null && other.PaymentUrl == null) || (PaymentUrl?.Equals(other.PaymentUrl) == true)) &&
                   ((ReceiptUrl == null && other.ReceiptUrl == null) || (ReceiptUrl?.Equals(other.ReceiptUrl) == true)) &&
                   ((InclusiveTaxMoney == null && other.InclusiveTaxMoney == null) || (InclusiveTaxMoney?.Equals(other.InclusiveTaxMoney) == true)) &&
                   ((AdditiveTaxMoney == null && other.AdditiveTaxMoney == null) || (AdditiveTaxMoney?.Equals(other.AdditiveTaxMoney) == true)) &&
                   ((TaxMoney == null && other.TaxMoney == null) || (TaxMoney?.Equals(other.TaxMoney) == true)) &&
                   ((TipMoney == null && other.TipMoney == null) || (TipMoney?.Equals(other.TipMoney) == true)) &&
                   ((DiscountMoney == null && other.DiscountMoney == null) || (DiscountMoney?.Equals(other.DiscountMoney) == true)) &&
                   ((TotalCollectedMoney == null && other.TotalCollectedMoney == null) || (TotalCollectedMoney?.Equals(other.TotalCollectedMoney) == true)) &&
                   ((ProcessingFeeMoney == null && other.ProcessingFeeMoney == null) || (ProcessingFeeMoney?.Equals(other.ProcessingFeeMoney) == true)) &&
                   ((NetTotalMoney == null && other.NetTotalMoney == null) || (NetTotalMoney?.Equals(other.NetTotalMoney) == true)) &&
                   ((RefundedMoney == null && other.RefundedMoney == null) || (RefundedMoney?.Equals(other.RefundedMoney) == true)) &&
                   ((SwedishRoundingMoney == null && other.SwedishRoundingMoney == null) || (SwedishRoundingMoney?.Equals(other.SwedishRoundingMoney) == true)) &&
                   ((GrossSalesMoney == null && other.GrossSalesMoney == null) || (GrossSalesMoney?.Equals(other.GrossSalesMoney) == true)) &&
                   ((NetSalesMoney == null && other.NetSalesMoney == null) || (NetSalesMoney?.Equals(other.NetSalesMoney) == true)) &&
                   ((InclusiveTax == null && other.InclusiveTax == null) || (InclusiveTax?.Equals(other.InclusiveTax) == true)) &&
                   ((AdditiveTax == null && other.AdditiveTax == null) || (AdditiveTax?.Equals(other.AdditiveTax) == true)) &&
                   ((Tender == null && other.Tender == null) || (Tender?.Equals(other.Tender) == true)) &&
                   ((Refunds == null && other.Refunds == null) || (Refunds?.Equals(other.Refunds) == true)) &&
                   ((Itemizations == null && other.Itemizations == null) || (Itemizations?.Equals(other.Itemizations) == true)) &&
                   ((SurchargeMoney == null && other.SurchargeMoney == null) || (SurchargeMoney?.Equals(other.SurchargeMoney) == true)) &&
                   ((Surcharges == null && other.Surcharges == null) || (Surcharges?.Equals(other.Surcharges) == true)) &&
                   ((IsPartial == null && other.IsPartial == null) || (IsPartial?.Equals(other.IsPartial) == true)));
        }
Esempio n. 25
0
        /// <summary>
        /// Output all properties
        /// </summary>
        /// <returns>A string</returns>
        public override string ToString()
        {
            var toString = new StringBuilder();

            toString.Append("Id: ").AppendLine(Id);
            toString.Append("Title: ").AppendLine(Title);
            toString.Append("Status: ").AppendLine(Status);
            toString.Append("Type: ").AppendLine(Type);
            toString.Append("Amount: ").AppendLine(Amount.ToString(CultureInfo.InvariantCulture));
            toString.Append("MinimumPrice: ").AppendLine(MinimumPrice.ToString(CultureInfo.InvariantCulture));
            toString.Append("Storewide: ").AppendLine(Storewide.ToString());
            //toString.Append("ApplicableTo: ").AppendLine(ApplicableTo);
            toString.Append("CreatedAt: ").AppendLine(CreatedAt.ToString(CultureInfo.InvariantCulture));
            if (ModifiedAt.HasValue)
            {
                toString.Append("ModifiedAt: ").AppendLine(ModifiedAt.Value.ToString(CultureInfo.InvariantCulture)).AppendLine();
            }
            toString.Append("Currency: ").AppendLine(Currency);
            return(toString.ToString());
        }
Esempio n. 26
0
        void ReleaseDesignerOutlets()
        {
            if (Title != null)
            {
                Title.Dispose();
                Title = null;
            }

            if (CreatedAt != null)
            {
                CreatedAt.Dispose();
                CreatedAt = null;
            }

            if (Detail != null)
            {
                Detail.Dispose();
                Detail = null;
            }
        }
Esempio n. 27
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is OrderUpdated other &&
                   ((OrderId == null && other.OrderId == null) || (OrderId?.Equals(other.OrderId) == true)) &&
                   ((Version == null && other.Version == null) || (Version?.Equals(other.Version) == true)) &&
                   ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) &&
                   ((State == null && other.State == null) || (State?.Equals(other.State) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)));
        }
Esempio n. 28
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is WageSetting other &&
                   ((TeamMemberId == null && other.TeamMemberId == null) || (TeamMemberId?.Equals(other.TeamMemberId) == true)) &&
                   ((JobAssignments == null && other.JobAssignments == null) || (JobAssignments?.Equals(other.JobAssignments) == true)) &&
                   ((IsOvertimeExempt == null && other.IsOvertimeExempt == null) || (IsOvertimeExempt?.Equals(other.IsOvertimeExempt) == true)) &&
                   ((Version == null && other.Version == null) || (Version?.Equals(other.Version) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)));
        }
Esempio n. 29
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is WorkweekConfig other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((StartOfWeek == null && other.StartOfWeek == null) || (StartOfWeek?.Equals(other.StartOfWeek) == true)) &&
                   ((StartOfDayLocalTime == null && other.StartOfDayLocalTime == null) || (StartOfDayLocalTime?.Equals(other.StartOfDayLocalTime) == true)) &&
                   ((Version == null && other.Version == null) || (Version?.Equals(other.Version) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)));
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is LoyaltyProgramRewardTier other &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   Points.Equals(other.Points) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((Definition == null && other.Definition == null) || (Definition?.Equals(other.Definition) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((PricingRuleReference == null && other.PricingRuleReference == null) || (PricingRuleReference?.Equals(other.PricingRuleReference) == true)));
        }