Exemplo n.º 1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    ResourceName = input.ReadString();
                    break;
                }

                case 26: {
                    long?value = _single_id_codec.Read(input);
                    if (id_ == null || value != 0L)
                    {
                        Id = value;
                    }
                    break;
                }

                case 34: {
                    string value = _single_name_codec.Read(input);
                    if (name_ == null || value != "")
                    {
                        Name = value;
                    }
                    break;
                }

                case 42: {
                    long?value = _single_amountMicros_codec.Read(input);
                    if (amountMicros_ == null || value != 0L)
                    {
                        AmountMicros = value;
                    }
                    break;
                }

                case 48: {
                    Status = (global::Google.Ads.GoogleAds.V4.Enums.BudgetStatusEnum.Types.BudgetStatus)input.ReadEnum();
                    break;
                }

                case 56: {
                    DeliveryMethod = (global::Google.Ads.GoogleAds.V4.Enums.BudgetDeliveryMethodEnum.Types.BudgetDeliveryMethod)input.ReadEnum();
                    break;
                }

                case 66: {
                    bool?value = _single_explicitlyShared_codec.Read(input);
                    if (explicitlyShared_ == null || value != false)
                    {
                        ExplicitlyShared = value;
                    }
                    break;
                }

                case 74: {
                    long?value = _single_referenceCount_codec.Read(input);
                    if (referenceCount_ == null || value != 0L)
                    {
                        ReferenceCount = value;
                    }
                    break;
                }

                case 82: {
                    long?value = _single_totalAmountMicros_codec.Read(input);
                    if (totalAmountMicros_ == null || value != 0L)
                    {
                        TotalAmountMicros = value;
                    }
                    break;
                }

                case 90: {
                    bool?value = _single_hasRecommendedBudget_codec.Read(input);
                    if (hasRecommendedBudget_ == null || value != false)
                    {
                        HasRecommendedBudget = value;
                    }
                    break;
                }

                case 98: {
                    long?value = _single_recommendedBudgetAmountMicros_codec.Read(input);
                    if (recommendedBudgetAmountMicros_ == null || value != 0L)
                    {
                        RecommendedBudgetAmountMicros = value;
                    }
                    break;
                }

                case 104: {
                    Period = (global::Google.Ads.GoogleAds.V4.Enums.BudgetPeriodEnum.Types.BudgetPeriod)input.ReadEnum();
                    break;
                }

                case 114: {
                    long?value = _single_recommendedBudgetEstimatedChangeWeeklyClicks_codec.Read(input);
                    if (recommendedBudgetEstimatedChangeWeeklyClicks_ == null || value != 0L)
                    {
                        RecommendedBudgetEstimatedChangeWeeklyClicks = value;
                    }
                    break;
                }

                case 122: {
                    long?value = _single_recommendedBudgetEstimatedChangeWeeklyCostMicros_codec.Read(input);
                    if (recommendedBudgetEstimatedChangeWeeklyCostMicros_ == null || value != 0L)
                    {
                        RecommendedBudgetEstimatedChangeWeeklyCostMicros = value;
                    }
                    break;
                }

                case 130: {
                    long?value = _single_recommendedBudgetEstimatedChangeWeeklyInteractions_codec.Read(input);
                    if (recommendedBudgetEstimatedChangeWeeklyInteractions_ == null || value != 0L)
                    {
                        RecommendedBudgetEstimatedChangeWeeklyInteractions = value;
                    }
                    break;
                }

                case 138: {
                    long?value = _single_recommendedBudgetEstimatedChangeWeeklyViews_codec.Read(input);
                    if (recommendedBudgetEstimatedChangeWeeklyViews_ == null || value != 0L)
                    {
                        RecommendedBudgetEstimatedChangeWeeklyViews = value;
                    }
                    break;
                }

                case 144: {
                    Type = (global::Google.Ads.GoogleAds.V4.Enums.BudgetTypeEnum.Types.BudgetType)input.ReadEnum();
                    break;
                }
                }
            }
        }
