예제 #1
0
 public void MergeFrom(Tier other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.TierIndex != 0)
     {
         TierIndex = other.TierIndex;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.localizedName_ != null)
     {
         if (localizedName_ == null)
         {
             LocalizedName = new global::PKIo.LocalizedString();
         }
         LocalizedName.MergeFrom(other.LocalizedName);
     }
     if (other.SecondaryTierName.Length != 0)
     {
         SecondaryTierName = other.SecondaryTierName;
     }
     if (other.localizedSecondaryTierName_ != null)
     {
         if (localizedSecondaryTierName_ == null)
         {
             LocalizedSecondaryTierName = new global::PKIo.LocalizedString();
         }
         LocalizedSecondaryTierName.MergeFrom(other.LocalizedSecondaryTierName);
     }
     if (other.ProgramId.Length != 0)
     {
         ProgramId = other.ProgramId;
     }
     if (other.PassTemplateId.Length != 0)
     {
         PassTemplateId = other.PassTemplateId;
     }
     if (other.TierUpgradeMessage.Length != 0)
     {
         TierUpgradeMessage = other.TierUpgradeMessage;
     }
     if (other.localizedTierUpgradeMessage_ != null)
     {
         if (localizedTierUpgradeMessage_ == null)
         {
             LocalizedTierUpgradeMessage = new global::PKIo.LocalizedString();
         }
         LocalizedTierUpgradeMessage.MergeFrom(other.LocalizedTierUpgradeMessage);
     }
     if (other.TierDowngradeMessage.Length != 0)
     {
         TierDowngradeMessage = other.TierDowngradeMessage;
     }
     if (other.localizedTierDowngradeMessage_ != null)
     {
         if (localizedTierDowngradeMessage_ == null)
         {
             LocalizedTierDowngradeMessage = new global::PKIo.LocalizedString();
         }
         LocalizedTierDowngradeMessage.MergeFrom(other.LocalizedTierDowngradeMessage);
     }
     if (other.created_ != null)
     {
         if (created_ == null)
         {
             Created = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         Created.MergeFrom(other.Created);
     }
     if (other.updated_ != null)
     {
         if (updated_ == null)
         {
             Updated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         Updated.MergeFrom(other.Updated);
     }
     if (other.PointsOverdrawn != false)
     {
         PointsOverdrawn = other.PointsOverdrawn;
     }
     if (other.SecondaryPointsOverdrawn != false)
     {
         SecondaryPointsOverdrawn = other.SecondaryPointsOverdrawn;
     }
     if (other.expirySettings_ != null)
     {
         if (expirySettings_ == null)
         {
             ExpirySettings = new global::PKIo.ExpirySettings();
         }
         ExpirySettings.MergeFrom(other.ExpirySettings);
     }
     if (other.Timezone.Length != 0)
     {
         Timezone = other.Timezone;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
예제 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (TierIndex != 0)
            {
                hash ^= TierIndex.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (localizedName_ != null)
            {
                hash ^= LocalizedName.GetHashCode();
            }
            if (SecondaryTierName.Length != 0)
            {
                hash ^= SecondaryTierName.GetHashCode();
            }
            if (localizedSecondaryTierName_ != null)
            {
                hash ^= LocalizedSecondaryTierName.GetHashCode();
            }
            if (ProgramId.Length != 0)
            {
                hash ^= ProgramId.GetHashCode();
            }
            if (PassTemplateId.Length != 0)
            {
                hash ^= PassTemplateId.GetHashCode();
            }
            if (TierUpgradeMessage.Length != 0)
            {
                hash ^= TierUpgradeMessage.GetHashCode();
            }
            if (localizedTierUpgradeMessage_ != null)
            {
                hash ^= LocalizedTierUpgradeMessage.GetHashCode();
            }
            if (TierDowngradeMessage.Length != 0)
            {
                hash ^= TierDowngradeMessage.GetHashCode();
            }
            if (localizedTierDowngradeMessage_ != null)
            {
                hash ^= LocalizedTierDowngradeMessage.GetHashCode();
            }
            if (created_ != null)
            {
                hash ^= Created.GetHashCode();
            }
            if (updated_ != null)
            {
                hash ^= Updated.GetHashCode();
            }
            if (PointsOverdrawn != false)
            {
                hash ^= PointsOverdrawn.GetHashCode();
            }
            if (SecondaryPointsOverdrawn != false)
            {
                hash ^= SecondaryPointsOverdrawn.GetHashCode();
            }
            if (expirySettings_ != null)
            {
                hash ^= ExpirySettings.GetHashCode();
            }
            if (Timezone.Length != 0)
            {
                hash ^= Timezone.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }