Creates the budget for the campaign.

@return the new budget.
495319
private static Long createBudget(AdWordsServicesInterface adWordsServices, AdWordsSession session)
      throws RemoteException, ApiException {
    // Get the BudgetService.
    BudgetServiceInterface budgetService =
        adWordsServices.get(session, BudgetServiceInterface.class);

    // Create the campaign budget.
    Budget budget = new Budget();
    budget.setName("Interplanetary Cruise App Budget #" + System.currentTimeMillis());
    Money budgetAmount = new Money();
    budgetAmount.setMicroAmount(50000000L);
    budget.setAmount(budgetAmount);
    budget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);

    // Universal app campaigns don't support shared budgets.
    budget.setIsExplicitlyShared(false);
    BudgetOperation budgetOperation = new BudgetOperation();
    budgetOperation.setOperand(budget);
    budgetOperation.setOperator(Operator.ADD);

    // Add the budget
    Budget addedBudget = budgetService.mutate(new BudgetOperation[] {budgetOperation}).getValue(0);
    System.out.printf(
        "Budget with name '%s' and ID %d was created.%n",
        addedBudget.getName(), addedBudget.getBudgetId());
    return addedBudget.getBudgetId();
  }
17361
public static <K, V> LinkedHashMultimap<K, V> create() {
    return new LinkedHashMultimap<K, V>(DEFAULT_KEY_CAPACITY, DEFAULT_VALUE_SET_CAPACITY);
  }
1276566
private static Campaign createCampaign(
      AdWordsServicesInterface adWordsServices,
      AdWordsSession session,
      Long budgetId,
      Long merchantId)
      throws RemoteException {
    // Get the CampaignService
    CampaignServiceInterface campaignService =
        adWordsServices.get(session, CampaignServiceInterface.class);

    // Create campaign.
    Campaign campaign = new Campaign();
    campaign.setName("Shopping campaign #" + System.currentTimeMillis());
    // The advertisingChannelType is what makes this a Shopping campaign
    campaign.setAdvertisingChannelType(AdvertisingChannelType.SHOPPING);

    // 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.
    campaign.setStatus(CampaignStatus.PAUSED);

    // Set shared budget (required).
    Budget budget = new Budget();
    budget.setBudgetId(budgetId);
    campaign.setBudget(budget);

    // Set bidding strategy (required).
    BiddingStrategyConfiguration biddingStrategyConfiguration = new BiddingStrategyConfiguration();
    biddingStrategyConfiguration.setBiddingStrategyType(BiddingStrategyType.MANUAL_CPC);
    campaign.setBiddingStrategyConfiguration(biddingStrategyConfiguration);

    // All Shopping campaigns need a ShoppingSetting.
    ShoppingSetting shoppingSetting = new ShoppingSetting();
    shoppingSetting.setSalesCountry("US");
    shoppingSetting.setCampaignPriority(0);
    shoppingSetting.setMerchantId(merchantId);

    // Set to 'true' to enable Local Inventory Ads in your campaign.
    shoppingSetting.setEnableLocal(true);

    campaign.setSettings(new Setting[] {shoppingSetting});

    // Create operation.
    CampaignOperation campaignOperation = new CampaignOperation();
    campaignOperation.setOperand(campaign);
    campaignOperation.setOperator(Operator.ADD);

    // Make the mutate request.
    CampaignReturnValue campaignAddResult =
        campaignService.mutate(new CampaignOperation[] {campaignOperation});

    return campaignAddResult.getValue(0);
  }
505355
public Counter build()
	{
		return new Counter(this.getName(), this.getDescription(), this.getNumShards(),
			this.getCounterStatus(), this.getCount(), this.getIndexes(), this.getCreationDateTime());
	}
587203
public Project.Layouts.Layout.Columns.Column createProjectLayoutsLayoutColumnsColumn()
   {
      return new Project.Layouts.Layout.Columns.Column();
   }
599304
public CmsPushButton createFavButton() {

        CmsPushButton favButton = new CmsPushButton();
        favButton.setImageClass(I_CmsButton.ButtonData.ADD_TO_FAVORITES.getSmallIconClass());
        favButton.setTitle(I_CmsButton.ButtonData.ADD_TO_FAVORITES.getTitle());
        favButton.setButtonStyle(I_CmsButton.ButtonStyle.FONT_ICON, null);
        add(favButton);
        favButton.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {

                CmsContainerpageController.get().getHandler().addToFavorites(getContentId().toString());
            }
        });
        return favButton;
    }
1209227
public DistributerMap createMap() {
    final DistributerMap map = new DistributerMap();
    map.setProject(getProject());
    this.maps.addElement(map);
    return map;
  }
1028524
public void setBudgetedAndActualAmountsList(java.util.Collection<BudgetedAndActualAmounts> budgetedAndActualAmountsList) {
        if (budgetedAndActualAmountsList == null) {
            this.budgetedAndActualAmountsList = null;
            return;
        }

        this.budgetedAndActualAmountsList = new java.util.ArrayList<BudgetedAndActualAmounts>(budgetedAndActualAmountsList);
    }
135655
public function create()
    {
        /**
         * @var Order $order
         */
        $classNamespace = $this->getEntityNamespace();
        $order = new $classNamespace();
        $order
            ->setQuantity(0)
            ->setWidth(0)
            ->setHeight(0)
            ->setWidth(0)
            ->setWeight(0)
            ->setCreatedAt($this->now())
            ->setPurchasableAmount($this->createZeroAmountMoney())
            ->setAmount($this->createZeroAmountMoney())
            ->setCouponAmount($this->createZeroAmountMoney())
            ->setShippingAmount($this->createZeroAmountMoney());

        $paymentStateLineStack = $this
            ->paymentMachineManager
            ->initialize(
                $order,
                StateLineStack::create(
                    new ArrayCollection(),
                    null
                ),
                'Order not paid'
            );

        $order->setPaymentStateLineStack($paymentStateLineStack);

        $shippingStateLineStack = $this
            ->shippingMachineManager
            ->initialize(
                $order,
                StateLineStack::create(
                    new ArrayCollection(),
                    null
                ),
                'Preparing Order'
            );

        $order->setShippingStateLineStack($shippingStateLineStack);

        return $order;
    }
50572
public static VatIdMapSharedConstants create() {
    if (vatIdMapConstants == null) { // NOPMD it's thread save!
      synchronized (VatIdMapConstants.class) {
        if (vatIdMapConstants == null) {
          vatIdMapConstants = GWT.create(VatIdMapConstants.class);
        }
      }
    }
    return vatIdMapConstants;
  }
166326
public static TinMapSharedConstants create() {
    if (tinMapConstants == null) { // NOPMD it's thread save!
      synchronized (TinMapConstants.class) {
        if (tinMapConstants == null) {
          tinMapConstants = GWT.create(TinMapConstants.class);
        }
      }
    }
    return tinMapConstants;
  }
270473
public FutureData<Balance> balance() {
        FutureData<Balance> future = new FutureData<Balance>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(BALANCE));
        Request request = config.http().GET(uri, new PageReader(newRequestCallback(future, new Balance(), config)));
        performRequest(future, request);
        return future;
    }
948285
public static JusFragment newInstance() {
		JusFragment fragment = new JusFragment();
		Bundle args = new Bundle();
		fragment.setArguments(args);
		return fragment;
	}
583821
public static BankAccountBicSharedConstants create() {
    if (bicMapConstants == null) { // NOPMD it's thread save!
      synchronized (BankAccountBicConstants.class) {
        if (bicMapConstants == null) {
          final BankAccountBicConstants bicMapConstantsTmp = new BankAccountBicConstants();

          final BankAccountBicATConstants bankAccountBicAtConstants =
              GWT.create(BankAccountBicATConstants.class);
          bicMapConstantsTmp.addBankAccounts("AT", bankAccountBicAtConstants.bankAccounts());

          final BankAccountBicDEConstants bankAccountBicDeConstants =
              GWT.create(BankAccountBicDEConstants.class);
          bicMapConstantsTmp.addBankAccounts("DE", bankAccountBicDeConstants.bankAccounts());

          bicMapConstants = bicMapConstantsTmp;
        }
      }
    }
    return bicMapConstants;
  }
1137463
public Request<T> build()
    {
        MultiMap headers = resolveHeaders();
        MultiMap parameters = resolveParameters();

        parameters.add("version",Integer.toString(version));

        Request<T> request = new Request<T>();
        request.setEntityName(entityName);
        request.setEntityType(objectType);
        request.setHeaders(headers);
        request.setParameters(parameters);

        return request;
    }
1161142
def _CreateBudget(client):
  
  budget_service = client.GetService('BudgetService', version='v201809')

  # Create the campaign budget
  operation = {
      'operand': {
          'name': 'Interplanetary Cruise Budget #%d' % uuid.uuid4(),
          'deliveryMethod': 'STANDARD',
          'amount': {
              'microAmount': 500000
          }
      },
      'operator': 'ADD'
  }

  budget = budget_service.mutate([operation])['value'][0]

  print 'Budget with ID "%d" and name "%s" was created.' % (
      budget['budgetId'], budget['name'])

  return budget
811099
public CampaignService getCampaignService() {
        if (_campaignService == null) {
            synchronized (CCApi2.class) {
                if (_campaignService == null) {
                    _campaignService = _retrofit.create(CampaignService.class);
                }
            }
        }

        return _campaignService;
    }