Exemplo n.º 2
0
 public void MergeFrom(CampaignBudget 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.name_ != null)
     {
         if (name_ == null || other.Name != "")
         {
             Name = other.Name;
         }
     }
     if (other.amountMicros_ != null)
     {
         if (amountMicros_ == null || other.AmountMicros != 0L)
         {
             AmountMicros = other.AmountMicros;
         }
     }
     if (other.totalAmountMicros_ != null)
     {
         if (totalAmountMicros_ == null || other.TotalAmountMicros != 0L)
         {
             TotalAmountMicros = other.TotalAmountMicros;
         }
     }
     if (other.Status != global::Google.Ads.GoogleAds.V4.Enums.BudgetStatusEnum.Types.BudgetStatus.Unspecified)
     {
         Status = other.Status;
     }
     if (other.DeliveryMethod != global::Google.Ads.GoogleAds.V4.Enums.BudgetDeliveryMethodEnum.Types.BudgetDeliveryMethod.Unspecified)
     {
         DeliveryMethod = other.DeliveryMethod;
     }
     if (other.explicitlyShared_ != null)
     {
         if (explicitlyShared_ == null || other.ExplicitlyShared != false)
         {
             ExplicitlyShared = other.ExplicitlyShared;
         }
     }
     if (other.referenceCount_ != null)
     {
         if (referenceCount_ == null || other.ReferenceCount != 0L)
         {
             ReferenceCount = other.ReferenceCount;
         }
     }
     if (other.hasRecommendedBudget_ != null)
     {
         if (hasRecommendedBudget_ == null || other.HasRecommendedBudget != false)
         {
             HasRecommendedBudget = other.HasRecommendedBudget;
         }
     }
     if (other.recommendedBudgetAmountMicros_ != null)
     {
         if (recommendedBudgetAmountMicros_ == null || other.RecommendedBudgetAmountMicros != 0L)
         {
             RecommendedBudgetAmountMicros = other.RecommendedBudgetAmountMicros;
         }
     }
     if (other.Period != global::Google.Ads.GoogleAds.V4.Enums.BudgetPeriodEnum.Types.BudgetPeriod.Unspecified)
     {
         Period = other.Period;
     }
     if (other.recommendedBudgetEstimatedChangeWeeklyClicks_ != null)
     {
         if (recommendedBudgetEstimatedChangeWeeklyClicks_ == null || other.RecommendedBudgetEstimatedChangeWeeklyClicks != 0L)
         {
             RecommendedBudgetEstimatedChangeWeeklyClicks = other.RecommendedBudgetEstimatedChangeWeeklyClicks;
         }
     }
     if (other.recommendedBudgetEstimatedChangeWeeklyCostMicros_ != null)
     {
         if (recommendedBudgetEstimatedChangeWeeklyCostMicros_ == null || other.RecommendedBudgetEstimatedChangeWeeklyCostMicros != 0L)
         {
             RecommendedBudgetEstimatedChangeWeeklyCostMicros = other.RecommendedBudgetEstimatedChangeWeeklyCostMicros;
         }
     }
     if (other.recommendedBudgetEstimatedChangeWeeklyInteractions_ != null)
     {
         if (recommendedBudgetEstimatedChangeWeeklyInteractions_ == null || other.RecommendedBudgetEstimatedChangeWeeklyInteractions != 0L)
         {
             RecommendedBudgetEstimatedChangeWeeklyInteractions = other.RecommendedBudgetEstimatedChangeWeeklyInteractions;
         }
     }
     if (other.recommendedBudgetEstimatedChangeWeeklyViews_ != null)
     {
         if (recommendedBudgetEstimatedChangeWeeklyViews_ == null || other.RecommendedBudgetEstimatedChangeWeeklyViews != 0L)
         {
             RecommendedBudgetEstimatedChangeWeeklyViews = other.RecommendedBudgetEstimatedChangeWeeklyViews;
         }
     }
     if (other.Type != global::Google.Ads.GoogleAds.V4.Enums.BudgetTypeEnum.Types.BudgetType.Unspecified)
     {
         Type = other.Type;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }