public void MergeFrom(BillingSetup other)
        {
            if (other == null)
            {
                return;
            }
            if (other.ResourceName.Length != 0)
            {
                ResourceName = other.ResourceName;
            }
            if (other.id_ != null)
            {
                if (id_ == null || other.Id != 0L)
                {
                    Id = other.Id;
                }
            }
            if (other.Status != 0)
            {
                Status = other.Status;
            }
            if (other.paymentsAccount_ != null)
            {
                if (paymentsAccount_ == null || other.PaymentsAccount != "")
                {
                    PaymentsAccount = other.PaymentsAccount;
                }
            }
            if (other.paymentsAccountInfo_ != null)
            {
                if (paymentsAccountInfo_ == null)
                {
                    PaymentsAccountInfo = new global::Google.Ads.GoogleAds.V2.Resources.BillingSetup.Types.PaymentsAccountInfo();
                }
                PaymentsAccountInfo.MergeFrom(other.PaymentsAccountInfo);
            }
            switch (other.StartTimeCase)
            {
            case StartTimeOneofCase.StartDateTime:
                StartDateTime = other.StartDateTime;
                break;

            case StartTimeOneofCase.StartTimeType:
                StartTimeType = other.StartTimeType;
                break;
            }

            switch (other.EndTimeCase)
            {
            case EndTimeOneofCase.EndDateTime:
                EndDateTime = other.EndDateTime;
                break;

            case EndTimeOneofCase.EndTimeType:
                EndTimeType = other.EndTimeType;
                break;
            }

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

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (id_ != null)
            {
                hash ^= Id.GetHashCode();
            }
            if (Status != 0)
            {
                hash ^= Status.GetHashCode();
            }
            if (paymentsAccount_ != null)
            {
                hash ^= PaymentsAccount.GetHashCode();
            }
            if (paymentsAccountInfo_ != null)
            {
                hash ^= PaymentsAccountInfo.GetHashCode();
            }
            if (startTimeCase_ == StartTimeOneofCase.StartDateTime)
            {
                hash ^= StartDateTime.GetHashCode();
            }
            if (startTimeCase_ == StartTimeOneofCase.StartTimeType)
            {
                hash ^= StartTimeType.GetHashCode();
            }
            if (endTimeCase_ == EndTimeOneofCase.EndDateTime)
            {
                hash ^= EndDateTime.GetHashCode();
            }
            if (endTimeCase_ == EndTimeOneofCase.EndTimeType)
            {
                hash ^= EndTimeType.GetHashCode();
            }
            hash ^= (int)startTimeCase_;
            hash ^= (int)endTimeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Beispiel #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (id_ != null)
            {
                hash ^= Id.GetHashCode();
            }
            if (Status != global::Google.Ads.GoogleAds.V2.Enums.BillingSetupStatusEnum.Types.BillingSetupStatus.Unspecified)
            {
                hash ^= Status.GetHashCode();
            }
            if (paymentsAccount_ != null)
            {
                hash ^= PaymentsAccount.GetHashCode();
            }
            if (paymentsAccountInfo_ != null)
            {
                hash ^= PaymentsAccountInfo.GetHashCode();
            }
            if (startTimeCase_ == StartTimeOneofCase.StartDateTime)
            {
                hash ^= StartDateTime.GetHashCode();
            }
            if (startTimeCase_ == StartTimeOneofCase.StartTimeType)
            {
                hash ^= StartTimeType.GetHashCode();
            }
            if (endTimeCase_ == EndTimeOneofCase.EndDateTime)
            {
                hash ^= EndDateTime.GetHashCode();
            }
            if (endTimeCase_ == EndTimeOneofCase.EndTimeType)
            {
                hash ^= EndTimeType.GetHashCode();
            }
            hash ^= (int)startTimeCase_;
            hash ^= (int)endTimeCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }