Google.Api.Ads.AdWords.Examples.CSharp.v201705.AddCompleteCampaignsUsingBatchJob.NextId()

Here are the examples of the csharp api class Google.Api.Ads.AdWords.Examples.CSharp.v201705.AddCompleteCampaignsUsingBatchJob.NextId() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

1. Example

Project: googleads-dotnet-lib
Source File: AddCompleteCampaignsUsingBatchJob.cs
private static BudgetOperation BuildBudgetOperation() {
      Budget budget = new Budget() {
        budgetId = NextId(),
        name = "Interplanetary Cruise #" + ExampleUtilities.GetRandomString(),
        amount = new Money() {
          microAmount = 50000000L,
        },
        deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD,
      };

      BudgetOperation budgetOperation = new BudgetOperation() {
        operand = budget,
        @operator = Operator.ADD
      };
      return budgetOperation;
    }

2. Example

Project: googleads-dotnet-lib
Source File: AddCompleteCampaignsUsingBatchJob.cs
private static List<AdGroupOperation> BuildAdGroupOperations(long campaignId) {
      List<AdGroupOperation> operations = new List<AdGroupOperation>();
      for (int i = 0; i < NUMBER_OF_ADGROUPS_TO_ADD; i++) {
        AdGroup adGroup = new AdGroup() {
          campaignId = campaignId,
          id = NextId(),
          name = "Batch Ad Group # " + ExampleUtilities.GetRandomString(),
          biddingStrategyConfiguration = new BiddingStrategyConfiguration() {
            bids = new Bids[] {
                new CpcBid() {
                  bid = new Money() {
                    microAmount = 10000000L
                  }
                }
              }
          }
        };

        AdGroupOperation operation = new AdGroupOperation() {
          operand = adGroup,
          @operator = Operator.ADD
        };

        operations.Add(operation);
      }
      return operations;
    }

3. Example

Project: googleads-dotnet-lib
Source File: AddCompleteCampaignsUsingBatchJob.cs
private static List<CampaignOperation> BuildCampaignOperations(long budgetId) {
      List<CampaignOperation> operations = new List<CampaignOperation>();

      for (int i = 0; i < NUMBER_OF_CAMPAIGNS_TO_ADD; i++) {
        Campaign campaign = new Campaign() {
          name = "Batch Campaign " + ExampleUtilities.GetRandomString(),

          // Recommendation: Set the campaign to PAUSED when creating it to prevent
          // the ads from immediately serving. Set to ENABLED once you've added
          // targeting and the ads are ready to serve.
          status = CampaignStatus.PAUSED,
          id = NextId(),
          advertisingChannelType = AdvertisingChannelType.SEARCH,
          budget = new Budget() {
            budgetId = budgetId
          },
          biddingStrategyConfiguration = new BiddingStrategyConfiguration() {
            biddingStrategyType = BiddingStrategyType.MANUAL_CPC,

            // You can optionally provide a bidding scheme in place of the type.
            biddingScheme = new ManualCpcBiddingScheme() {
              enhancedCpcEnabled = false
            }
          }
        };

        CampaignOperation operation = new CampaignOperation() {
          operand = campaign,
          @operator = Operator.ADD
        };
        operations.Add(operation);
      }
      return operations;
    }