コード例 #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: {
         CustomerId = input.ReadString();
         break;
       }
       case 18: {
         global::Google.Ads.GoogleAds.V0.Services.KeywordAndUrlSeed subBuilder = new global::Google.Ads.GoogleAds.V0.Services.KeywordAndUrlSeed();
         if (seedCase_ == SeedOneofCase.KeywordAndUrlSeed) {
           subBuilder.MergeFrom(KeywordAndUrlSeed);
         }
         input.ReadMessage(subBuilder);
         KeywordAndUrlSeed = subBuilder;
         break;
       }
       case 26: {
         global::Google.Ads.GoogleAds.V0.Services.KeywordSeed subBuilder = new global::Google.Ads.GoogleAds.V0.Services.KeywordSeed();
         if (seedCase_ == SeedOneofCase.KeywordSeed) {
           subBuilder.MergeFrom(KeywordSeed);
         }
         input.ReadMessage(subBuilder);
         KeywordSeed = subBuilder;
         break;
       }
       case 42: {
         global::Google.Ads.GoogleAds.V0.Services.UrlSeed subBuilder = new global::Google.Ads.GoogleAds.V0.Services.UrlSeed();
         if (seedCase_ == SeedOneofCase.UrlSeed) {
           subBuilder.MergeFrom(UrlSeed);
         }
         input.ReadMessage(subBuilder);
         UrlSeed = subBuilder;
         break;
       }
       case 58: {
         string value = _single_language_codec.Read(input);
         if (language_ == null || value != "") {
           Language = value;
         }
         break;
       }
       case 66: {
         geoTargetConstants_.AddEntriesFrom(input, _repeated_geoTargetConstants_codec);
         break;
       }
       case 72: {
         keywordPlanNetwork_ = (global::Google.Ads.GoogleAds.V0.Enums.KeywordPlanNetworkEnum.Types.KeywordPlanNetwork) input.ReadEnum();
         break;
       }
     }
   }
 }
コード例 #2
0
    public void MergeFrom(GenerateKeywordIdeasRequest other) {
      if (other == null) {
        return;
      }
      if (other.CustomerId.Length != 0) {
        CustomerId = other.CustomerId;
      }
      if (other.language_ != null) {
        if (language_ == null || other.Language != "") {
          Language = other.Language;
        }
      }
      geoTargetConstants_.Add(other.geoTargetConstants_);
      if (other.KeywordPlanNetwork != 0) {
        KeywordPlanNetwork = other.KeywordPlanNetwork;
      }
      switch (other.SeedCase) {
        case SeedOneofCase.KeywordAndUrlSeed:
          if (KeywordAndUrlSeed == null) {
            KeywordAndUrlSeed = new global::Google.Ads.GoogleAds.V0.Services.KeywordAndUrlSeed();
          }
          KeywordAndUrlSeed.MergeFrom(other.KeywordAndUrlSeed);
          break;
        case SeedOneofCase.KeywordSeed:
          if (KeywordSeed == null) {
            KeywordSeed = new global::Google.Ads.GoogleAds.V0.Services.KeywordSeed();
          }
          KeywordSeed.MergeFrom(other.KeywordSeed);
          break;
        case SeedOneofCase.UrlSeed:
          if (UrlSeed == null) {
            UrlSeed = new global::Google.Ads.GoogleAds.V0.Services.UrlSeed();
          }
          UrlSeed.MergeFrom(other.UrlSeed);
          break;
      }

      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }