diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..5f530786f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +/.gitattributes export-ignore +/tests export-ignore \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..892519578 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +vendor +composer.lock \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..0443c0345 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0 + +* Initial release with support for V0_1 of Google Ads API. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..939e5341e --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows [Google's Open Source Community +Guidelines](https://opensource.google.com/conduct/). diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..724a88071 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..80d3d30d9 --- /dev/null +++ b/composer.json @@ -0,0 +1,48 @@ +{ + "name": "googleads/google-ads-php", + "version": "0.1.0", + "author": "Google LLC", + "url": "https://github.com/googleads/google-ads-php", + "description": "Google Ads API client for PHP", + "require": { + "google/gax": "^0.32.0", + "google/protobuf": "^3.4.0", + "php" : ">=5.5.9 || ^7.0", + "ext-grpc": "*", + "ulrichsg/getopt-php": "^3.0", + "react/http": "^0.8.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7", + "squizlabs/php_codesniffer": "^2.9 || ^3.2", + "ext-bcmath": "*" + }, + "suggest": { + "php-64bit": ">=5.5.9" + }, + "license": "Apache-2.0", + "autoload": { + "psr-4": { + "Google\\Ads\\GoogleAds\\": "src/Google/Ads/GoogleAds", + "GPBMetadata\\Google\\Ads\\GoogleAds\\": "metadata/Google/Ads/GoogleAds", + "Google\\Ads\\GoogleAds\\Examples\\": "examples" + } + }, + "autoload-dev": { + "psr-4": { + "Google\\": "src/Google/Ads/GoogleAds/Util/Testing/Google", + "GPBMetadata\\": "src/Google/Ads/GoogleAds/Util/Testing/metadata" + } + }, + "authors": [ + { + "name": "Google", + "homepage": "https://github.com/googleads/google-ads-php/contributors" + } + ], + "scripts": { + "test": [ + "phpunit tests" + ] + } +} diff --git a/examples/AccountManagement/GetAccountInformation.php b/examples/AccountManagement/GetAccountInformation.php new file mode 100644 index 000000000..838d8696b --- /dev/null +++ b/examples/AccountManagement/GetAccountInformation.php @@ -0,0 +1,116 @@ + GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $customerId) + { + // Issues a getCustomer() request and gets the result. + $customerServiceClient = $googleAdsClient->getCustomerServiceClient(); + $customer = $customerServiceClient->getCustomer(ResourceNames::forCustomer($customerId)); + + // Print information about the account. + printf( + "Customer with ID %d, descriptive name '%s', currency code '%s', timezone '%s', " + . "tracking URL template '%s' and auto tagging enabled '%s' was retrieved.%s", + $customer->getId()->getValue(), + $customer->getDescriptiveName()->getValue(), + $customer->getCurrencyCode()->getValue(), + $customer->getTimeZone()->getValue(), + $customer->getTrackingUrlTemplate()->getValue(), + $customer->getAutoTaggingEnabled()->getValue() ? 'true' : 'false', + PHP_EOL + ); + } +} + +GetAccountInformation::main(); diff --git a/examples/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.php b/examples/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.php new file mode 100644 index 000000000..3e2604680 --- /dev/null +++ b/examples/AdvancedOperations/AddExpandedTextAdWithUpgradedUrls.php @@ -0,0 +1,205 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID to add a keyword to + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId + ) { + // Creates the expanded text ad info. + $expandedTextAdInfo = new ExpandedTextAdInfo(); + + $wrappedHeadlinePart1 = new StringValue(); + $wrappedHeadlinePart1->setValue('Luxury Cruise to Mars'); + $expandedTextAdInfo->setHeadlinePart1($wrappedHeadlinePart1); + + $wrappedHeadlinePart2 = new StringValue(); + $wrappedHeadlinePart2->setValue('Visit the Red Planet in style.'); + $expandedTextAdInfo->setHeadlinePart2($wrappedHeadlinePart2); + + $wrappedDescription = new StringValue(); + $wrappedDescription->setValue('Low-gravity fun for everyone!'); + $expandedTextAdInfo->setDescription($wrappedDescription); + + // Sets the expanded text ad info on an Ad. + $ad = new Ad(); + $ad->setExpandedTextAd($expandedTextAdInfo); + + // Specifies a list of final URLs. This field cannot be set if URL field is set. This may + // be specified at ad and criterion levels. + $wrappedFinalUrl1 = new StringValue(); + $wrappedFinalUrl1->setValue('http://www.example.com/cruise/space/'); + $wrappedFinalUrl2 = new StringValue(); + $wrappedFinalUrl2->setValue('http://www.example.com/locations/mars/'); + $ad->setFinalUrls([$wrappedFinalUrl1, $wrappedFinalUrl2]); + + // Specifies a list of final mobile URLs. This field cannot be set if URL field is set, or + // finalUrls is unset. This may be specified at ad and criterion levels. + /* + $wrappedFinalMobileUrl1 = new StringValue(); + $wrappedFinalMobileUrl1->setValue('http://mobile.example.com/cruise/space/'); + $wrappedFinalMobileUrl2 = new StringValue(); + $wrappedFinalMobileUrl2->setValue('http://mobile.example.com/locations/mars/'); + $ad->setFinalMobileUrls([$wrappedFinalMobileUrl1, $wrappedFinalMobileUrl2]); + */ + + // Specifies a tracking URL for 3rd party tracking provider. You may specify one at + // customer, campaign, ad group, ad or criterion levels. + $wrappedTrackingUrlTemplate = new StringValue(); + $wrappedTrackingUrlTemplate->setValue( + 'http://tracker.example.com/?season={_season}&promocode={_promocode}&u={lpurl}' + ); + $ad->setTrackingUrlTemplate($wrappedTrackingUrlTemplate); + + // Since your tracking URL has two custom parameters, provide their values too. This can + // be provided at campaign, ad group, ad or criterion levels. + $wrappedCustomParamKey1 = new StringValue(); + $wrappedCustomParamKey1->setValue('season'); + $wrappedCustomParamValue1 = new StringValue(); + $wrappedCustomParamValue1->setValue('christmas'); + $customParam1 = new CustomParameter(); + $customParam1->setKey($wrappedCustomParamKey1); + $customParam1->setValue($wrappedCustomParamValue1); + + $wrappedCustomParamKey2 = new StringValue(); + $wrappedCustomParamKey2->setValue('promocode'); + $wrappedCustomParamValue2 = new StringValue(); + $wrappedCustomParamValue2->setValue('NY123'); + $customParam2 = new CustomParameter(); + $customParam2->setKey($wrappedCustomParamKey2); + $customParam2->setValue($wrappedCustomParamValue2); + + $ad->setUrlCustomParameters([$customParam1, $customParam2]); + + // Creates an ad group ad to hold the above ad. + $adGroupAd = new AdGroupAd(); + + $adGroupResourceName = AdGroupServiceClient::adGroupName($customerId, $adGroupId); + $wrappedAdGroupResourceName = new StringValue(); + $wrappedAdGroupResourceName->setValue($adGroupResourceName); + $adGroupAd->setAdGroup($wrappedAdGroupResourceName); + + $adGroupAd->setStatus(AdGroupAdStatusEnum_AdGroupAdStatus::PAUSED); + $adGroupAd->setAd($ad); + + // Creates an ad group ad operation and add it to the operations array. + $adGroupAdOperation = new AdGroupAdOperation(); + $adGroupAdOperation->setCreate($adGroupAd); + + // Issues a mutate request to add the ad group ads. + $adGroupAdServiceClient = $googleAdsClient->getAdGroupAdServiceClient(); + $response = $adGroupAdServiceClient->mutateAdGroupAds($customerId, [$adGroupAdOperation]); + + foreach ($response->getResults() as $addedAdGroupAd) { + /** @var AdGroupAd $addedAdGroupAd */ + printf( + "Added an expanded text ad with resource name: '%s'%s", + $addedAdGroupAd->getResourceName(), + PHP_EOL + ); + } + } +} + +AddExpandedTextAdWithUpgradedUrls::main(); diff --git a/examples/AdvancedOperations/UsePortfolioBiddingStrategy.php b/examples/AdvancedOperations/UsePortfolioBiddingStrategy.php new file mode 100644 index 000000000..894a9ce0b --- /dev/null +++ b/examples/AdvancedOperations/UsePortfolioBiddingStrategy.php @@ -0,0 +1,295 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CAMPAIGN_BUDGET_ID => GetOpt::OPTIONAL_ARGUMENT + ] + ); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::CAMPAIGN_BUDGET_ID] ?: self::CAMPAIGN_BUDGET_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $campaignBudgetId the campaign budget ID + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $campaignBudgetId + ) { + $biddingStrategyResourceName = self::createBiddingStrategy($googleAdsClient, $customerId); + if (is_null($campaignBudgetId)) { + $campaignBudgetResourceName = + self::createSharedCampaignBudget($googleAdsClient, $customerId); + } else { + $campaignBudgetResourceName = + ResourceNames::forCampaignBudget($customerId, $campaignBudgetId); + } + self::createCampaignWithBiddingStrategy( + $googleAdsClient, + $customerId, + $biddingStrategyResourceName, + $campaignBudgetResourceName + ); + } + + /** + * Creates the portfolio bidding strategy. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @return string the resource name of created bidding strategy + */ + private static function createBiddingStrategy(GoogleAdsClient $googleAdsClient, $customerId) + { + // Creates a portfolio bidding strategy. + $targetSpend = new TargetSpend(); + $wrappedCpcBidCeilingMicros = new Int64Value(); + $wrappedCpcBidCeilingMicros->setValue(2000000); + $targetSpend->setCpcBidCeilingMicros($wrappedCpcBidCeilingMicros); + $wrappedTargetSpendMicros = new Int64Value(); + $wrappedTargetSpendMicros->setValue(20000000); + $targetSpend->setTargetSpendMicros($wrappedTargetSpendMicros); + + $portfolioBiddingStrategy = new BiddingStrategy(); + $wrappedName = new StringValue(); + $wrappedName->setValue('Maximize Clicks #' . uniqid()); + $portfolioBiddingStrategy->setName($wrappedName); + $portfolioBiddingStrategy->setTargetSpend($targetSpend); + + // Constructs an operation that will create a portfolio bidding strategy. + $biddingStrategyOperation = new BiddingStrategyOperation(); + $biddingStrategyOperation->setCreate($portfolioBiddingStrategy); + + // Issues a mutate request to create the bidding strategy. + $biddingStrategyServiceClient = $googleAdsClient->getBiddingStrategyServiceClient(); + $response = $biddingStrategyServiceClient->mutateBiddingStrategies( + $customerId, + [$biddingStrategyOperation] + ); + /** @var BiddingStrategy $addedBiddingStrategy */ + $addedBiddingStrategy = $response->getResults()[0]; + + // Prints out the resource name of the created bidding strategy. + printf( + "Created portfolio bidding strategy with resource name: '%s'.%s", + $addedBiddingStrategy->getResourceName(), + PHP_EOL + ); + + return $addedBiddingStrategy->getResourceName(); + } + + /** + * Creates an explicitly shared budget to be used to create the campaign. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @return string the resource name of created shared budget + */ + private static function createSharedCampaignBudget( + GoogleAdsClient $googleAdsClient, + $customerId + ) { + // Creates a shared budget. + $budget = new CampaignBudget(); + $wrappedName = new StringValue(); + $wrappedName->setValue('Shared Interplanetary Budget #' . uniqid()); + $budget->setName($wrappedName); + $budget->setDeliveryMethod(BudgetDeliveryMethodEnum_BudgetDeliveryMethod::STANDARD); + + // Sets the amount of budget. + $wrappedAmountMicros = new Int64Value(); + $wrappedAmountMicros->setValue(50000000); + $budget->setAmountMicros($wrappedAmountMicros); + + // Makes the budget explicitly shared. + $wrappedExplicitlyShared = new BoolValue(); + $wrappedExplicitlyShared->setValue(true); + $budget->setExplicitlyShared($wrappedExplicitlyShared); + + // Constructs a campaign budget operation. + $campaignBudgetOperation = new CampaignBudgetOperation(); + $campaignBudgetOperation->setCreate($budget); + + // Issues a mutate request to create the budget. + $campaignBudgetServiceClient = $googleAdsClient->getCampaignBudgetServiceClient(); + $response = $campaignBudgetServiceClient->mutateCampaignBudgets( + $customerId, + [$campaignBudgetOperation] + ); + + /** @var CampaignBudget $addedBudget */ + $addedBudget = $response->getResults()[0]; + printf( + "Created a shared budget with resource name '%s'.%s", + $addedBudget->getResourceName(), + PHP_EOL + ); + + return $addedBudget->getResourceName(); + } + + /** + * Creates a campaign with the created portfolio bidding strategy. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param string $biddingStrategyResourceName the bidding strategy resource name to use + * @param string $campaignBudgetResourceName the shared budget resource name to use + */ + private static function createCampaignWithBiddingStrategy( + GoogleAdsClient $googleAdsClient, + $customerId, + $biddingStrategyResourceName, + $campaignBudgetResourceName + ) { + // Creates a Search campaign. + $campaign = new Campaign(); + $wrappedName = new StringValue(); + $wrappedName->setValue('Interplanetary Cruise #' . uniqid()); + $campaign->setName($wrappedName); + $campaign->setAdvertisingChannelType( + AdvertisingChannelTypeEnum_AdvertisingChannelType::SEARCH + ); + // 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(CampaignStatusEnum_CampaignStatus::PAUSED); + + // Configures the campaign network options. + $wrappedTrueValue = new BoolValue(); + $wrappedTrueValue->setValue(true); + $networkSettings = new Campaign_NetworkSettings(); + $networkSettings->setTargetGoogleSearch($wrappedTrueValue); + $networkSettings->setTargetSearchNetwork($wrappedTrueValue); + $networkSettings->setTargetContentNetwork($wrappedTrueValue); + $campaign->setNetworkSettings($networkSettings); + + // Sets the bidding strategy and budget. + $wrappedBiddingStrategyResourceName = new StringValue(); + $wrappedBiddingStrategyResourceName->setValue($biddingStrategyResourceName); + $campaign->setBiddingStrategy($wrappedBiddingStrategyResourceName); + $wrappedCampaignBudgetResourceName = new StringValue(); + $wrappedCampaignBudgetResourceName->setValue($campaignBudgetResourceName); + $campaign->setCampaignBudget($wrappedCampaignBudgetResourceName); + + // Constructs a campaign operation. + $campaignOperation = new CampaignOperation(); + $campaignOperation->setCreate($campaign); + + // Issues a mutate request to add the campaign. + $campaignServiceClient = $googleAdsClient->getCampaignServiceClient(); + $response = $campaignServiceClient->mutateCampaigns($customerId, [$campaignOperation]); + + /** @var Campaign $addedCampaign */ + $addedCampaign = $response->getResults()[0]; + printf( + "Created a campaign with resource name: '%s'.%s", + $addedCampaign->getResourceName(), + PHP_EOL + ); + } +} + +UsePortfolioBiddingStrategy::main(); diff --git a/examples/Authentication/AuthenticateInStandaloneApplication.php b/examples/Authentication/AuthenticateInStandaloneApplication.php new file mode 100644 index 000000000..ebf9a8205 --- /dev/null +++ b/examples/Authentication/AuthenticateInStandaloneApplication.php @@ -0,0 +1,103 @@ +This example is meant to be run from the command line and requires user + * input. + */ +class AuthenticateInStandaloneApplication +{ + + /** + * @var string the OAuth2 scope for the AdWords API + * @see https://developers.google.com/google-ads/api/docs/oauth/internals#scope + */ + const SCOPE = 'https://www.googleapis.com/auth/adwords'; + + /** + * @var string the Google OAuth2 authorization URI for OAuth2 requests + * @see https://developers.google.com/identity/protocols/OAuth2InstalledApp#step-2-send-a-request-to-googles-oauth-20-server + */ + const AUTHORIZATION_URI = 'https://accounts.google.com/o/oauth2/v2/auth'; + + /** + * @var string the redirect URI for OAuth2 installed application flows + * @see https://developers.google.com/identity/protocols/OAuth2InstalledApp#request-parameter-redirect_uri + */ + const REDIRECT_URI = 'urn:ietf:wg:oauth:2.0:oob'; + + public static function main() + { + $stdin = fopen('php://stdin', 'r'); + + print 'Enter your OAuth2 client ID here: '; + $clientId = trim(fgets($stdin)); + + print 'Enter your OAuth2 client secret here: '; + $clientSecret = trim(fgets($stdin)); + + print '[OPTIONAL] enter any additional OAuth2 scopes as a space ' + . 'delimited string here (the AdWords scope is already included): '; + + $scopes = self::SCOPE . ' ' . trim(fgets($stdin)); + + $oauth2 = new OAuth2( + [ + 'authorizationUri' => self::AUTHORIZATION_URI, + 'redirectUri' => self::REDIRECT_URI, + 'tokenCredentialUri' => CredentialsLoader::TOKEN_CREDENTIAL_URI, + 'clientId' => $clientId, + 'clientSecret' => $clientSecret, + 'scope' => $scopes + ] + ); + + printf( + 'Log into the Google account you use for AdWords and visit the following URL:' + . '%1$s%2$s%1$s%1$s', + PHP_EOL, + $oauth2->buildFullAuthorizationUri() + ); + print 'After approving the application, enter the authorization code here: '; + $code = trim(fgets($stdin)); + fclose($stdin); + print PHP_EOL; + + $oauth2->setCode($code); + $authToken = $oauth2->fetchAuthToken(); + + print "Your refresh token is: {$authToken['refresh_token']}" . PHP_EOL . PHP_EOL; + print "Copy the following lines to your 'google_ads_php.ini' file:" . PHP_EOL; + print "clientId = '$clientId'" . PHP_EOL; + print "clientSecret = '$clientSecret'" . PHP_EOL; + print "refreshToken = '{$authToken['refresh_token']}'" . PHP_EOL; + } +} + +AuthenticateInStandaloneApplication::main(); diff --git a/examples/Authentication/AuthenticateInWebApplication.php b/examples/Authentication/AuthenticateInWebApplication.php new file mode 100644 index 000000000..bbd6297de --- /dev/null +++ b/examples/Authentication/AuthenticateInWebApplication.php @@ -0,0 +1,156 @@ +This example will start a basic server that listens for requests at `http://localhost:PORT`, + * where `PORT` is dynamically assigned. + * + *

IMPORTANT: You must add `http://localhost/oauth2callback` to the "Authorize redirect + * URIs" list in your Google Cloud Console project before running this example. + */ +class AuthenticateInWebApplication +{ + + /** + * @var string the OAuth2 scope for the AdWords API + * @see https://developers.google.com/google-ads/api/docs/oauth/internals#scope + */ + const SCOPE = 'https://www.googleapis.com/auth/adwords'; + + /** + * @var string the Google OAuth2 authorization URI for OAuth2 requests + * @see https://developers.google.com/identity/protocols/OAuth2InstalledApp#step-2-send-a-request-to-googles-oauth-20-server + */ + const AUTHORIZATION_URI = 'https://accounts.google.com/o/oauth2/v2/auth'; + + /** + * @var string the OAuth2 call back URL path. + */ + const OAUTH2_CALLBACK_PATH = '/oauth2callback'; + + public static function main() + { + $loop = Factory::create(); + // Creates a socket for localhost with random port. + $socket = new \React\Socket\Server(0, $loop); + + print 'Enter your OAuth2 client ID here: '; + $clientId = trim(fgets(STDIN)); + + print 'Enter your OAuth2 client secret here: '; + $clientSecret = trim(fgets(STDIN)); + + $redirectUrl = str_replace('tcp:', 'http:', $socket->getAddress()); + $oauth2 = new OAuth2( + [ + 'clientId' => $clientId, + 'clientSecret' => $clientSecret, + 'authorizationUri' => self::AUTHORIZATION_URI, + 'redirectUri' => $redirectUrl . self::OAUTH2_CALLBACK_PATH, + 'tokenCredentialUri' => CredentialsLoader::TOKEN_CREDENTIAL_URI, + 'scope' => self::SCOPE, + // Create a 'state' token to prevent request forgery. See + // https://developers.google.com/identity/protocols/OpenIDConnect#createxsrftoken + // for details. + 'state' => sha1(openssl_random_pseudo_bytes(1024)) + ] + ); + + $authToken = null; + + $server = new Server( + function (ServerRequestInterface $request) use ($oauth2, $loop, &$authToken) { + // Stops the server after tokens are retrieved. + if (!is_null($authToken)) { + $loop->stop(); + } + + // Check if the requested path is the one set as the redirect URI. + if ($request->getUri()->getPath() + !== parse_url($oauth2->getRedirectUri(), PHP_URL_PATH)) { + return new Response( + 404, + ['Content-Type' => 'text/plain'], + 'Page not found' + ); + } + + // Exit if the state is invalid to prevent request forgery. + $state = $request->getQueryParams()['state']; + if (empty($state) || ($state !== $oauth2->getState())) { + throw new UnexpectedValueException( + "The state is empty or doesn't match expected one." . PHP_EOL + ); + }; + + // Set the authorization code and fetch refresh and access tokens. + $code = $request->getQueryParams()['code']; + $oauth2->setCode($code); + $authToken = $oauth2->fetchAuthToken(); + + $refreshToken = $authToken['refresh_token']; + print 'Your refresh token is: ' . $refreshToken . PHP_EOL; + + $propertiesToCopy = '[GOOGLE_ADS]' . PHP_EOL; + $propertiesToCopy .= 'developerToken = "INSERT_DEVELOPER_TOKEN_HERE"' . PHP_EOL; + $propertiesToCopy .= '[OAUTH2]' . PHP_EOL; + $propertiesToCopy .= "clientId = \"{$oauth2->getClientId()}\"" . PHP_EOL; + $propertiesToCopy .= "clientSecret = \"{$oauth2->getClientSecret()}\"" . PHP_EOL; + $propertiesToCopy .= "refreshToken = \"$refreshToken\"" . PHP_EOL; + + print 'Copy the text below into a file named "google_ads_php.ini" in your home ' + . 'directory, and replace "INSERT_DEVELOPER_TOKEN_HERE" with your developer ' + . 'token:' . PHP_EOL; + print PHP_EOL . $propertiesToCopy; + + return new Response( + 200, + ['Content-Type' => 'text/plain'], + 'Your refresh token has been fetched. Check the console output for ' + . 'further instructions.' + ); + } + ); + + $server->listen($socket); + printf( + 'Log into the Google account you use for AdWords and visit the following URL ' + . 'in your web browser: %1$s%2$s%1$s%1$s', + PHP_EOL, + $oauth2->buildFullAuthorizationUri(['access_type' => 'offline']) + ); + + $loop->run(); + } +} + +AuthenticateInWebApplication::main(); diff --git a/examples/Authentication/google_ads_php.ini b/examples/Authentication/google_ads_php.ini new file mode 100644 index 000000000..75d480a74 --- /dev/null +++ b/examples/Authentication/google_ads_php.ini @@ -0,0 +1,16 @@ +[GOOGLE_ADS] +; Required some config parameters, which can be found at: +; https://developers.google.com/google-ads/api/docs/first-call/overview#config +developerToken = "INSERT_DEVELOPER_TOKEN_HERE" + +; Optional additional settings. +; endpoint = "https://adwords.google.com/" + +[OAUTH2] +; Required OAuth2 credentials. Uncomment and fill in the values for the +; appropriate flow based on your use case. + +; For installed application flow. +clientId = "INSERT_OAUTH2_CLIENT_ID_HERE" +clientSecret = "INSERT_OAUTH2_CLIENT_SECRET_HERE" +refreshToken = "INSERT_OAUTH2_REFRESH_TOKEN_HERE" \ No newline at end of file diff --git a/examples/BasicOperations/AddAdGroups.php b/examples/BasicOperations/AddAdGroups.php new file mode 100644 index 000000000..cde1681fe --- /dev/null +++ b/examples/BasicOperations/AddAdGroups.php @@ -0,0 +1,161 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CAMPAIGN_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::CAMPAIGN_ID] ?: self::CAMPAIGN_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $campaignId the campaign ID to add ad groups to + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $campaignId + ) { + $wrappedCampaignResourceName = new StringValue(); + $wrappedCampaignResourceName->setValue( + ResourceNames::forCampaign($customerId, $campaignId) + ); + + $operations = []; + + // Constructs an ad group and sets an optional CPC value. + $adGroup1 = new AdGroup(); + $wrappedName1 = new StringValue(); + $wrappedName1->setValue('Earth to Mars Cruises #' . uniqid()); + $adGroup1->setName($wrappedName1); + $adGroup1->setCampaign($wrappedCampaignResourceName); + $adGroup1->setStatus(AdGroupStatusEnum_AdGroupStatus::ENABLED); + $adGroup1->setType(AdGroupTypeEnum_AdGroupType::SEARCH_STANDARD); + $wrappedCpcBidMicros1 = new Int64Value(); + $wrappedCpcBidMicros1->setValue(10000000); + $adGroup1->setCpcBidMicros($wrappedCpcBidMicros1); + + $adGroupOperation1 = new AdGroupOperation(); + $adGroupOperation1->setCreate($adGroup1); + $operations[] = $adGroupOperation1; + + // Constructs another ad group. + $adGroup2 = new AdGroup(); + $wrappedName2 = new StringValue(); + $wrappedName2->setValue('Earth to Venus Cruises #' . uniqid()); + $adGroup2->setName($wrappedName2); + $adGroup2->setCampaign($wrappedCampaignResourceName); + $adGroup2->setStatus(AdGroupStatusEnum_AdGroupStatus::ENABLED); + $adGroup2->setType(AdGroupTypeEnum_AdGroupType::SEARCH_STANDARD); + $wrappedCpcBidMicros2 = new Int64Value(); + $wrappedCpcBidMicros2->setValue(20000000); + $adGroup2->setCpcBidMicros($wrappedCpcBidMicros2); + + $adGroupOperation2 = new AdGroupOperation(); + $adGroupOperation2->setCreate($adGroup2); + $operations[] = $adGroupOperation2; + + // Issues a mutate request to add the ad groups. + $adGroupServiceClient = $googleAdsClient->getAdGroupServiceClient(); + $response = $adGroupServiceClient->mutateAdGroups( + $customerId, + $operations + ); + + printf("Added %d ad groups:%s", $response->getResults()->count(), PHP_EOL); + + foreach ($response->getResults() as $addedAdGroup) { + /** @var AdGroup $addedAdGroup */ + print $addedAdGroup->getResourceName() . PHP_EOL; + } + } +} + +AddAdGroups::main(); diff --git a/examples/BasicOperations/AddCampaigns.php b/examples/BasicOperations/AddCampaigns.php new file mode 100644 index 000000000..935a7c831 --- /dev/null +++ b/examples/BasicOperations/AddCampaigns.php @@ -0,0 +1,213 @@ + GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder()) + ->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $customerId) + { + // Creates a single shared budget to be used by the campaigns added below. + $budgetResourceName = self::addCampaignBudget($googleAdsClient, $customerId); + $wrappedBudgetResourceName = new StringValue(); + $wrappedBudgetResourceName->setValue($budgetResourceName); + + $wrappedTrueValue = new BoolValue(); + $wrappedTrueValue->setValue(true); + $wrappedFalseValue = new BoolValue(); + $wrappedFalseValue->setValue(false); + + $wrappedStartDate = new StringValue(); + $wrappedStartDate->setValue(date('Ymd', strtotime('+1 day'))); + $wrappedEndDate = new StringValue(); + $wrappedEndDate->setValue(date('Ymd', strtotime('+1 month'))); + + $campaignOperations = []; + for ($i = 0; $i < self::NUMBER_OF_CAMPAIGNS_TO_ADD; $i++) { + // Configures the campaign network options. + $networkSettings = new Campaign_NetworkSettings(); + $networkSettings->setTargetGoogleSearch($wrappedTrueValue); + $networkSettings->setTargetSearchNetwork($wrappedTrueValue); + $networkSettings->setTargetContentNetwork($wrappedFalseValue); + $networkSettings->setTargetPartnerSearchNetwork($wrappedFalseValue); + + // Creates a campaign. + $campaign = new Campaign(); + + $wrappedName = new StringValue(); + $wrappedName->setValue('Interplanetary Cruise #' . uniqid()); + $campaign->setName($wrappedName); + + $campaign->setAdvertisingChannelType( + AdvertisingChannelTypeEnum_AdvertisingChannelType::SEARCH + ); + // 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(CampaignStatusEnum_CampaignStatus::PAUSED); + // Sets the bidding strategy and budget. + $campaign->setManualCpc(new ManualCpc()); + $campaign->setCampaignBudget($wrappedBudgetResourceName); + // Adds the network settings configured above. + $campaign->setNetworkSettings($networkSettings); + + // Optional: Sets the start and end dates. + $campaign->setStartDate($wrappedStartDate); + $campaign->setEndDate($wrappedEndDate); + + // Creates a campaign operation. + $campaignOperation = new CampaignOperation(); + $campaignOperation->setCreate($campaign); + $campaignOperations[] = $campaignOperation; + } + + // Issues a mutate request to add campaigns. + $campaignServiceClient = $googleAdsClient->getCampaignServiceClient(); + $response = $campaignServiceClient->mutateCampaigns($customerId, $campaignOperations); + + printf("Added %d campaigns:%s", $response->getResults()->count(), PHP_EOL); + + foreach ($response->getResults() as $addedCampaign) { + /** @var Campaign $addedCampaign */ + print "{$addedCampaign->getResourceName()}" . PHP_EOL; + } + } + + /** + * Creates a new campaign budget in the specified client account. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID + * @return string the resource name of the newly created budget + */ + private static function addCampaignBudget(GoogleAdsClient $googleAdsClient, $customerId) + { + // Creates a campaign budget. + $budget = new CampaignBudget(); + + $wrappedName = new StringValue(); + $wrappedName->setValue('Interplanetary Cruise Budget #' . uniqid()); + $budget->setName($wrappedName); + + $budget->setDeliveryMethod(BudgetDeliveryMethodEnum_BudgetDeliveryMethod::STANDARD); + + $wrappedAmountMicros = new Int64Value(); + $wrappedAmountMicros->setValue(500000); + $budget->setAmountMicros($wrappedAmountMicros); + + // Creates a campaign budget operation. + $campaignBudgetOperation = new CampaignBudgetOperation(); + $campaignBudgetOperation->setCreate($budget); + + // Issues a mutate request. + $campaignBudgetServiceClient = $googleAdsClient->getCampaignBudgetServiceClient(); + $response = $campaignBudgetServiceClient->mutateCampaignBudgets( + $customerId, + [$campaignBudgetOperation] + ); + + /** @var CampaignBudget $addedBudget */ + $addedBudget = $response->getResults()[0]; + printf("Added budget named '%s'%s", $addedBudget->getResourceName(), PHP_EOL); + + return $addedBudget->getResourceName(); + } +} + +AddCampaigns::main(); diff --git a/examples/BasicOperations/AddExpandedTextAds.php b/examples/BasicOperations/AddExpandedTextAds.php new file mode 100644 index 000000000..14478fae9 --- /dev/null +++ b/examples/BasicOperations/AddExpandedTextAds.php @@ -0,0 +1,162 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID to add a keyword to + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId + ) { + $wrappedAdGroupResourceName = new StringValue(); + $wrappedAdGroupResourceName->setValue(ResourceNames::forAdGroup($customerId, $adGroupId)); + + $operations = []; + for ($i = 0; $i < self::NUMBER_OF_ADS_TO_ADD; $i++) { + // Creates the expanded text ad info. + $expandedTextAdInfo = new ExpandedTextAdInfo(); + + $wrappedHeadlinePart1 = new StringValue(); + $wrappedHeadlinePart1->setValue('Cruise to Mars #' . uniqid()); + $expandedTextAdInfo->setHeadlinePart1($wrappedHeadlinePart1); + + $wrappedHeadlinePart2 = new StringValue(); + $wrappedHeadlinePart2->setValue('Best Space Cruise Line'); + $expandedTextAdInfo->setHeadlinePart2($wrappedHeadlinePart2); + + $wrappedDescription = new StringValue(); + $wrappedDescription->setValue('Buy your tickets now!'); + $expandedTextAdInfo->setDescription($wrappedDescription); + + // Sets the expanded text ad info on an Ad. + $ad = new Ad(); + $ad->setExpandedTextAd($expandedTextAdInfo); + $wrappedFinalUrl = new StringValue(); + $wrappedFinalUrl->setValue('http://www.example.com'); + $ad->setFinalUrls([$wrappedFinalUrl]); + + // Creates an ad group ad to hold the above ad. + $adGroupAd = new AdGroupAd(); + $adGroupAd->setAdGroup($wrappedAdGroupResourceName); + $adGroupAd->setStatus(AdGroupAdStatusEnum_AdGroupAdStatus::PAUSED); + $adGroupAd->setAd($ad); + + // Creates an ad group ad operation and add it to the operations array. + $adGroupAdOperation = new AdGroupAdOperation(); + $adGroupAdOperation->setCreate($adGroupAd); + $operations[] = $adGroupAdOperation; + } + + // Issues a mutate request to add the ad group ads. + $adGroupAdServiceClient = $googleAdsClient->getAdGroupAdServiceClient(); + $response = $adGroupAdServiceClient->mutateAdGroupAds($customerId, $operations); + + foreach ($response->getResults() as $addedAdGroupAd) { + /** @var AdGroupAd $addedAdGroupAd */ + printf( + "Expanded text ad was created with resource name: '%s'%s", + $addedAdGroupAd->getResourceName(), + PHP_EOL + ); + } + } +} + +AddExpandedTextAds::main(); diff --git a/examples/BasicOperations/AddKeywords.php b/examples/BasicOperations/AddKeywords.php new file mode 100644 index 000000000..e7ea7b60a --- /dev/null +++ b/examples/BasicOperations/AddKeywords.php @@ -0,0 +1,148 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::KEYWORD_TEXT => GetOpt::OPTIONAL_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID, + $options[ArgumentNames::KEYWORD_TEXT] ?: self::KEYWORD_TEXT + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID to add a keyword to + * @param string $keywordText the keyword text to add + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId, + $keywordText + ) { + $wrappedKeywordText = new StringValue(); + $wrappedKeywordText->setValue($keywordText); + + // Configures the keyword text and match type settings. + $keywordInfo = new KeywordInfo(); + $keywordInfo->setText($wrappedKeywordText); + $keywordInfo->setMatchType(KeywordMatchTypeEnum_KeywordMatchType::EXACT); + + $wrappedAdGroupResourceName = new StringValue(); + $wrappedAdGroupResourceName->setValue(ResourceNames::forAdGroup($customerId, $adGroupId)); + + // Constructs an ad group criterion using the keyword text info above. + $adGroupCriterion = new AdGroupCriterion(); + $adGroupCriterion->setAdGroup($wrappedAdGroupResourceName); + $adGroupCriterion->setStatus(AdGroupCriterionStatusEnum_AdGroupCriterionStatus::ENABLED); + $adGroupCriterion->setKeyword($keywordInfo); + + $adGroupCriterionOperation = new AdGroupCriterionOperation(); + $adGroupCriterionOperation->setCreate($adGroupCriterion); + + // Issues a mutate request to add the ad group criterion. + $adGroupCriterionServiceClient = $googleAdsClient->getAdGroupCriterionServiceClient(); + $response = $adGroupCriterionServiceClient->mutateAdGroupCriteria( + $customerId, + [$adGroupCriterionOperation] + ); + + printf("Added %d ad group criteria:%s", $response->getResults()->count(), PHP_EOL); + + foreach ($response->getResults() as $addedAdGroupCriterion) { + /** @var AdGroupCriterion $addedAdGroupCriterion */ + print $addedAdGroupCriterion->getResourceName() . PHP_EOL; + } + } +} + +AddKeywords::main(); diff --git a/examples/BasicOperations/GetAdGroups.php b/examples/BasicOperations/GetAdGroups.php new file mode 100644 index 000000000..bcc377b82 --- /dev/null +++ b/examples/BasicOperations/GetAdGroups.php @@ -0,0 +1,127 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CAMPAIGN_ID => GetOpt::OPTIONAL_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::CAMPAIGN_ID] ?: self::CAMPAIGN_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $campaignId the campaign ID for which ad groups will be retrieved. If `null`, + * returns from all campaigns + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $customerId, $campaignId) + { + $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient(); + // Creates a query that retrieves all ad groups. + $query = 'SELECT campaign.id, ad_group.id, ad_group.name FROM ad_group'; + if ($campaignId !== null) { + $query .= " WHERE campaign.id = $campaignId"; + } + + // Issues a search request by specifying page size. + $response = + $googleAdsServiceClient->search($customerId, $query, ['pageSize' => self::PAGE_SIZE]); + + // Iterates over all rows in all pages and prints the requested field values for + // the ad group in each row. + foreach ($response->iterateAllElements() as $googleAdsRow) { + /** @var GoogleAdsRow $googleAdsRow */ + printf( + "Ad group with ID %d and name '%s' was found in campaign with ID %d.%s", + $googleAdsRow->getAdGroup()->getId()->getValue(), + $googleAdsRow->getAdGroup()->getName()->getValue(), + $googleAdsRow->getCampaign()->getId()->getValue(), + PHP_EOL + ); + } + } +} + +GetAdGroups::main(); diff --git a/examples/BasicOperations/GetArtifactMetadata.php b/examples/BasicOperations/GetArtifactMetadata.php new file mode 100644 index 000000000..af7d900fa --- /dev/null +++ b/examples/BasicOperations/GetArtifactMetadata.php @@ -0,0 +1,151 @@ + GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::ARTIFACT_NAME] ?: self::ARTIFACT_NAME + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $artifactName the name of artifact to get its metadata + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $artifactName) + { + $googleAdsFieldServiceClient = $googleAdsClient->getGoogleAdsFieldServiceClient(); + // Searches for an artifact whose name is the same as the specified artifactName. + $query = 'SELECT name, category, selectable, filterable, sortable, selectable_with, ' + . 'data_type, is_repeated WHERE name = ' . $artifactName; + $response = $googleAdsFieldServiceClient->searchGoogleAdsFields($query); + + // Iterates over all rows and prints our the metadata of the returned artifacts + foreach ($response->iterateAllElements() as $googleAdsField) { + /** @var GoogleAdsField $googleAdsField */ + // Note that the category and data type printed below are enum values. + // For example, a value of 2 will be returned when the category is 'RESOURCE'. + // A mapping of enum names to values can be found at + // GoogleAdsFieldCategoryEnum_GoogleAdsFieldCategory.php for the category and + // GoogleAdsFieldDataTypeEnum_GoogleAdsFieldDataType.php for the data type. + printf( + "An artifact named '%s' with category %d and data type %d %s selectable, %s " + . "filterable, %s sortable and %s repeated.%s", + $googleAdsField->getName()->getValue(), + $googleAdsField->getCategory(), + $googleAdsField->getDataType(), + self::getIsOrIsNot($googleAdsField->getSelectable()), + self::getIsOrIsNot($googleAdsField->getFilterable()), + self::getIsOrIsNot($googleAdsField->getSortable()), + self::getIsOrIsNot($googleAdsField->getIsRepeated()), + PHP_EOL + ); + if ($googleAdsField->getSelectableWith()->count() > 0) { + $selectableArtifacts = []; + foreach ($googleAdsField->getSelectableWith() as $wrappedSelectableArtifact) { + /** @var StringValue $wrappedSelectableArtifact */ + $selectableArtifacts[] = $wrappedSelectableArtifact->getValue(); + } + printf( + '%1$sThe artifact can be selected with the following artifacts:%1$s', + PHP_EOL + ); + foreach ($selectableArtifacts as $selectableArtifact) { + print $selectableArtifact . PHP_EOL; + } + } + } + } + + /** Returns 'is' when the provided boolean value is true or 'is not' when it's false. */ + private static function getIsOrIsNot(BoolValue $boolValue) + { + return $boolValue->getValue() ? 'is' : 'is not'; + } +} + +GetArtifactMetadata::main(); diff --git a/examples/BasicOperations/GetCampaigns.php b/examples/BasicOperations/GetCampaigns.php new file mode 100644 index 000000000..940a10ded --- /dev/null +++ b/examples/BasicOperations/GetCampaigns.php @@ -0,0 +1,116 @@ + GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder()) + ->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $customerId) + { + $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient(); + // Creates a query that retrieves all campaigns. + $query = 'SELECT campaign.id, campaign.name FROM campaign ORDER BY campaign.id'; + // Issues a search request by specifying page size. + $response = + $googleAdsServiceClient->search($customerId, $query, ['pageSize' => self::PAGE_SIZE]); + + // Iterates over all rows in all pages and prints the requested field values for + // the campaign in each row. + foreach ($response->iterateAllElements() as $googleAdsRow) { + /** @var GoogleAdsRow $googleAdsRow */ + printf( + "Campaign with ID %d and name '%s' was found.%s", + $googleAdsRow->getCampaign()->getId()->getValue(), + $googleAdsRow->getCampaign()->getName()->getValue(), + PHP_EOL + ); + } + } +} + +GetCampaigns::main(); diff --git a/examples/BasicOperations/GetExpandedTextAds.php b/examples/BasicOperations/GetExpandedTextAds.php new file mode 100644 index 000000000..41a8b21fc --- /dev/null +++ b/examples/BasicOperations/GetExpandedTextAds.php @@ -0,0 +1,142 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::OPTIONAL_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID for which expanded text ads will be retrieved. If + * `null`, returns from all ad groups + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $customerId, $adGroupId) + { + $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient(); + // Creates a query that retrieves expanded text ads. + $query = + 'SELECT ad_group.id, ' + . 'ad_group_ad.ad.id, ' + . 'ad_group_ad.ad.expanded_text_ad.headline_part1, ' + . 'ad_group_ad.ad.expanded_text_ad.headline_part2, ' + . 'ad_group_ad.status ' + . 'FROM ad_group_ad ' + . 'WHERE ad_group_ad.ad.type = EXPANDED_TEXT_AD'; + if ($adGroupId !== null) { + $query .= " AND ad_group.id = $adGroupId"; + } + + // Issues a search request by specifying page size. + $response = + $googleAdsServiceClient->search($customerId, $query, ['pageSize' => self::PAGE_SIZE]); + + // Iterates over all rows in all pages and prints the requested field values for + // the expanded text ad in each row. + foreach ($response->iterateAllElements() as $googleAdsRow) { + /** @var GoogleAdsRow $googleAdsRow */ + $ad = $googleAdsRow->getAdGroupAd()->getAd(); + // Note that the status printed below are enum values. + // For example, a value of 2 will be returned when the status is 'ENABLED'. + // A mapping of enum names to values can be found in: + // AdGroupAdStatusEnum_AdGroupAdStatus.php + printf( + "Expanded text ad with ID %d, status %d, and headline '%s - %s' was found in ad " + . "group with ID %d.%s", + $ad->getId()->getValue(), + $googleAdsRow->getAdGroupAd()->getStatus(), + $ad->getExpandedTextAd()->getHeadlinePart1()->getValue(), + $ad->getExpandedTextAd()->getHeadlinePart2()->getValue(), + $googleAdsRow->getAdGroup()->getId()->getValue(), + PHP_EOL + ); + } + } +} + +GetExpandedTextAds::main(); diff --git a/examples/BasicOperations/GetKeywords.php b/examples/BasicOperations/GetKeywords.php new file mode 100644 index 000000000..cc0c0eb3f --- /dev/null +++ b/examples/BasicOperations/GetKeywords.php @@ -0,0 +1,142 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::OPTIONAL_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID for which keywords will be retrieved. If `null`, + * returns from all ad groups + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $customerId, $adGroupId) + { + $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient(); + // Creates a query that retrieves keywords. + $query = + 'SELECT ad_group.id, ' + . 'ad_group_criterion.type, ' + . 'ad_group_criterion.criterion_id, ' + . 'ad_group_criterion.keyword.text, ' + . 'ad_group_criterion.keyword.match_type ' + . 'FROM ad_group_criterion ' + . 'WHERE ad_group_criterion.type = KEYWORD'; + if ($adGroupId !== null) { + $query .= " AND ad_group.id = $adGroupId"; + } + + // Issues a search request by specifying page size. + $response = + $googleAdsServiceClient->search($customerId, $query, ['pageSize' => self::PAGE_SIZE]); + + // Iterates over all rows in all pages and prints the requested field values for + // the keyword in each row. + foreach ($response->iterateAllElements() as $googleAdsRow) { + /** @var GoogleAdsRow $googleAdsRow */ + // Note that the match type and criteria type printed below are enum values. + // For example, a value of 2 will be returned when the keyword match type is 'EXACT'. + // A mapping of enum names to values can be found in: + // Match type enum class: KeywordMatchTypeEnum_KeywordMatchType.php + // Criterion type enum class: CriterionTypeEnum_CriterionType.php + printf( + "Keyword with text '%s', match type %d, criterion type %d, and ID %d " + . "was found in ad group with ID %d.%s", + $googleAdsRow->getAdGroupCriterion()->getKeyword()->getText()->getValue(), + $googleAdsRow->getAdGroupCriterion()->getKeyword()->getMatchType(), + $googleAdsRow->getAdGroupCriterion()->getType(), + $googleAdsRow->getAdGroupCriterion()->getCriterionId()->getValue(), + $googleAdsRow->getAdGroup()->getId()->getValue(), + PHP_EOL + ); + } + } +} + +GetKeywords::main(); diff --git a/examples/BasicOperations/PauseAd.php b/examples/BasicOperations/PauseAd.php new file mode 100644 index 000000000..fa4b34e39 --- /dev/null +++ b/examples/BasicOperations/PauseAd.php @@ -0,0 +1,144 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID, + $options[ArgumentNames::AD_ID] ?: self::AD_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID that the ad group ad belongs to + * @param int $adId the ID of the ad to pause + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId, + $adId + ) { + // Creates ad group ad resource name. + $adGroupAdResourceName = ResourceNames::forAdGroupAd($customerId, $adGroupId, $adId); + + // Creates an ad and sets its status to PAUSED. + $adGroupAd = new AdGroupAd(); + $adGroupAd->setResourceName($adGroupAdResourceName); + $adGroupAd->setStatus(AdGroupAdStatusEnum_AdGroupAdStatus::PAUSED); + + // Constructs an operation that will pause the ad with the specified resource name, + // using the FieldMasks utility to derive the update mask. This mask tells the Google Ads + // API which attributes of the ad group you want to change. + $adGroupAdOperation = new AdGroupAdOperation(); + $adGroupAdOperation->setUpdate($adGroupAd); + $adGroupAdOperation->setUpdateMask(FieldMasks::allSetFieldsOf($adGroupAd)); + + // Issues a mutate request to pause the ad group ad. + $adGroupAdServiceClient = $googleAdsClient->getAdGroupAdServiceClient(); + $response = $adGroupAdServiceClient->mutateAdGroupAds( + $customerId, + [$adGroupAdOperation] + ); + + // Prints the resource name of the paused ad group ad. + /** @var AdGroupAd $pausedAdgroupAd */ + $pausedAdgroupAd = $response->getResults()[0]; + printf( + "Ad group ad with resource name: '%s' is paused.%s", + $pausedAdgroupAd->getResourceName(), + PHP_EOL + ); + } +} + +PauseAd::main(); diff --git a/examples/BasicOperations/RemoveAd.php b/examples/BasicOperations/RemoveAd.php new file mode 100644 index 000000000..a10af87e0 --- /dev/null +++ b/examples/BasicOperations/RemoveAd.php @@ -0,0 +1,134 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID, + $options[ArgumentNames::AD_ID] ?: self::AD_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID that the ad group ad belongs to + * @param int $adId the ID of the ad to remove + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId, + $adId + ) { + // Creates ad group ad resource name. + $adGroupAdResourceName = ResourceNames::forAdGroupAd($customerId, $adGroupId, $adId); + + // Constructs an operation that will remove the ad with the specified resource name. + $adGroupAdOperation = new AdGroupAdOperation(); + $adGroupAdOperation->setRemove($adGroupAdResourceName); + + // Issues a mutate request to remove the ad group ad. + $adGroupAdServiceClient = $googleAdsClient->getAdGroupAdServiceClient(); + $response = $adGroupAdServiceClient->mutateAdGroupAds( + $customerId, + [$adGroupAdOperation] + ); + + // Prints the resource name of the removed ad group ad. + /** @var AdGroupAd $removedAdGroupAd */ + $removedAdGroupAd = $response->getResults()[0]; + printf( + "Removed ad group ad with resource name: '%s'%s", + $removedAdGroupAd->getResourceName(), + PHP_EOL + ); + } +} + +RemoveAd::main(); diff --git a/examples/BasicOperations/RemoveAdGroup.php b/examples/BasicOperations/RemoveAdGroup.php new file mode 100644 index 000000000..9f72daa41 --- /dev/null +++ b/examples/BasicOperations/RemoveAdGroup.php @@ -0,0 +1,130 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ID of ad group to remove + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId + ) { + // Creates ad group resource name. + $adGroupResourceName = ResourceNames::forAdGroup($customerId, $adGroupId); + + // Constructs an operation that will remove the ad group with the specified resource name. + $adGroupOperation = new AdGroupOperation(); + $adGroupOperation->setRemove($adGroupResourceName); + + // Issues a mutate request to remove the ad group. + $adGroupServiceClient = $googleAdsClient->getAdGroupServiceClient(); + $response = $adGroupServiceClient->mutateAdGroups( + $customerId, + [$adGroupOperation] + ); + + // Prints the resource name of the removed ad group. + /** @var AdGroup $removedAdGroup */ + $removedAdGroup = $response->getResults()[0]; + printf( + "Removed ad group with resource name: '%s'%s", + $removedAdGroup->getResourceName(), + PHP_EOL + ); + } +} + +RemoveAdGroup::main(); diff --git a/examples/BasicOperations/RemoveCampaign.php b/examples/BasicOperations/RemoveCampaign.php new file mode 100644 index 000000000..7c9a888b5 --- /dev/null +++ b/examples/BasicOperations/RemoveCampaign.php @@ -0,0 +1,122 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CAMPAIGN_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::CAMPAIGN_ID] ?: self::CAMPAIGN_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $campaignId the ID of the campaign to remove + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $customerId, $campaignId) + { + // Creates the resource name of a campaign to remove. + $campaignResourceName = ResourceNames::forCampaign($customerId, $campaignId); + + // Creates a campaign operation. + $campaignOperation = new CampaignOperation(); + $campaignOperation->setRemove($campaignResourceName); + + // Issues a mutate request to remove the campaign. + $campaignServiceClient = $googleAdsClient->getCampaignServiceClient(); + $response = $campaignServiceClient->mutateCampaigns($customerId, [$campaignOperation]); + + /** @var Campaign $removedCampaign */ + $removedCampaign = $response->getResults()[0]; + printf( + "Removed campaign with resource name '%s'%s", + $removedCampaign->getResourceName(), + PHP_EOL + ); + } +} + +RemoveCampaign::main(); diff --git a/examples/BasicOperations/RemoveKeyword.php b/examples/BasicOperations/RemoveKeyword.php new file mode 100644 index 000000000..8eef78754 --- /dev/null +++ b/examples/BasicOperations/RemoveKeyword.php @@ -0,0 +1,137 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CRITERION_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID, + $options[ArgumentNames::CRITERION_ID] ?: self::CRITERION_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID that the ad group criterion belongs to + * @param int $criterionId the ID of the ad group criterion to remove + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId, + $criterionId + ) { + // Creates ad group criterion resource name. + $adGroupCriterionResourceName = + ResourceNames::forAdGroupCriterion($customerId, $adGroupId, $criterionId); + + // Constructs an operation that will remove the keyword with the specified resource name. + $adGroupCriterionOperation = new AdGroupCriterionOperation(); + $adGroupCriterionOperation->setRemove($adGroupCriterionResourceName); + + // Issues a mutate request to remove the ad group criterion. + $adGroupCriterionServiceClient = $googleAdsClient->getAdGroupCriterionServiceClient(); + $response = $adGroupCriterionServiceClient->mutateAdGroupCriteria( + $customerId, + [$adGroupCriterionOperation] + ); + + // Prints the resource name of the removed ad group criterion. + /** @var AdGroupCriterion $removedAdGroupCriterion */ + $removedAdGroupCriterion = $response->getResults()[0]; + printf( + "Removed ad group criterion with resource name: '%s'%s", + $removedAdGroupCriterion->getResourceName(), + PHP_EOL + ); + } +} + +RemoveKeyword::main(); diff --git a/examples/BasicOperations/UpdateAdGroup.php b/examples/BasicOperations/UpdateAdGroup.php new file mode 100644 index 000000000..4d72cf0de --- /dev/null +++ b/examples/BasicOperations/UpdateAdGroup.php @@ -0,0 +1,149 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CPC_BID_MICRO_AMOUNT => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID, + $options[ArgumentNames::CPC_BID_MICRO_AMOUNT] ?: self::CPC_BID_MICRO_AMOUNT + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ID of ad group to update + * @param int $cpcBidMicroAmount the bid amount in micros to use for the ad group bid + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId, + $cpcBidMicroAmount + ) { + // Creates ad group resource name. + $adGroupResourceName = ResourceNames::forAdGroup($customerId, $adGroupId); + + // Creates an ad group object with the specified resource name and other changes. + $adGroup = new AdGroup(); + $adGroup->setResourceName($adGroupResourceName); + $wrappedCpcBidMicroAmount = new Int64Value(); + $wrappedCpcBidMicroAmount->setValue($cpcBidMicroAmount); + $adGroup->setCpcBidMicros($wrappedCpcBidMicroAmount); + $adGroup->setStatus(AdGroupStatusEnum_AdGroupStatus::PAUSED); + + // Constructs an operation that will update the ad group with the specified resource name, + // using the FieldMasks utility to derive the update mask. This mask tells the Google Ads + // API which attributes of the ad group you want to change. + $adGroupOperation = new AdGroupOperation(); + $adGroupOperation->setUpdate($adGroup); + $adGroupOperation->setUpdateMask(FieldMasks::allSetFieldsOf($adGroup)); + + // Issues a mutate request to update the ad group. + $adGroupServiceClient = $googleAdsClient->getAdGroupServiceClient(); + $response = $adGroupServiceClient->mutateAdGroups( + $customerId, + [$adGroupOperation] + ); + + // Prints the resource name of the updated ad group. + /** @var AdGroup $updatedAdGroup */ + $updatedAdGroup = $response->getResults()[0]; + printf( + "Updated ad group with resource name: '%s'%s", + $updatedAdGroup->getResourceName(), + PHP_EOL + ); + } +} + +UpdateAdGroup::main(); diff --git a/examples/BasicOperations/UpdateCampaign.php b/examples/BasicOperations/UpdateCampaign.php new file mode 100644 index 000000000..97d410316 --- /dev/null +++ b/examples/BasicOperations/UpdateCampaign.php @@ -0,0 +1,140 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CAMPAIGN_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::CAMPAIGN_ID] ?: self::CAMPAIGN_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $campaignId the ID of campaign to update + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $campaignId + ) { + // Creates campaign resource name. + $campaignResourceName = ResourceNames::forCampaign($customerId, $campaignId); + + // Creates a campaign object with the specified resource name and other changes. + $campaign = new Campaign(); + $campaign->setResourceName($campaignResourceName); + $campaign->setStatus(CampaignStatusEnum_CampaignStatus::PAUSED); + + // Constructs an operation that will update the campaign with the specified resource name, + // using the FieldMasks utility to derive the update mask. This mask tells the Google Ads + // API which attributes of the campaign you want to change. + $campaignOperation = new CampaignOperation(); + $campaignOperation->setUpdate($campaign); + $campaignOperation->setUpdateMask(FieldMasks::allSetFieldsOf($campaign)); + + // Issues a mutate request to update the campaign. + $campaignServiceClient = $googleAdsClient->getCampaignServiceClient(); + $response = $campaignServiceClient->mutateCampaigns( + $customerId, + [$campaignOperation] + ); + + // Prints the resource name of the updated campaign. + /** @var Campaign $updatedCampaign */ + $updatedCampaign = $response->getResults()[0]; + printf( + "Updated campaign with resource name: '%s'%s", + $updatedCampaign->getResourceName(), + PHP_EOL + ); + } +} + +UpdateCampaign::main(); diff --git a/examples/BasicOperations/UpdateKeyword.php b/examples/BasicOperations/UpdateKeyword.php new file mode 100644 index 000000000..17b81bdb4 --- /dev/null +++ b/examples/BasicOperations/UpdateKeyword.php @@ -0,0 +1,151 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CRITERION_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID, + $options[ArgumentNames::CRITERION_ID] ?: self::CRITERION_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID that the criterion ID belongs to + * @param int $criterionId the ID of the ad group criterion to update + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId, + $criterionId + ) { + // Creates ad group criterion resource name. + $adGroupCriterionResourceName = + ResourceNames::forAdGroupCriterion($customerId, $adGroupId, $criterionId); + + // Creates an ad group criterion with the proper resource name and any other changes. + $adGroupCriterion = new AdGroupCriterion(); + $adGroupCriterion->setResourceName($adGroupCriterionResourceName); + $adGroupCriterion->setStatus(AdGroupCriterionStatusEnum_AdGroupCriterionStatus::ENABLED); + $wrappedFinalUrl = new StringValue(); + $wrappedFinalUrl->setValue('https://www.example.com'); + $adGroupCriterion->setFinalUrls([$wrappedFinalUrl]); + + // Constructs an operation that will update the ad group criterion, using the FieldMasks + // utility to derive the update mask. This mask tells the Google Ads API which attributes of + // the ad group criterion you want to change. + $adGroupCriterionOperation = new AdGroupCriterionOperation(); + $adGroupCriterionOperation->setUpdate($adGroupCriterion); + $adGroupCriterionOperation->setUpdateMask(FieldMasks::allSetFieldsOf($adGroupCriterion)); + + // Issues a mutate request to update the ad group criterion. + $adGroupCriterionServiceClient = $googleAdsClient->getAdGroupCriterionServiceClient(); + $response = $adGroupCriterionServiceClient->mutateAdGroupCriteria( + $customerId, + [$adGroupCriterionOperation] + ); + + // Prints the resource name of the updated ad group criterion. + /** @var AdGroupCriterion $updatedAdGroupCriterion */ + $updatedAdGroupCriterion = $response->getResults()[0]; + printf( + "Updated ad group criterion with resource name: '%s'%s", + $updatedAdGroupCriterion->getResourceName(), + PHP_EOL + ); + } +} + +UpdateKeyword::main(); diff --git a/examples/HotelAds/AddHotelAd.php b/examples/HotelAds/AddHotelAd.php new file mode 100644 index 000000000..18ec67c79 --- /dev/null +++ b/examples/HotelAds/AddHotelAd.php @@ -0,0 +1,370 @@ + Prerequisite: You need to have an access to the Hotel Ads Center, which can be granted during + * integration with Google Hotels. The integration instructions can be found at: + * https://support.google.com/hotelprices/answer/6101897. + */ +class AddHotelAds +{ + const CUSTOMER_ID = 'INSERT_CUSTOMER_ID_HERE'; + // Specify your Hotels account ID below. You can see how to find the account ID in the Hotel + // Ads Center at: https://support.google.com/hotelprices/answer/6399770. + // This ID is the same account ID that you use in API requests to the Travel Partner APIs + // (https://developers.google.com/hotels/hotel-ads/api-reference/). + const HOTEL_CENTER_ACCOUNT_ID = 'INSERT_HOTEL_CENTER_ACCOUNT_ID_HERE'; + + public static function main() + { + // Either pass the required parameters for this example on the command line, or insert them + // into the constants above. + $options = ArgumentParser::parseCommandArguments([ + ArgumentNames::CUSTOMER_ID => GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::HOTEL_CENTER_ACCOUNT_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::HOTEL_CENTER_ACCOUNT_ID] ?: self::HOTEL_CENTER_ACCOUNT_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $hotelCenterAccountId the Hotel Center account ID + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $hotelCenterAccountId + ) { + // Creates a budget to be used by the campaign that will be created below. + $budgetResourceName = self::addCampaignBudget($googleAdsClient, $customerId); + // Creates a hotel campaign. + $campaignResourceName = self::addHotelCampaign( + $googleAdsClient, + $customerId, + $budgetResourceName, + $hotelCenterAccountId + ); + // Creates a hotel ad group. + $adGroupResourceName = + self::addHotelAdGroup($googleAdsClient, $customerId, $campaignResourceName); + // Creates a hotel ad group ad. + self::addHotelAdGroupAd($googleAdsClient, $customerId, $adGroupResourceName); + } + + /** + * Creates a new campaign budget in the specified client account. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID + * @return string the resource name of the newly created budget + */ + private static function addCampaignBudget(GoogleAdsClient $googleAdsClient, $customerId) + { + // Creates a campaign budget. + $budget = new CampaignBudget(); + + $wrappedName = new StringValue(); + $wrappedName->setValue('Interplanetary Cruise Budget #' . uniqid()); + $budget->setName($wrappedName); + + $budget->setDeliveryMethod(BudgetDeliveryMethodEnum_BudgetDeliveryMethod::STANDARD); + + // Sets the amount of budget. + $wrappedAmountMicros = new Int64Value(); + $wrappedAmountMicros->setValue(50000000); + $budget->setAmountMicros($wrappedAmountMicros); + + // Creates a campaign budget operation. + $campaignBudgetOperation = new CampaignBudgetOperation(); + $campaignBudgetOperation->setCreate($budget); + + // Issues a mutate request. + $campaignBudgetServiceClient = $googleAdsClient->getCampaignBudgetServiceClient(); + $response = $campaignBudgetServiceClient->mutateCampaignBudgets( + $customerId, + [$campaignBudgetOperation] + ); + + /** @var CampaignBudget $addedBudget */ + $addedBudget = $response->getResults()[0]; + printf( + "Added a budget with resource name '%s'.%s", + $addedBudget->getResourceName(), + PHP_EOL + ); + + return $addedBudget->getResourceName(); + } + + /** + * Creates a new hotel campaign in the specified client account. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID + * @param string $budgetResourceName the resource name of budget for a new campaign + * @param int $hotelCenterAccountId the Hotel Center account ID + * @return string the resource name of the newly created campaign + */ + // [START addHotelCampaign] + private static function addHotelCampaign( + GoogleAdsClient $googleAdsClient, + $customerId, + $budgetResourceName, + $hotelCenterAccountId + ) { + // Creates a campaign. + $campaign = new Campaign(); + + $wrappedName = new StringValue(); + $wrappedName->setValue('Interplanetary Cruise Campaign #' . uniqid()); + $campaign->setName($wrappedName); + + // Configures settings related to hotel campaigns including advertising channel type + // and hotel setting info. + $campaign->setAdvertisingChannelType( + AdvertisingChannelTypeEnum_AdvertisingChannelType::HOTEL + ); + $wrappedHotelCenterId = new Int64Value(); + $wrappedHotelCenterId->setValue($hotelCenterAccountId); + $hotelSettingInfo = new Campaign_HotelSettingInfo(); + $hotelSettingInfo->setHotelCenterId($wrappedHotelCenterId); + $campaign->setHotelSetting($hotelSettingInfo); + + // 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(CampaignStatusEnum_CampaignStatus::PAUSED); + // Sets the bidding strategy. Only Manual CPC can be used for hotel campaigns. + $campaign->setManualCpc(new ManualCpc()); + + // Sets the budget. + $wrappedBudgetResourceName = new StringValue(); + $wrappedBudgetResourceName->setValue($budgetResourceName); + $campaign->setCampaignBudget($wrappedBudgetResourceName); + + // Configures the campaign network options. Only Google Search is allowed for + // hotel campaigns. + $wrappedTrueValue = new BoolValue(); + $wrappedTrueValue->setValue(true); + $networkSettings = new Campaign_NetworkSettings(); + $networkSettings->setTargetGoogleSearch($wrappedTrueValue); + $campaign->setNetworkSettings($networkSettings); + + // Creates a campaign operation. + $campaignOperation = new CampaignOperation(); + $campaignOperation->setCreate($campaign); + + // Issues a mutate request to add campaigns. + $campaignServiceClient = $googleAdsClient->getCampaignServiceClient(); + $response = $campaignServiceClient->mutateCampaigns($customerId, [$campaignOperation]); + + /** @var Campaign $addedCampaign */ + $addedCampaign = $response->getResults()[0]; + printf( + "Added a hotel campaign with resource name '%s'.%s", + $addedCampaign->getResourceName(), + PHP_EOL + ); + + return $addedCampaign->getResourceName(); + } + // [END addHotelCampaign] + + /** + * Creates a new hotel ad group in the specified campaign. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID + * @param string $campaignResourceName the resource name of campaign that a new ad group will + * belong to + * @return string the resource name of the newly created ad group + */ + // [START addHotelAdGroup] + private static function addHotelAdGroup( + GoogleAdsClient $googleAdsClient, + $customerId, + $campaignResourceName + ) { + // Creates an ad group. + $adGroup = new AdGroup(); + + $wrappedName = new StringValue(); + $wrappedName->setValue('Earth to Mars Cruise #' . uniqid()); + $adGroup->setName($wrappedName); + + // Sets the campaign. + $wrappedCampaignResourceName = new StringValue(); + $wrappedCampaignResourceName->setValue($campaignResourceName); + $adGroup->setCampaign($wrappedCampaignResourceName); + + // Sets the ad group type to HOTEL_ADS. + // This cannot be set to other types. + $adGroup->setType(AdGroupTypeEnum_AdGroupType::HOTEL_ADS); + + $wrappedCpcBidMicros = new Int64Value(); + $wrappedCpcBidMicros->setValue(10000000); + $adGroup->setCpcBidMicros($wrappedCpcBidMicros); + + $adGroup->setStatus(AdGroupStatusEnum_AdGroupStatus::ENABLED); + + // Creates an ad group operation. + $adGroupOperation = new AdGroupOperation(); + $adGroupOperation->setCreate($adGroup); + + // Issues a mutate request to add an ad group. + $adGroupServiceClient = $googleAdsClient->getAdGroupServiceClient(); + $response = $adGroupServiceClient->mutateAdGroups($customerId, [$adGroupOperation]); + + /** @var AdGroup $addedAdGroup */ + $addedAdGroup = $response->getResults()[0]; + printf( + "Added a hotel ad group with resource name '%s'.%s", + $addedAdGroup->getResourceName(), + PHP_EOL + ); + + return $addedAdGroup->getResourceName(); + } + // [END addHotelAdGroup] + + /** + * Creates a new hotel ad group ad in the specified ad group. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID + * @param string $adGroupResourceName the resource name of ad group that a new ad group ad will + * belong to + */ + // [START addHotelAdGroupAd] + private static function addHotelAdGroupAd( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupResourceName + ) { + // Creates a new hotel ad. + $ad = new Ad(); + $ad->setHotelAd(new HotelAdInfo()); + + // Creates a new ad group ad and sets the hotel ad to it. + $adGroupAd = new AdGroupAd(); + $adGroupAd->setAd($ad); + $adGroupAd->setStatus(AdGroupAdStatusEnum_AdGroupAdStatus::PAUSED); + + // Sets the ad group. + $wrappedAdGroupResourceName = new StringValue(); + $wrappedAdGroupResourceName->setValue($adGroupResourceName); + $adGroupAd->setAdGroup($wrappedAdGroupResourceName); + + // Creates an ad group ad operation. + $adGroupAdOperation = new AdGroupAdOperation(); + $adGroupAdOperation->setCreate($adGroupAd); + + // Issues a mutate request to add an ad group ad. + $adGroupAdServiceClient = $googleAdsClient->getAdGroupAdServiceClient(); + $response = $adGroupAdServiceClient->mutateAdGroupAds($customerId, [$adGroupAdOperation]); + + /** @var AdGroupAd $addedAdGroupAd */ + $addedAdGroupAd = $response->getResults()[0]; + printf( + "Added a hotel ad group ad with resource name '%s'.%s", + $addedAdGroupAd->getResourceName(), + PHP_EOL + ); + } + // [END addHotelAdGroupAd] +} + +AddHotelAds::main(); diff --git a/examples/HotelAds/AddHotelAdGroupBidModifiers.php b/examples/HotelAds/AddHotelAdGroupBidModifiers.php new file mode 100644 index 000000000..636df1507 --- /dev/null +++ b/examples/HotelAds/AddHotelAdGroupBidModifiers.php @@ -0,0 +1,206 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CHECK_IN_DAY_CRITERION_ID => GetOpt::OPTIONAL_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID, + $options[ArgumentNames::CHECK_IN_DAY_CRITERION_ID] + ?: self::CHECK_IN_DAY_CRITERION_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID + * @param int $checkInDayCriterionId the criterion ID of the hotel check-in day to set + * a bid modifier for + */ + // [START addHotelAdGroupBidModifiers] + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId, + $checkInDayCriterionId + ) { + $operations = []; + + // 1) Creates an ad group bid modifier based on the hotel check-in day. + $checkInDayAdGroupBidModifier = new AdGroupBidModifier(); + + // Sets the resource name for the criterion ID whose value corresponds to the desired + // check-in day. + $checkInDayResourceName = ResourceNames::forAdGroupBidModifier( + $customerId, + $adGroupId, + $checkInDayCriterionId + ); + $checkInDayAdGroupBidModifier->setResourceName($checkInDayResourceName); + + // Sets the bid modifier value to 150%. + $wrappedBidModifierValue = new DoubleValue(); + $wrappedBidModifierValue->setValue(1.5); + $checkInDayAdGroupBidModifier->setBidModifier($wrappedBidModifierValue); + $checkInDayAdGroupBidModifier->setHotelCheckInDay(new HotelCheckInDayInfo()); + + // Creates an ad group bid modifier operation. + $checkInDayAdGroupBidModifierOperation = new AdGroupBidModifierOperation(); + $checkInDayAdGroupBidModifierOperation->setCreate($checkInDayAdGroupBidModifier); + $operations[] = $checkInDayAdGroupBidModifierOperation; + + // 2) Creates an ad group bid modifier based on the hotel length of stay. + $lengthOfStayAdGroupBidModifier = new AdGroupBidModifier(); + + // Sets the ad group. + $wrappedAdGroupResourceName = new StringValue(); + $wrappedAdGroupResourceName->setValue(ResourceNames::forAdGroup($customerId, $adGroupId)); + $lengthOfStayAdGroupBidModifier->setAdGroup($wrappedAdGroupResourceName); + + // Creates the hotel length of stay info. + $lengthOfStayInfo = new HotelLengthOfStayInfo(); + $wrappedMinNights = new Int64Value(); + $wrappedMinNights->setValue(3); + $lengthOfStayInfo->setMinNights($wrappedMinNights); + $wrappedMaxNights = new Int64Value(); + $wrappedMaxNights->setValue(7); + $lengthOfStayInfo->setMaxNights($wrappedMaxNights); + $lengthOfStayAdGroupBidModifier->setHotelLengthOfStay($lengthOfStayInfo); + + // Sets the bid modifier value to 170%. + $wrappedBidModifierValue = new DoubleValue(); + $wrappedBidModifierValue->setValue(1.7); + $lengthOfStayAdGroupBidModifier->setBidModifier($wrappedBidModifierValue); + + // Creates an ad group bid modifier operation. + $lengthOfStayAdGroupBidModifierOperation = new AdGroupBidModifierOperation(); + $lengthOfStayAdGroupBidModifierOperation->setCreate( + $lengthOfStayAdGroupBidModifier + ); + $operations[] = $lengthOfStayAdGroupBidModifierOperation; + + // Issues a mutate request to add an ad group bid modifiers. + $adGroupBidModifierServiceClient = $googleAdsClient->getAdGroupBidModifierServiceClient(); + $response = $adGroupBidModifierServiceClient->mutateAdGroupBidModifiers( + $customerId, + $operations + ); + + // Print out resource names of the added ad group bid modifiers. + printf( + "Added %d hotel ad group bid modifiers:%s", + $response->getResults()->count(), + PHP_EOL + ); + foreach ($response->getResults() as $addedAdGroupBidModifier) { + /** @var AdGroupBidModifier $addedAdGroupBidModifier */ + print $addedAdGroupBidModifier->getResourceName() . PHP_EOL; + } + } + // [END addHotelAdGroupBidModifiers] +} + +AddHotelAdGroupBidModifiers::main(); diff --git a/examples/HotelAds/AddHotelListingGroupTree.php b/examples/HotelAds/AddHotelListingGroupTree.php new file mode 100644 index 000000000..db8700692 --- /dev/null +++ b/examples/HotelAds/AddHotelListingGroupTree.php @@ -0,0 +1,418 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::AD_GROUP_ID => GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CPC_BID_MICRO_AMOUNT => GetOpt::OPTIONAL_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::AD_GROUP_ID] ?: self::AD_GROUP_ID, + $options[ArgumentNames::CPC_BID_MICRO_AMOUNT] ?: self::CPC_BID_MICRO_AMOUNT + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $adGroupId the ad group ID + * @param int $cpcBidMicroAmount the CPC bid micro amount to set on created ad group criteria + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $adGroupId, + $cpcBidMicroAmount + ) { + $operations = []; + + // Creates the root of the tree as a SUBDIVISION node. + $rootId = self::addRootNode($customerId, $adGroupId, $operations, $cpcBidMicroAmount); + + // Creates child nodes of level 1, partitioned by the hotel class info. + $otherHotelClassesId = + self::addLevel1Nodes($customerId, $adGroupId, $rootId, $operations, $cpcBidMicroAmount); + + // Creates child nodes of level 2, partitioned by the hotel country region info. + self::addLevel2Nodes( + $customerId, + $adGroupId, + $otherHotelClassesId, + $operations, + $cpcBidMicroAmount + ); + + $adGroupCriterionServiceClient = $googleAdsClient->getAdGroupCriterionServiceClient(); + $response = $adGroupCriterionServiceClient->mutateAdGroupCriteria($customerId, $operations); + + printf("Added %d listing group info entities.%s", count($response->getResults()), PHP_EOL); + foreach ($response->getResults() as $adGroupCriterion) { + print $adGroupCriterion->getResourceName() . PHP_EOL; + } + } + + /** + * Creates the root node of the listing group tree and adds its create operation to the + * operations list. + * + * @param int $customerId the customer ID + * @param int $adGroupId the ad group ID + * @param AdGroupCriterionOperation[] $operations the operations + * @param int $cpcBidMicroAmount the CPC bid micro amount to set on created ad group criteria + * @return int the root node's temporary ID + */ + private static function addRootNode( + $customerId, + $adGroupId, + array &$operations, + $cpcBidMicroAmount + ) { + // Creates the root of the tree as a SUBDIVISION node. + $root = self::createListingGroupInfo(ListingGroupTypeEnum_ListingGroupType::SUBDIVISION); + $rootAdGroupCriterion = + self::createAdGroupCriterion($customerId, $adGroupId, $root, $cpcBidMicroAmount); + $operation = self::generateCreateOperation($rootAdGroupCriterion); + $operations[] = $operation; + + return self::$nextTempId--; + } + + /** + * Creates child nodes of level 1, partitioned by the hotel class info. + * + * @param int $customerId the customer ID + * @param int $adGroupId the ad group ID + * @param int $rootId the root ID for all nodes at this level + * @param AdGroupCriterionOperation[] $operations the operations list + * @param int $cpcBidMicroAmount the CPC bid micro amount to set on created ad group criteria + * @return int the "other hotel classes" node's temporary ID, which serves as a parent node for + * the next level + */ + // [START addLevel1Nodes] + private static function addLevel1Nodes( + $customerId, + $adGroupId, + $rootId, + array &$operations, + $cpcBidMicroAmount + ) { + // Creates hotel class info and dimension info for 5-star hotels. + $fiveStarredHotelClassInfo = new HotelClassInfo(); + $wrappedValue = new Int64Value(); + $wrappedValue->setValue(5); + $fiveStarredHotelClassInfo->setValue($wrappedValue); + $fiveStarredDimensionInfo = new ListingDimensionInfo(); + $fiveStarredDimensionInfo->setHotelClass($fiveStarredHotelClassInfo); + // Creates listing group info for 5-star hotels as a UNIT node. + $fiveStarredUnit = self::createListingGroupInfo( + ListingGroupTypeEnum_ListingGroupType::UNIT, + $rootId, + $fiveStarredDimensionInfo + ); + // Creates an ad group criterion for 5-star hotels. + $fiveStarredAdGroupCriterion = self::createAdGroupCriterion( + $customerId, + $adGroupId, + $fiveStarredUnit, + $cpcBidMicroAmount + ); + // Decrements the temp ID for the next ad group criterion. + self::$nextTempId--; + $operation = self::generateCreateOperation($fiveStarredAdGroupCriterion); + $operations[] = $operation; + + // You can also create more UNIT nodes for other hotel classes by copying the above code in + // this method and modifying the value passed to HotelClassInfo() to the value you want. + // For instance, passing 4 instead of 5 in the above code will create a UNIT node of 4-star + // hotels instead. + + // Creates hotel class info and dimension info for other hotel classes by *not* specifying + // any attributes on those object. + $othersHotelsDimensionInfo = new ListingDimensionInfo(); + $othersHotelsDimensionInfo->setHotelClass(new HotelClassInfo()); + // Creates listing group info for other hotel classes as a SUBDIVISION node, which will be + // used as a parent node for children nodes of the next level. + $otherHotelsSubDivision = self::createListingGroupInfo( + ListingGroupTypeEnum_ListingGroupType::SUBDIVISION, + $rootId, + $othersHotelsDimensionInfo + ); + // Creates an ad group criterion for other hotel classes. + $otherHotelsAdGroupCriterion = self::createAdGroupCriterion( + $customerId, + $adGroupId, + $otherHotelsSubDivision, + $cpcBidMicroAmount + ); + $operation = self::generateCreateOperation($otherHotelsAdGroupCriterion); + $operations[] = $operation; + + return self::$nextTempId--; + } + // [END addLevel1Nodes] + + /** + * Creates child nodes of level 2, partitioned by the country region. + * + * @param int $customerId the customer ID + * @param int $adGroupId the ad group ID + * @param int $parentId the parent ID for all nodes at this level + * @param AdGroupCriterionOperation[] $operations the operations list + * @param int $cpcBidMicroAmount the CPC bid micro amount to set on created ad group criteria + */ + private static function addLevel2Nodes( + $customerId, + $adGroupId, + $parentId, + array &$operations, + $cpcBidMicroAmount + ) { + // Creates hotel country region info and dimension info for hotels in Japan. + $japanCountryRegionInfo = new HotelCountryRegionInfo(); + // The criterion ID for Japan is 2392. + // See https://developers.google.com/adwords/api/docs/appendix/geotargeting for criteria ID + // of other countries. + $japanGeoTargetConstantId = 2392; + $japanCountryCriterionResourceName = + ResourceNames::forGeoTargetConstant($japanGeoTargetConstantId); + $wrappedResourceName = new StringValue(); + $wrappedResourceName->setValue($japanCountryCriterionResourceName); + $japanCountryRegionInfo->setCountryRegionCriterion($wrappedResourceName); + $japanDimensionInfo = new ListingDimensionInfo(); + $japanDimensionInfo->setHotelCountryRegion($japanCountryRegionInfo); + // Creates listing group info for hotels in Japan as a UNIT node. + $japanHotelsUnit = self::createListingGroupInfo( + ListingGroupTypeEnum_ListingGroupType::UNIT, + $parentId, + $japanDimensionInfo + ); + // Creates an ad group criterion for hotels in Japan. + $japanHotelsAdGroupCriterion = self::createAdGroupCriterion( + $customerId, + $adGroupId, + $japanHotelsUnit, + $cpcBidMicroAmount + ); + // Decrements the temp ID for the next ad group criterion. + self::$nextTempId--; + $operation = self::generateCreateOperation($japanHotelsAdGroupCriterion); + $operations[] = $operation; + + // Creates hotel class info and dimension info for hotels in other regions. + $otherHotelRegionsDimensionInfo = new ListingDimensionInfo(); + $otherHotelRegionsDimensionInfo->setHotelCountryRegion(new HotelCountryRegionInfo()); + // Creates listing group info for hotels in other regions as a UNIT node. + // The "others" node is always required for every level of the tree. + $otherHotelRegionsUnit = self::createListingGroupInfo( + ListingGroupTypeEnum_ListingGroupType::UNIT, + $parentId, + $otherHotelRegionsDimensionInfo + ); + // Creates an ad group criterion for other hotel country regions. + $otherHotelRegionsAdGroupCriterion = self::createAdGroupCriterion( + $customerId, + $adGroupId, + $otherHotelRegionsUnit, + $cpcBidMicroAmount + ); + $operation = self::generateCreateOperation($otherHotelRegionsAdGroupCriterion); + $operations[] = $operation; + } + + /** + * Creates the listing group info with the provided parameters. + * + * @param int $listingGroupType the listing group type + * @param int|null $parentCriterionId optional, the parent criterion ID of the listing group + * info + * @param ListingDimensionInfo|null $caseValue optional, the dimension info for the listing + * group + * @return ListingGroupInfo the created listing group info + */ + private static function createListingGroupInfo( + $listingGroupType, + $parentCriterionId = null, + ListingDimensionInfo $caseValue = null + ) { + $listingGroupInfo = new ListingGroupInfo(); + $listingGroupInfo->setType($listingGroupType); + if (!is_null($parentCriterionId)) { + $wrappedParentCriterionId = new Int64Value(); + $wrappedParentCriterionId->setValue($parentCriterionId); + $listingGroupInfo->setParentCriterionId($wrappedParentCriterionId); + $listingGroupInfo->setCaseValue($caseValue); + } + + return $listingGroupInfo; + } + + /** + * Creates an ad group criterion from the provided listing group info. + * Bid amount will be set on the created ad group criterion when listing group info type is + * `UNIT`. Setting bid amount for `SUBDIVISION` types is not allowed. + * + * @param int $customerId the customer ID + * @param int $adGroupId the ad group ID + * @param ListingGroupInfo $listingGroupInfo the listing group info + * @param int $cpcBidMicroAmount the CPC bid micro amount to set for the ad group criterion + * @return AdGroupCriterion the created ad group criterion + */ + private static function createAdGroupCriterion( + $customerId, + $adGroupId, + ListingGroupInfo $listingGroupInfo, + $cpcBidMicroAmount + ) { + $adGroupCriterion = new AdGroupCriterion(); + $adGroupCriterion->setStatus(AdGroupStatusEnum_AdGroupStatus::ENABLED); + $adGroupCriterion->setListingGroup($listingGroupInfo); + + $adGroupCriterion->setResourceName( + ResourceNames::forAdGroupCriterion($customerId, $adGroupId, self::$nextTempId) + ); + + // Bids are valid only for UNIT nodes. + if ($listingGroupInfo->getType() == ListingGroupTypeEnum_ListingGroupType::UNIT) { + $wrappedValue = new Int64Value(); + $wrappedValue->setValue($cpcBidMicroAmount); + $adGroupCriterion->setCpcBidMicros($wrappedValue); + } + + return $adGroupCriterion; + } + + /** + * Creates an operation for creating the specified ad group criterion. + * + * @param AdGroupCriterion $adGroupCriterion the ad group criterion to create an operation for + * @return AdGroupCriterionOperation the created ad group criterion operation + */ + private static function generateCreateOperation(AdGroupCriterion $adGroupCriterion) + { + $operation = new AdGroupCriterionOperation(); + $operation->setCreate($adGroupCriterion); + + return $operation; + } +} + +AddHotelListingGroupTree::main(); diff --git a/examples/Recommendations/ApplyRecommendation.php b/examples/Recommendations/ApplyRecommendation.php new file mode 100644 index 000000000..608be4e82 --- /dev/null +++ b/examples/Recommendations/ApplyRecommendation.php @@ -0,0 +1,145 @@ +/recommendations/`. + // Its example can be retrieved from GetTextAdRecommendations.php + const RECOMMENDATION_ID = 'INSERT_RECOMMENDATION_ID_HERE'; + + public static function main() + { + // Either pass the required parameters for this example on the command line, or insert them + // into the constants above. + $options = ArgumentParser::parseCommandArguments([ + ArgumentNames::CUSTOMER_ID => GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::RECOMMENDATION_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::RECOMMENDATION_ID] ?: self::RECOMMENDATION_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param string $recommendationId the recommendation ID to apply + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $recommendationId + ) { + $recommendationResourceName = + ResourceNames::forRecommendation($customerId, $recommendationId); + + $applyRecommendationOperation = new ApplyRecommendationOperation(); + $applyRecommendationOperation->setResourceName($recommendationResourceName); + + // Each recommendation type has optional parameters to override the recommended values. + // This is an example to override a recommended ad when a TextAdRecommendation is applied. + // For details, please read + // https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v0.services#google.ads.googleads.v0.services.ApplyRecommendationOperation. + /* + $overridingAd = new Ad(); + $wrappedId = new Int64Value(); + $wrappedId->setValue('INSERT_AD_ID_AS_INTEGER_HERE'); + $overridingAd->setId($wrappedId); + $textAdParameters = new ApplyRecommendationOperation_TextAdParameters(); + $textAdParameters->setAd($overridingAd); + $applyRecommendationOperation->setTextAd($textAdParameters); + */ + // Issues a mutate request to apply the recommendation. + $recommendationServiceClient = $googleAdsClient->getRecommendationServiceClient(); + $response = $recommendationServiceClient->applyRecommendation( + $customerId, + [$applyRecommendationOperation] + ); + /** @var Recommendation $appliedRecommendation */ + $appliedRecommendation = $response->getResults()[0]; + + printf( + "Applied recommendation with resource name: '%s'.%s", + $appliedRecommendation->getResourceName(), + PHP_EOL + ); + } +} + +ApplyRecommendation::main(); diff --git a/examples/Recommendations/GetTextAdRecommendations.php b/examples/Recommendations/GetTextAdRecommendations.php new file mode 100644 index 000000000..3359e1a48 --- /dev/null +++ b/examples/Recommendations/GetTextAdRecommendations.php @@ -0,0 +1,157 @@ + GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $customerId) + { + $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient(); + // Creates a query that retrieves recommendations for text ads. + $query = 'SELECT recommendation.type, recommendation.campaign, ' + . 'recommendation.text_ad_recommendation ' + . 'FROM recommendation ' + . 'WHERE recommendation.type = TEXT_AD'; + + // Issues a search request by specifying page size. + $response = + $googleAdsServiceClient->search($customerId, $query, ['pageSize' => self::PAGE_SIZE]); + + // Iterates over all rows in all pages and prints the requested field values for + // the recommendation in each row. + foreach ($response->iterateAllElements() as $googleAdsRow) { + /** @var GoogleAdsRow $googleAdsRow */ + $recommendation = $googleAdsRow->getRecommendation(); + printf( + "Recommendation with resource name '%s' was found for campaign " + . "with resource name '%s':%s", + $recommendation->getResourceName(), + $recommendation->getCampaign()->getValue(), + PHP_EOL + ); + $recommendedAd = $recommendation->getTextAdRecommendation()->getAd(); + if (!is_null($recommendedAd->getExpandedTextAd())) { + $recommendedExpandedTextAd = $recommendedAd->getExpandedTextAd(); + printf( + "\tHeadline part 1 is '%s'.%s", + $recommendedExpandedTextAd->getHeadlinePart1()->getValue(), + PHP_EOL + ); + printf( + "\tHeadline part 2 is '%s'.%s", + $recommendedExpandedTextAd->getHeadlinePart2()->getValue(), + PHP_EOL + ); + printf( + "\tDescription is '%s'%s", + $recommendedExpandedTextAd->getDescription()->getValue(), + PHP_EOL + ); + } + if (!is_null($recommendedAd->getDisplayUrl())) { + printf( + "\tDisplay URL is '%s'.%s", + $recommendedAd->getDisplayUrl()->getValue(), + PHP_EOL + ); + } + foreach ($recommendedAd->getFinalUrls() as $finalUrl) { + /** @var StringValue $finalUrl */ + printf("\tFinal URL is '%s'.%s", $finalUrl->getValue(), PHP_EOL); + } + foreach ($recommendedAd->getFinalMobileUrls() as $finalMobileUrl) { + /** @var StringValue $finalMobileUrl */ + printf("\tFinal Mobile URL is '%s'.%s", $finalMobileUrl->getValue(), PHP_EOL); + } + } + } +} + +GetTextAdRecommendations::main(); diff --git a/examples/Reporting/GetKeywordStats.php b/examples/Reporting/GetKeywordStats.php new file mode 100644 index 000000000..b5d8ca2b5 --- /dev/null +++ b/examples/Reporting/GetKeywordStats.php @@ -0,0 +1,161 @@ + GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $customerId) + { + $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient(); + // Creates a query that retrieves all keyword statistics. + $query = + "SELECT campaign.id, " + . "campaign.name, " + . "ad_group.id, " + . "ad_group.name, " + . "ad_group_criterion.criterion_id, " + . "ad_group_criterion.keyword.text, " + . "ad_group_criterion.keyword.match_type, " + . "metrics.impressions, " + . "metrics.clicks, " + . "metrics.cost_micros " + . "FROM keyword_view " + . "WHERE date DURING LAST_7_DAYS " + . "AND campaign.advertising_channel_type = 'SEARCH' " + . "AND ad_group.status = 'ENABLED' " + . "AND ad_group_criterion.status IN ('ENABLED', 'PAUSED') " + // Limits to the 50 keywords with the most impressions in the date range. + . "ORDER BY metrics.impressions DESC " + . "LIMIT 50"; + + // Issues a search request by specifying page size. + $response = + $googleAdsServiceClient->search($customerId, $query, ['pageSize' => self::PAGE_SIZE]); + + // Iterates over all rows in all pages and prints the requested field values for + // the keyword in each row. + foreach ($response->iterateAllElements() as $googleAdsRow) { + /** @var GoogleAdsRow $googleAdsRow */ + $campaign = $googleAdsRow->getCampaign(); + $adGroup = $googleAdsRow->getAdGroup(); + $adGroupCriterion = $googleAdsRow->getAdGroupCriterion(); + $metrics = $googleAdsRow->getMetrics(); + // A mapping of enum names to values for keyword match type can be found in: + // KeywordMatchTypeEnum_KeywordMatchType.php + printf( + "Keyword text '%s' with " + . "match type %d " + . "and ID %d " + . "in ad group '%s' " + . "with ID %d " + . "in campaign '%s' " + . "with ID %d " + . "had %d impression(s), " + . "%d click(s), " + . "and %d cost (in micros) " + . "during the last 7 days.%s", + $adGroupCriterion->getKeyword()->getText()->getValue(), + $adGroupCriterion->getKeyword()->getMatchType(), + $adGroupCriterion->getCriterionId()->getValue(), + $adGroup->getName()->getValue(), + $adGroup->getId()->getValue(), + $campaign->getName()->getValue(), + $campaign->getId()->getValue(), + $metrics->getImpressions()->getValue(), + $metrics->getClicks()->getValue(), + $metrics->getCostMicros()->getValue(), + PHP_EOL + ); + } + } +} + +GetKeywordStats::main(); diff --git a/examples/Targeting/AddCampaignTargetingCriteria.php b/examples/Targeting/AddCampaignTargetingCriteria.php new file mode 100644 index 000000000..7a39b0b36 --- /dev/null +++ b/examples/Targeting/AddCampaignTargetingCriteria.php @@ -0,0 +1,165 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CAMPAIGN_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder())->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::CAMPAIGN_ID] ?: self::CAMPAIGN_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $campaignId the campaign ID to add a criterion to + */ + public static function runExample( + GoogleAdsClient $googleAdsClient, + $customerId, + $campaignId + ) { + // Creates a keyword with BROAD match type. + $wrappedKeywordText1 = new StringValue(); + $wrappedKeywordText1->setValue('jupiter cruise'); + $keywordInfo1 = new KeywordInfo(); + $keywordInfo1->setText($wrappedKeywordText1); + $keywordInfo1->setMatchType(KeywordMatchTypeEnum_KeywordMatchType::BROAD); + // Constructs a campaign criterion for the specified campaign ID using the keyword text + // info above. + $campaignCriterion1 = new CampaignCriterion(); + $wrappedCampaignResourceName = new StringValue(); + $wrappedCampaignResourceName->setValue( + ResourceNames::forCampaign($customerId, $campaignId) + ); + $campaignCriterion1->setCampaign($wrappedCampaignResourceName); + $campaignCriterion1->setKeyword($keywordInfo1); + // Sets the campaign criterion as a negative criterion. + $wrappedNegativeValue = new BoolValue(); + $wrappedNegativeValue->setValue(true); + $campaignCriterion1->setNegative($wrappedNegativeValue); + // Creates a campaign criterion operation for the created campaign criterion. + $campaignCriterionOperation1 = new CampaignCriterionOperation(); + $campaignCriterionOperation1->setCreate($campaignCriterion1); + + // Creates another keyword with PHRASE type. + $wrappedKeywordText2 = new StringValue(); + $wrappedKeywordText2->setValue('mars cruise'); + $keywordInfo2 = new KeywordInfo(); + $keywordInfo2->setText($wrappedKeywordText2); + $keywordInfo2->setMatchType(KeywordMatchTypeEnum_KeywordMatchType::PHRASE); + // Constructs a campaign criterion for the specified campaign ID using the keyword text + // info above. + $campaignCriterion2 = new CampaignCriterion(); + $campaignCriterion2->setCampaign($wrappedCampaignResourceName); + $campaignCriterion2->setKeyword($keywordInfo2); + // Sets the campaign criterion as a negative criterion. + $campaignCriterion2->setNegative($wrappedNegativeValue); + // Creates a campaign criterion operation for the created campaign criterion. + $campaignCriterionOperation2 = new CampaignCriterionOperation(); + $campaignCriterionOperation2->setCreate($campaignCriterion2); + + // Issues a mutate request to add the campaign criterion. + $campaignCriterionServiceClient = $googleAdsClient->getCampaignCriterionServiceClient(); + $response = $campaignCriterionServiceClient->mutateCampaignCriteria( + $customerId, + [$campaignCriterionOperation1, $campaignCriterionOperation2] + ); + + printf("Added %d campaign criteria:%s", $response->getResults()->count(), PHP_EOL); + + foreach ($response->getResults() as $addedCampaignCriterion) { + /** @var CampaignCriterion $addedCampaignCriterion */ + print $addedCampaignCriterion->getResourceName() . PHP_EOL; + } + } +} + +AddCampaignTargetingCriteria::main(); diff --git a/examples/Targeting/GetCampaignTargetingCriteria.php b/examples/Targeting/GetCampaignTargetingCriteria.php new file mode 100644 index 000000000..2d5789197 --- /dev/null +++ b/examples/Targeting/GetCampaignTargetingCriteria.php @@ -0,0 +1,144 @@ + GetOpt::REQUIRED_ARGUMENT, + ArgumentNames::CAMPAIGN_ID => GetOpt::REQUIRED_ARGUMENT + ]); + + // Generate a refreshable OAuth2 credential for authentication. + $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build(); + + // Construct a Google Ads client configured from a properties file and the + // OAuth2 credentials above. + $googleAdsClient = (new GoogleAdsClientBuilder()) + ->fromFile() + ->withOAuth2Credential($oAuth2Credential) + ->build(); + + try { + self::runExample( + $googleAdsClient, + $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID, + $options[ArgumentNames::CAMPAIGN_ID] ?: self::CAMPAIGN_ID + ); + } catch (GoogleAdsException $googleAdsException) { + printf( + "Request with ID '%s' has failed.%sGoogle Ads failure details:%s", + $googleAdsException->getRequestId(), + PHP_EOL, + PHP_EOL + ); + foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) { + /** @var GoogleAdsError $error */ + printf( + "\t%s: %s%s", + $error->getErrorCode()->getErrorCode(), + $error->getMessage(), + PHP_EOL + ); + } + } catch (ApiException $apiException) { + printf( + "ApiException was thrown with message '%s'.%s", + $apiException->getMessage(), + PHP_EOL + ); + } + } + + /** + * Runs the example. + * + * @param GoogleAdsClient $googleAdsClient the Google Ads API client + * @param int $customerId the client customer ID without hyphens + * @param int $campaignId the campaign ID for which campaign criteria will be retrieved + */ + public static function runExample(GoogleAdsClient $googleAdsClient, $customerId, $campaignId) + { + $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient(); + // Creates a query that retrieves campaign criteria. + $query = 'SELECT campaign.id, campaign_criterion.campaign, ' + . 'campaign_criterion.criterion_id, campaign_criterion.type, ' + . 'campaign_criterion.negative, campaign_criterion.keyword.text, ' + . 'campaign_criterion.keyword.match_type FROM campaign_criterion' + . ' WHERE campaign.id = ' . $campaignId; + + // Issues a search request by specifying page size. + $response = + $googleAdsServiceClient->search($customerId, $query, ['pageSize' => self::PAGE_SIZE]); + + // Iterates over all rows in all pages and prints the requested field values for + // the campaign criterion in each row. + foreach ($response->iterateAllElements() as $googleAdsRow) { + /** @var GoogleAdsRow $googleAdsRow */ + $campaignCriterion = $googleAdsRow->getCampaignCriterion(); + // Note that the match type printed below is an enum value. + // For example, a value of 4 will be returned when the keyword match type is 'BROAD'. + // A mapping of enum names to values can be found in: + // Match type enum class: KeywordMatchTypeEnum_KeywordMatchType.php + printf( + "Campaign criterion with ID %d was found as a %s", + $campaignCriterion->getCriterionId()->getValue(), + $campaignCriterion->getNegative()->getValue() ? 'negative ' : '' + ); + if ($campaignCriterion->getType() === CriterionTypeEnum_CriterionType::KEYWORD) { + printf( + "keyword with text '%s' and match type %d.%s", + $campaignCriterion->getKeyword()->getText()->getValue(), + $campaignCriterion->getKeyword()->getMatchType(), + PHP_EOL + ); + } else { + print 'non-keyword.' . PHP_EOL; + } + } + } +} + +GetCampaignTargetingCriteria::main(); diff --git a/examples/Utils/ArgumentNames.php b/examples/Utils/ArgumentNames.php new file mode 100644 index 000000000..ad76f18ab --- /dev/null +++ b/examples/Utils/ArgumentNames.php @@ -0,0 +1,52 @@ + 'The ad ID', + self::AD_GROUP_ID => 'The ad group ID', + self::ARTIFACT_NAME => 'The artifact name', + self::CAMPAIGN_BUDGET_ID => 'The campaign budget ID', + self::CAMPAIGN_ID => 'The campaign ID', + self::CPC_BID_MICRO_AMOUNT => 'The CPC bid micro amount', + self::CRITERION_ID => 'The criterion ID', + self::CUSTOMER_ID => 'The customer ID without dashes', + self::HOTEL_CENTER_ACCOUNT_ID => 'The hotel center account ID', + self::CHECK_IN_DAY_CRITERION_ID => 'The hotel check-in day criterion ID', + self::KEYWORD_TEXT => 'The keyword text', + self::RECOMMENDATION_ID => 'The recommendation ID' + ]; +} diff --git a/examples/Utils/ArgumentParser.php b/examples/Utils/ArgumentParser.php new file mode 100644 index 000000000..6c6780fcd --- /dev/null +++ b/examples/Utils/ArgumentParser.php @@ -0,0 +1,95 @@ +addOption(['h', 'help', GetOpt::NO_ARGUMENT, 'Show this help and quit']); + foreach ($argumentNames as $argumentName => $argumentType) { + $normalizedOptions[$argumentName] = null; + // Adds an option for an argument using a long option name only. + $getOpt->addOption([ + null, + $argumentName, + $argumentType, + ArgumentNames::$ARGUMENTS_TO_DESCRIPTIONS[$argumentName] + ]); + + if ($argumentType === GetOpt::REQUIRED_ARGUMENT) { + $numRequiredArguments++; + } + } + + // Parse arguments and catch exceptions. + try { + $getOpt->process(); + } catch (ArgumentException $exception) { + // When there are any errors regarding arguments, such as invalid argument names, or + // specifying required arguments but not providing values, 'ArgumentException' will + // be thrown. Show the help text in these cases. + fwrite(STDERR, $exception->getMessage() . PHP_EOL); + echo PHP_EOL . $getOpt->getHelpText(); + exit; + } + // Show help text when requested. + if (!is_null($getOpt->getOption('help'))) { + echo PHP_EOL . $getOpt->getHelpText(); + exit; + } + + $numPassedRequiredArguments = 0; + foreach ($getOpt->getOptions() as $optionName => $optionValue) { + if ($argumentNames[$optionName] === GetOpt::REQUIRED_ARGUMENT) { + $numPassedRequiredArguments++; + } + $normalizedOptions[$optionName] = $optionValue; + } + // Don't allow the case when optional arguments are passed, but required arguments are not. + if (count($getOpt->getOptions()) > 0 + && $numPassedRequiredArguments !== $numRequiredArguments) { + fwrite( + STDERR, + 'All required arguments must be specified.' . PHP_EOL + ); + echo PHP_EOL . $getOpt->getHelpText(); + exit; + } + return $normalizedOptions; + } +} diff --git a/metadata/Google/Ads/GoogleAds/V0/Common/Ad.php b/metadata/Google/Ads/GoogleAds/V0/Common/Ad.php new file mode 100644 index 000000000..38ac101ea --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Common/Ad.php @@ -0,0 +1,116 @@ +internalAddGeneratedFile(hex2bin( + "0afd140a27676f6f676c652f6164732f676f6f676c656164732f76302f63" . + "6f6d6d6f6e2f61642e70726f746f121e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e636f6d6d6f6e1a2b676f6f676c652f6164732f67" . + "6f6f676c656164732f76302f656e756d732f61645f747970652e70726f74" . + "6f1a1e676f6f676c652f70726f746f6275662f77726170706572732e7072" . + "6f746f22ca070a02416412270a02696418012001280b321b2e676f6f676c" . + "652e70726f746f6275662e496e74363456616c756512300a0a66696e616c" . + "5f75726c7318022003280b321c2e676f6f676c652e70726f746f6275662e" . + "537472696e6756616c756512370a1166696e616c5f6d6f62696c655f7572" . + "6c7318102003280b321c2e676f6f676c652e70726f746f6275662e537472" . + "696e6756616c7565123b0a15747261636b696e675f75726c5f74656d706c" . + "617465180c2001280b321c2e676f6f676c652e70726f746f6275662e5374" . + "72696e6756616c7565124e0a1575726c5f637573746f6d5f706172616d65" . + "74657273180a2003280b322f2e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e636f6d6d6f6e2e437573746f6d506172616d6574657212" . + "310a0b646973706c61795f75726c18042001280b321c2e676f6f676c652e" . + "70726f746f6275662e537472696e6756616c7565123e0a04747970651805" . + "2001280e32302e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e656e756d732e416454797065456e756d2e416454797065123d0a077465" . + "78745f616418062001280b322a2e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e636f6d6d6f6e2e546578744164496e666f4800124e0a" . + "10657870616e6465645f746578745f616418072001280b32322e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e636f6d6d6f6e2e457870" . + "616e646564546578744164496e666f480012500a1164796e616d69635f73" . + "65617263685f616418082001280b32332e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e636f6d6d6f6e2e44796e616d69635365617263" . + "684164496e666f480012580a15726573706f6e736976655f646973706c61" . + "795f616418092001280b32372e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e636f6d6d6f6e2e526573706f6e73697665446973706c61" . + "794164496e666f480012460a0c63616c6c5f6f6e6c795f6164180d200128" . + "0b322e2e676f6f676c652e6164732e676f6f676c656164732e76302e636f" . + "6d6d6f6e2e43616c6c4f6e6c794164496e666f480012610a1a657870616e" . + "6465645f64796e616d69635f7365617263685f6164180e2001280b323b2e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e636f6d6d6f6e" . + "2e457870616e64656444796e616d69635365617263684164496e666f4800" . + "123f0a08686f74656c5f6164180f2001280b322b2e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e636f6d6d6f6e2e486f74656c416449" . + "6e666f480042090a0761645f6461746122a4010a0a546578744164496e66" . + "6f122e0a08686561646c696e6518012001280b321c2e676f6f676c652e70" . + "726f746f6275662e537472696e6756616c756512320a0c64657363726970" . + "74696f6e3118022001280b321c2e676f6f676c652e70726f746f6275662e" . + "537472696e6756616c756512320a0c6465736372697074696f6e32180320" . + "01280b321c2e676f6f676c652e70726f746f6275662e537472696e675661" . + "6c7565228d020a12457870616e646564546578744164496e666f12340a0e" . + "686561646c696e655f706172743118012001280b321c2e676f6f676c652e" . + "70726f746f6275662e537472696e6756616c756512340a0e686561646c69" . + "6e655f706172743218022001280b321c2e676f6f676c652e70726f746f62" . + "75662e537472696e6756616c756512310a0b6465736372697074696f6e18" . + "032001280b321c2e676f6f676c652e70726f746f6275662e537472696e67" . + "56616c7565122b0a05706174683118042001280b321c2e676f6f676c652e" . + "70726f746f6275662e537472696e6756616c7565122b0a05706174683218" . + "052001280b321c2e676f6f676c652e70726f746f6275662e537472696e67" . + "56616c7565227d0a1344796e616d69635365617263684164496e666f1232" . + "0a0c6465736372697074696f6e3118012001280b321c2e676f6f676c652e" . + "70726f746f6275662e537472696e6756616c756512320a0c646573637269" . + "7074696f6e3218022001280b321c2e676f6f676c652e70726f746f627566" . + "2e537472696e6756616c756522ec010a17526573706f6e73697665446973" . + "706c61794164496e666f12340a0e73686f72745f686561646c696e651801" . + "2001280b321c2e676f6f676c652e70726f746f6275662e537472696e6756" . + "616c756512330a0d6c6f6e675f686561646c696e6518022001280b321c2e" . + "676f6f676c652e70726f746f6275662e537472696e6756616c756512310a" . + "0b6465736372697074696f6e18032001280b321c2e676f6f676c652e7072" . + "6f746f6275662e537472696e6756616c756512330a0d627573696e657373" . + "5f6e616d6518042001280b321c2e676f6f676c652e70726f746f6275662e" . + "537472696e6756616c756522c9030a0e43616c6c4f6e6c794164496e666f" . + "12320a0c636f756e7472795f636f646518012001280b321c2e676f6f676c" . + "652e70726f746f6275662e537472696e6756616c756512320a0c70686f6e" . + "655f6e756d62657218022001280b321c2e676f6f676c652e70726f746f62" . + "75662e537472696e6756616c756512330a0d627573696e6573735f6e616d" . + "6518032001280b321c2e676f6f676c652e70726f746f6275662e53747269" . + "6e6756616c756512320a0c6465736372697074696f6e3118042001280b32" . + "1c2e676f6f676c652e70726f746f6275662e537472696e6756616c756512" . + "320a0c6465736372697074696f6e3218052001280b321c2e676f6f676c65" . + "2e70726f746f6275662e537472696e6756616c756512300a0c63616c6c5f" . + "747261636b656418062001280b321a2e676f6f676c652e70726f746f6275" . + "662e426f6f6c56616c7565123b0a1764697361626c655f63616c6c5f636f" . + "6e76657273696f6e18072001280b321a2e676f6f676c652e70726f746f62" . + "75662e426f6f6c56616c756512430a1d70686f6e655f6e756d6265725f76" . + "6572696669636174696f6e5f75726c18082001280b321c2e676f6f676c65" . + "2e70726f746f6275662e537472696e6756616c756522500a1b457870616e" . + "64656444796e616d69635365617263684164496e666f12310a0b64657363" . + "72697074696f6e18012001280b321c2e676f6f676c652e70726f746f6275" . + "662e537472696e6756616c7565220d0a0b486f74656c4164496e666f42bd" . + "010a22636f6d2e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e636f6d6d6f6e4207416450726f746f50015a44676f6f676c652e676f6c" . + "616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f6164" . + "732f676f6f676c656164732f76302f636f6d6d6f6e3b636f6d6d6f6ea202" . + "03474141aa021e476f6f676c652e4164732e476f6f676c654164732e5630" . + "2e436f6d6d6f6eca021e476f6f676c655c4164735c476f6f676c65416473" . + "5c56305c436f6d6d6f6e620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Common/Bidding.php b/metadata/Google/Ads/GoogleAds/V0/Common/Bidding.php new file mode 100644 index 000000000..88357da1a --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Common/Bidding.php @@ -0,0 +1,86 @@ +internalAddGeneratedFile(hex2bin( + "0aa00e0a2c676f6f676c652f6164732f676f6f676c656164732f76302f63" . + "6f6d6d6f6e2f62696464696e672e70726f746f121e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e636f6d6d6f6e1a1e676f6f676c652f" . + "70726f746f6275662f77726170706572732e70726f746f220d0a0b456e68" . + "616e63656443706322450a094d616e75616c43706312380a14656e68616e" . + "6365645f6370635f656e61626c656418012001280b321a2e676f6f676c65" . + "2e70726f746f6275662e426f6f6c56616c7565220b0a094d616e75616c43" . + "706d22150a134d6178696d697a65436f6e76657273696f6e73224c0a174d" . + "6178696d697a65436f6e76657273696f6e56616c756512310a0b74617267" . + "65745f726f617318012001280b321c2e676f6f676c652e70726f746f6275" . + "662e446f75626c6556616c756522c6030a0f506167654f6e6550726f6d6f" . + "74656412710a0d73747261746567795f676f616c18012001280e325a2e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e656e756d732e50" . + "6167654f6e6550726f6d6f7465645374726174656779476f616c456e756d" . + "2e506167654f6e6550726f6d6f7465645374726174656779476f616c123b" . + "0a166370635f6269645f6365696c696e675f6d6963726f7318022001280b" . + "321b2e676f6f676c652e70726f746f6275662e496e74363456616c756512" . + "320a0c6269645f6d6f64696669657218032001280b321c2e676f6f676c65" . + "2e70726f746f6275662e446f75626c6556616c756512370a136f6e6c795f" . + "72616973655f6370635f6269647318042001280b321a2e676f6f676c652e" . + "70726f746f6275662e426f6f6c56616c756512490a2572616973655f6370" . + "635f6269645f7768656e5f6275646765745f636f6e73747261696e656418" . + "052001280b321a2e676f6f676c652e70726f746f6275662e426f6f6c5661" . + "6c7565124b0a2772616973655f6370635f6269645f7768656e5f7175616c" . + "6974795f73636f72655f69735f6c6f7718062001280b321a2e676f6f676c" . + "652e70726f746f6275662e426f6f6c56616c756522bb010a095461726765" . + "7443706112360a117461726765745f6370615f6d6963726f731801200128" . + "0b321b2e676f6f676c652e70726f746f6275662e496e74363456616c7565" . + "123b0a166370635f6269645f6365696c696e675f6d6963726f7318022001" . + "280b321b2e676f6f676c652e70726f746f6275662e496e74363456616c75" . + "6512390a146370635f6269645f666c6f6f725f6d6963726f731803200128" . + "0b321b2e676f6f676c652e70726f746f6275662e496e74363456616c7565" . + "22d2020a125461726765744f757472616e6b536861726512400a1b746172" . + "6765745f6f757472616e6b5f73686172655f6d6963726f7318012001280b" . + "321b2e676f6f676c652e70726f746f6275662e496e74333256616c756512" . + "370a11636f6d70657469746f725f646f6d61696e18022001280b321c2e67" . + "6f6f676c652e70726f746f6275662e537472696e6756616c7565123b0a16" . + "6370635f6269645f6365696c696e675f6d6963726f7318032001280b321b" . + "2e676f6f676c652e70726f746f6275662e496e74363456616c756512370a" . + "136f6e6c795f72616973655f6370635f6269647318042001280b321a2e67" . + "6f6f676c652e70726f746f6275662e426f6f6c56616c7565124b0a277261" . + "6973655f6370635f6269645f7768656e5f7175616c6974795f73636f7265" . + "5f69735f6c6f7718052001280b321a2e676f6f676c652e70726f746f6275" . + "662e426f6f6c56616c756522b7010a0a546172676574526f617312310a0b" . + "7461726765745f726f617318012001280b321c2e676f6f676c652e70726f" . + "746f6275662e446f75626c6556616c7565123b0a166370635f6269645f63" . + "65696c696e675f6d6963726f7318022001280b321b2e676f6f676c652e70" . + "726f746f6275662e496e74363456616c756512390a146370635f6269645f" . + "666c6f6f725f6d6963726f7318032001280b321b2e676f6f676c652e7072" . + "6f746f6275662e496e74363456616c75652284010a0b5461726765745370" . + "656e6412380a137461726765745f7370656e645f6d6963726f7318012001" . + "280b321b2e676f6f676c652e70726f746f6275662e496e74363456616c75" . + "65123b0a166370635f6269645f6365696c696e675f6d6963726f73180220" . + "01280b321b2e676f6f676c652e70726f746f6275662e496e74363456616c" . + "756542c2010a22636f6d2e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e636f6d6d6f6e420c42696464696e6750726f746f50015a4467" . + "6f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f67" . + "6c65617069732f6164732f676f6f676c656164732f76302f636f6d6d6f6e" . + "3b636f6d6d6f6ea20203474141aa021e476f6f676c652e4164732e476f6f" . + "676c654164732e56302e436f6d6d6f6eca021e476f6f676c655c4164735c" . + "476f6f676c654164735c56305c436f6d6d6f6e620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Common/Criteria.php b/metadata/Google/Ads/GoogleAds/V0/Common/Criteria.php new file mode 100644 index 000000000..28c4482f0 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Common/Criteria.php @@ -0,0 +1,106 @@ +internalAddGeneratedFile(hex2bin( + "0aa4120a2d676f6f676c652f6164732f676f6f676c656164732f76302f63" . + "6f6d6d6f6e2f63726974657269612e70726f746f121e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e636f6d6d6f6e1a42676f6f676c65" . + "2f6164732f676f6f676c656164732f76302f656e756d732f6c697374696e" . + "675f637573746f6d5f6174747269627574655f696e6465782e70726f746f" . + "1a36676f6f676c652f6164732f676f6f676c656164732f76302f656e756d" . + "732f6c697374696e675f67726f75705f747970652e70726f746f1a1e676f" . + "6f676c652f70726f746f6275662f77726170706572732e70726f746f2293" . + "010a0b4b6579776f7264496e666f122a0a047465787418012001280b321c" . + "2e676f6f676c652e70726f746f6275662e537472696e6756616c75651258" . + "0a0a6d617463685f7479706518022001280e32442e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e656e756d732e4b6579776f72644d61" . + "74636854797065456e756d2e4b6579776f72644d6174636854797065220e" . + "0a0c4c6f636174696f6e496e666f220e0a0c506c6174666f726d496e666f" . + "22ea010a104c697374696e6747726f7570496e666f12520a047479706518" . + "012001280e32442e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e656e756d732e4c697374696e6747726f757054797065456e756d2e4c" . + "697374696e6747726f75705479706512480a0a636173655f76616c756518" . + "022001280b32342e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e636f6d6d6f6e2e4c697374696e6744696d656e73696f6e496e666f12" . + "380a13706172656e745f637269746572696f6e5f696418032001280b321b" . + "2e676f6f676c652e70726f746f6275662e496e74363456616c756522ba04" . + "0a144c697374696e6744696d656e73696f6e496e666f12490a0d6c697374" . + "696e675f6272616e6418012001280b32302e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e636f6d6d6f6e2e4c697374696e674272616e" . + "64496e666f4800123f0a08686f74656c5f696418022001280b322b2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e636f6d6d6f6e2e48" . + "6f74656c4964496e666f480012450a0b686f74656c5f636c617373180320" . + "01280b322e2e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "636f6d6d6f6e2e486f74656c436c617373496e666f480012560a14686f74" . + "656c5f636f756e7472795f726567696f6e18042001280b32362e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e636f6d6d6f6e2e486f74" . + "656c436f756e747279526567696f6e496e666f480012450a0b686f74656c" . + "5f737461746518052001280b322e2e676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e636f6d6d6f6e2e486f74656c5374617465496e666f" . + "480012430a0a686f74656c5f6369747918062001280b322d2e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e636f6d6d6f6e2e486f7465" . + "6c43697479496e666f4800125e0a186c697374696e675f637573746f6d5f" . + "61747472696275746518072001280b323a2e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e636f6d6d6f6e2e4c697374696e6743757374" . + "6f6d417474726962757465496e666f4800420b0a0964696d656e73696f6e" . + "223f0a104c697374696e674272616e64496e666f122b0a0576616c756518" . + "012001280b321c2e676f6f676c652e70726f746f6275662e537472696e67" . + "56616c7565223a0a0b486f74656c4964496e666f122b0a0576616c756518" . + "012001280b321c2e676f6f676c652e70726f746f6275662e537472696e67" . + "56616c7565223c0a0e486f74656c436c617373496e666f122a0a0576616c" . + "756518012001280b321b2e676f6f676c652e70726f746f6275662e496e74" . + "363456616c756522580a16486f74656c436f756e747279526567696f6e49" . + "6e666f123e0a18636f756e7472795f726567696f6e5f637269746572696f" . + "6e18012001280b321c2e676f6f676c652e70726f746f6275662e53747269" . + "6e6756616c756522470a0e486f74656c5374617465496e666f12350a0f73" . + "746174655f637269746572696f6e18012001280b321c2e676f6f676c652e" . + "70726f746f6275662e537472696e6756616c756522450a0d486f74656c43" . + "697479496e666f12340a0e636974795f637269746572696f6e1801200128" . + "0b321c2e676f6f676c652e70726f746f6275662e537472696e6756616c75" . + "6522b4010a1a4c697374696e67437573746f6d417474726962757465496e" . + "666f122b0a0576616c756518012001280b321c2e676f6f676c652e70726f" . + "746f6275662e537472696e6756616c756512690a05696e64657818022001" . + "280e325a2e676f6f676c652e6164732e676f6f676c656164732e76302e65" . + "6e756d732e4c697374696e67437573746f6d417474726962757465496e64" . + "6578456e756d2e4c697374696e67437573746f6d41747472696275746549" . + "6e646578221c0a1a486f74656c4461746553656c656374696f6e54797065" . + "496e666f227d0a1d486f74656c416476616e6365426f6f6b696e6757696e" . + "646f77496e666f122d0a086d696e5f6461797318012001280b321b2e676f" . + "6f676c652e70726f746f6275662e496e74363456616c7565122d0a086d61" . + "785f6461797318022001280b321b2e676f6f676c652e70726f746f627566" . + "2e496e74363456616c756522790a15486f74656c4c656e6774684f665374" . + "6179496e666f122f0a0a6d696e5f6e696768747318012001280b321b2e67" . + "6f6f676c652e70726f746f6275662e496e74363456616c7565122f0a0a6d" . + "61785f6e696768747318022001280b321b2e676f6f676c652e70726f746f" . + "6275662e496e74363456616c756522150a13486f74656c436865636b496e" . + "446179496e666f42c3010a22636f6d2e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e636f6d6d6f6e420d437269746572696150726f74" . + "6f50015a44676f6f676c652e676f6c616e672e6f72672f67656e70726f74" . + "6f2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f" . + "636f6d6d6f6e3b636f6d6d6f6ea20203474141aa021e476f6f676c652e41" . + "64732e476f6f676c654164732e56302e436f6d6d6f6eca021e476f6f676c" . + "655c4164735c476f6f676c654164735c56305c436f6d6d6f6e620670726f" . + "746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Common/CustomParameter.php b/metadata/Google/Ads/GoogleAds/V0/Common/CustomParameter.php new file mode 100644 index 000000000..2b435f225 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Common/CustomParameter.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0a97030a35676f6f676c652f6164732f676f6f676c656164732f76302f63" . + "6f6d6d6f6e2f637573746f6d5f706172616d657465722e70726f746f121e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e636f6d6d6f6e" . + "22690a0f437573746f6d506172616d6574657212290a036b657918012001" . + "280b321c2e676f6f676c652e70726f746f6275662e537472696e6756616c" . + "7565122b0a0576616c756518022001280b321c2e676f6f676c652e70726f" . + "746f6275662e537472696e6756616c756542ca010a22636f6d2e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e636f6d6d6f6e42144375" . + "73746f6d506172616d6574657250726f746f50015a44676f6f676c652e67" . + "6f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f" . + "6164732f676f6f676c656164732f76302f636f6d6d6f6e3b636f6d6d6f6e" . + "a20203474141aa021e476f6f676c652e4164732e476f6f676c654164732e" . + "56302e436f6d6d6f6eca021e476f6f676c655c4164735c476f6f676c6541" . + "64735c56305c436f6d6d6f6e620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Common/Metrics.php b/metadata/Google/Ads/GoogleAds/V0/Common/Metrics.php new file mode 100644 index 000000000..68ee687e9 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Common/Metrics.php @@ -0,0 +1,119 @@ +internalAddGeneratedFile(hex2bin( + "0a95160a2c676f6f676c652f6164732f676f6f676c656164732f76302f63" . + "6f6d6d6f6e2f6d6574726963732e70726f746f121e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e636f6d6d6f6e22f7130a074d657472" . + "69637312390a13616c6c5f636f6e76657273696f6e5f7261746518052001" . + "280b321c2e676f6f676c652e70726f746f6275662e446f75626c6556616c" . + "7565123a0a14616c6c5f636f6e76657273696f6e5f76616c756518062001" . + "280b321c2e676f6f676c652e70726f746f6275662e446f75626c6556616c" . + "756512350a0f616c6c5f636f6e76657273696f6e7318072001280b321c2e" . + "676f6f676c652e70726f746f6275662e446f75626c6556616c756512440a" . + "1e616c6c5f636f6e76657273696f6e735f76616c75655f7065725f636f73" . + "74183e2001280b321c2e676f6f676c652e70726f746f6275662e446f7562" . + "6c6556616c7565124b0a25616c6c5f636f6e76657273696f6e735f76616c" . + "75655f7065725f696e746572616374696f6e183d2001280b321c2e676f6f" . + "676c652e70726f746f6275662e446f75626c6556616c756512320a0c6176" . + "65726167655f636f737418082001280b321c2e676f6f676c652e70726f74" . + "6f6275662e446f75626c6556616c756512310a0b617665726167655f6370" . + "6318092001280b321c2e676f6f676c652e70726f746f6275662e446f7562" . + "6c6556616c756512310a0b617665726167655f63706d180a2001280b321c" . + "2e676f6f676c652e70726f746f6275662e446f75626c6556616c75651236" . + "0a10617665726167655f706f736974696f6e180d2001280b321c2e676f6f" . + "676c652e70726f746f6275662e446f75626c6556616c756512310a0b626f" . + "756e63655f72617465180f2001280b321c2e676f6f676c652e70726f746f" . + "6275662e446f75626c6556616c7565122b0a06636c69636b731813200128" . + "0b321b2e676f6f676c652e70726f746f6275662e496e74363456616c7565" . + "124a0a24636f6e74656e745f6275646765745f6c6f73745f696d70726573" . + "73696f6e5f736861726518142001280b321c2e676f6f676c652e70726f74" . + "6f6275662e446f75626c6556616c7565123e0a18636f6e74656e745f696d" . + "7072657373696f6e5f736861726518152001280b321c2e676f6f676c652e" . + "70726f746f6275662e446f75626c6556616c756512480a22636f6e74656e" . + "745f72616e6b5f6c6f73745f696d7072657373696f6e5f73686172651816" . + "2001280b321c2e676f6f676c652e70726f746f6275662e446f75626c6556" . + "616c756512350a0f636f6e76657273696f6e5f7261746518172001280b32" . + "1c2e676f6f676c652e70726f746f6275662e446f75626c6556616c756512" . + "360a10636f6e76657273696f6e5f76616c756518182001280b321c2e676f" . + "6f676c652e70726f746f6275662e446f75626c6556616c7565123f0a1963" . + "6f6e76657273696f6e5f76616c75655f7065725f636f737418402001280b" . + "321c2e676f6f676c652e70726f746f6275662e446f75626c6556616c7565" . + "12460a20636f6e76657273696f6e5f76616c75655f7065725f696e746572" . + "616374696f6e183f2001280b321c2e676f6f676c652e70726f746f627566" . + "2e446f75626c6556616c756512310a0b636f6e76657273696f6e73181920" . + "01280b321c2e676f6f676c652e70726f746f6275662e446f75626c655661" . + "6c756512300a0b636f73745f6d6963726f73181a2001280b321b2e676f6f" . + "676c652e70726f746f6275662e496e74363456616c7565123d0a17636f73" . + "745f7065725f616c6c5f636f6e76657273696f6e181b2001280b321c2e67" . + "6f6f676c652e70726f746f6275662e446f75626c6556616c756512390a13" . + "636f73745f7065725f636f6e76657273696f6e181c2001280b321c2e676f" . + "6f676c652e70726f746f6275662e446f75626c6556616c7565123e0a1863" . + "726f73735f6465766963655f636f6e76657273696f6e73181d2001280b32" . + "1c2e676f6f676c652e70726f746f6275662e446f75626c6556616c756512" . + "290a03637472181e2001280b321c2e676f6f676c652e70726f746f627566" . + "2e446f75626c6556616c756512350a0f656e676167656d656e745f726174" . + "65181f2001280b321c2e676f6f676c652e70726f746f6275662e446f7562" . + "6c6556616c756512300a0b656e676167656d656e747318202001280b321b" . + "2e676f6f676c652e70726f746f6275662e496e74363456616c756512300a" . + "0b696d7072657373696f6e7318252001280b321b2e676f6f676c652e7072" . + "6f746f6275662e496e74363456616c756512360a10696e74657261637469" . + "6f6e5f7261746518262001280b321c2e676f6f676c652e70726f746f6275" . + "662e446f75626c6556616c756512310a0c696e746572616374696f6e7318" . + "272001280b321b2e676f6f676c652e70726f746f6275662e496e74363456" . + "616c756512380a12696e76616c69645f636c69636b5f7261746518282001" . + "280b321c2e676f6f676c652e70726f746f6275662e446f75626c6556616c" . + "756512330a0e696e76616c69645f636c69636b7318292001280b321b2e67" . + "6f6f676c652e70726f746f6275662e496e74363456616c7565123a0a1470" . + "657263656e745f6e65775f76697369746f7273182a2001280b321c2e676f" . + "6f676c652e70726f746f6275662e446f75626c6556616c756512300a0b70" . + "686f6e655f63616c6c73182b2001280b321b2e676f6f676c652e70726f74" . + "6f6275662e496e74363456616c756512360a1170686f6e655f696d707265" . + "7373696f6e73182c2001280b321b2e676f6f676c652e70726f746f627566" . + "2e496e74363456616c756512380a1270686f6e655f7468726f7567685f72" . + "617465182d2001280b321c2e676f6f676c652e70726f746f6275662e446f" . + "75626c6556616c756512320a0c72656c61746976655f637472182e200128" . + "0b321c2e676f6f676c652e70726f746f6275662e446f75626c6556616c75" . + "6512490a237365617263685f6275646765745f6c6f73745f696d70726573" . + "73696f6e5f7368617265182f2001280b321c2e676f6f676c652e70726f74" . + "6f6275662e446f75626c6556616c756512490a237365617263685f657861" . + "63745f6d617463685f696d7072657373696f6e5f73686172651831200128" . + "0b321c2e676f6f676c652e70726f746f6275662e446f75626c6556616c75" . + "65123d0a177365617263685f696d7072657373696f6e5f73686172651832" . + "2001280b321c2e676f6f676c652e70726f746f6275662e446f75626c6556" . + "616c756512470a217365617263685f72616e6b5f6c6f73745f696d707265" . + "7373696f6e5f736861726518332001280b321c2e676f6f676c652e70726f" . + "746f6275662e446f75626c6556616c7565123f0a1976616c75655f706572" . + "5f616c6c5f636f6e76657273696f6e7318342001280b321c2e676f6f676c" . + "652e70726f746f6275662e446f75626c6556616c7565123a0a1476616c75" . + "655f7065725f636f6e76657273696f6e18352001280b321c2e676f6f676c" . + "652e70726f746f6275662e446f75626c6556616c7565123d0a1876696577" . + "5f7468726f7567685f636f6e76657273696f6e73183c2001280b321b2e67" . + "6f6f676c652e70726f746f6275662e496e74363456616c756542c2010a22" . + "636f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e636f" . + "6d6d6f6e420c4d65747269637350726f746f50015a44676f6f676c652e67" . + "6f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f" . + "6164732f676f6f676c656164732f76302f636f6d6d6f6e3b636f6d6d6f6e" . + "a20203474141aa021e476f6f676c652e4164732e476f6f676c654164732e" . + "56302e436f6d6d6f6eca021e476f6f676c655c4164735c476f6f676c6541" . + "64735c56305c436f6d6d6f6e620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Common/Policy.php b/metadata/Google/Ads/GoogleAds/V0/Common/Policy.php new file mode 100644 index 000000000..13f93a244 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Common/Policy.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0a98030a2b676f6f676c652f6164732f676f6f676c656164732f76302f63" . + "6f6d6d6f6e2f706f6c6963792e70726f746f121e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e636f6d6d6f6e227d0a12506f6c696379" . + "56696f6c6174696f6e4b657912310a0b706f6c6963795f6e616d65180120" . + "01280b321c2e676f6f676c652e70726f746f6275662e537472696e675661" . + "6c756512340a0e76696f6c6174696e675f7465787418022001280b321c2e" . + "676f6f676c652e70726f746f6275662e537472696e6756616c756542c101" . + "0a22636f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "636f6d6d6f6e420b506f6c69637950726f746f50015a44676f6f676c652e" . + "676f6c616e672e6f72672f67656e70726f746f2f676f6f676c6561706973" . + "2f6164732f676f6f676c656164732f76302f636f6d6d6f6e3b636f6d6d6f" . + "6ea20203474141aa021e476f6f676c652e4164732e476f6f676c65416473" . + "2e56302e436f6d6d6f6eca021e476f6f676c655c4164735c476f6f676c65" . + "4164735c56305c436f6d6d6f6e620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Common/Value.php b/metadata/Google/Ads/GoogleAds/V0/Common/Value.php new file mode 100644 index 000000000..17a9631ec --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Common/Value.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0aa1030a2a676f6f676c652f6164732f676f6f676c656164732f76302f63" . + "6f6d6d6f6e2f76616c75652e70726f746f121e676f6f676c652e6164732e" . + "676f6f676c656164732e76302e636f6d6d6f6e2287010a0556616c756512" . + "170a0d626f6f6c65616e5f76616c7565180120012808480012150a0b696e" . + "7436345f76616c7565180220012803480012150a0b666c6f61745f76616c" . + "7565180320012802480012160a0c646f75626c655f76616c756518042001" . + "2801480012160a0c737472696e675f76616c756518052001280948004207" . + "0a0576616c756542c0010a22636f6d2e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e636f6d6d6f6e420a56616c756550726f746f5001" . + "5a44676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f67" . + "6f6f676c65617069732f6164732f676f6f676c656164732f76302f636f6d" . + "6d6f6e3b636f6d6d6f6ea20203474141aa021e476f6f676c652e4164732e" . + "476f6f676c654164732e56302e436f6d6d6f6eca021e476f6f676c655c41" . + "64735c476f6f676c654164735c56305c436f6d6d6f6e620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupAdStatus.php b/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupAdStatus.php new file mode 100644 index 000000000..b406c8966 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupAdStatus.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a95030a36676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f61645f67726f75705f61645f7374617475732e70726f746f12" . + "1d676f6f676c652e6164732e676f6f676c656164732e76302e656e756d73" . + "226c0a13416447726f75704164537461747573456e756d22550a0f416447" . + "726f75704164537461747573120f0a0b554e535045434946494544100012" . + "0b0a07554e4b4e4f574e1001120b0a07454e41424c45441002120a0a0650" . + "41555345441003120b0a0752454d4f564544100442c5010a21636f6d2e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e656e756d734214" . + "416447726f7570416453746174757350726f746f50015a42676f6f676c65" . + "2e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069" . + "732f6164732f676f6f676c656164732f76302f656e756d733b656e756d73" . + "a20203474141aa021d476f6f676c652e4164732e476f6f676c654164732e" . + "56302e456e756d73ca021d476f6f676c655c4164735c476f6f676c654164" . + "735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupCriterionStatus.php b/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupCriterionStatus.php new file mode 100644 index 000000000..eb7b730b2 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupCriterionStatus.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0ab1030a3d676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f61645f67726f75705f637269746572696f6e5f737461747573" . + "2e70726f746f121d676f6f676c652e6164732e676f6f676c656164732e76" . + "302e656e756d73227a0a1a416447726f7570437269746572696f6e537461" . + "747573456e756d225c0a16416447726f7570437269746572696f6e537461" . + "747573120f0a0b554e5350454349464945441000120b0a07554e4b4e4f57" . + "4e1001120b0a07454e41424c45441002120a0a065041555345441003120b" . + "0a0752454d4f564544100442cc010a21636f6d2e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e656e756d73421b416447726f75704372" . + "69746572696f6e53746174757350726f746f50015a42676f6f676c652e67" . + "6f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f" . + "6164732f676f6f676c656164732f76302f656e756d733b656e756d73a202" . + "03474141aa021d476f6f676c652e4164732e476f6f676c654164732e5630" . + "2e456e756d73ca021d476f6f676c655c4164735c476f6f676c654164735c" . + "56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupStatus.php b/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupStatus.php new file mode 100644 index 000000000..8b4ff1a2d --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupStatus.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a8c030a33676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f61645f67726f75705f7374617475732e70726f746f121d676f" . + "6f676c652e6164732e676f6f676c656164732e76302e656e756d7322680a" . + "11416447726f7570537461747573456e756d22530a0d416447726f757053" . + "7461747573120f0a0b554e5350454349464945441000120b0a07554e4b4e" . + "4f574e1001120b0a07454e41424c45441002120a0a065041555345441003" . + "120b0a0752454d4f564544100442c3010a21636f6d2e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e656e756d734212416447726f7570" . + "53746174757350726f746f50015a42676f6f676c652e676f6c616e672e6f" . + "72672f67656e70726f746f2f676f6f676c65617069732f6164732f676f6f" . + "676c656164732f76302f656e756d733b656e756d73a20203474141aa021d" . + "476f6f676c652e4164732e476f6f676c654164732e56302e456e756d73ca" . + "021d476f6f676c655c4164735c476f6f676c654164735c56305c456e756d" . + "73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupType.php new file mode 100644 index 000000000..47f76cb5b --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/AdGroupType.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile(hex2bin( + "0a82030a31676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f61645f67726f75705f747970652e70726f746f121d676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e656e756d7322620a0f41" . + "6447726f757054797065456e756d224f0a0b416447726f75705479706512" . + "0f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e100112" . + "130a0f5345415243485f5354414e444152441002120d0a09484f54454c5f" . + "414453100642c1010a21636f6d2e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e656e756d734210416447726f75705479706550726f74" . + "6f50015a42676f6f676c652e676f6c616e672e6f72672f67656e70726f74" . + "6f2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f" . + "656e756d733b656e756d73a20203474141aa021d476f6f676c652e416473" . + "2e476f6f676c654164732e56302e456e756d73ca021d476f6f676c655c41" . + "64735c476f6f676c654164735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/AdNetworkType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/AdNetworkType.php new file mode 100644 index 000000000..43ebc06d5 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/AdNetworkType.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0abd030a33676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f61645f6e6574776f726b5f747970652e70726f746f121d676f" . + "6f676c652e6164732e676f6f676c656164732e76302e656e756d73229801" . + "0a1141644e6574776f726b54797065456e756d2282010a0d41644e657477" . + "6f726b54797065120f0a0b554e5350454349464945441000120b0a07554e" . + "4b4e4f574e1001120a0a06534541524348100212130a0f5345415243485f" . + "504152544e4552531003120b0a07434f4e54454e54100412120a0e594f55" . + "545542455f534541524348100512110a0d594f55545542455f5741544348" . + "100642c3010a21636f6d2e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e656e756d73421241644e6574776f726b5479706550726f746f" . + "50015a42676f6f676c652e676f6c616e672e6f72672f67656e70726f746f" . + "2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f65" . + "6e756d733b656e756d73a20203474141aa021d476f6f676c652e4164732e" . + "476f6f676c654164732e56302e456e756d73ca021d476f6f676c655c4164" . + "735c476f6f676c654164735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/AdServingOptimizationStatus.php b/metadata/Google/Ads/GoogleAds/V0/Enums/AdServingOptimizationStatus.php new file mode 100644 index 000000000..310321ad6 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/AdServingOptimizationStatus.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile(hex2bin( + "0afe030a42676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f61645f73657276696e675f6f7074696d697a6174696f6e5f73" . + "74617475732e70726f746f121d676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e656e756d7322bc010a1f416453657276696e674f707469" . + "6d697a6174696f6e537461747573456e756d2298010a1b41645365727669" . + "6e674f7074696d697a6174696f6e537461747573120f0a0b554e53504543" . + "49464945441000120b0a07554e4b4e4f574e1001120c0a084f5054494d49" . + "5a45100212170a13434f4e56455253494f4e5f4f5054494d495a45100312" . + "0a0a06524f54415445100412170a13524f544154455f494e444546494e49" . + "54454c591005120f0a0b554e415641494c41424c45100642d1010a21636f" . + "6d2e676f6f676c652e6164732e676f6f676c656164732e76302e656e756d" . + "734220416453657276696e674f7074696d697a6174696f6e537461747573" . + "50726f746f50015a42676f6f676c652e676f6c616e672e6f72672f67656e" . + "70726f746f2f676f6f676c65617069732f6164732f676f6f676c65616473" . + "2f76302f656e756d733b656e756d73a20203474141aa021d476f6f676c65" . + "2e4164732e476f6f676c654164732e56302e456e756d73ca021d476f6f67" . + "6c655c4164735c476f6f676c654164735c56305c456e756d73620670726f" . + "746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/AdType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/AdType.php new file mode 100644 index 000000000..6ec32298c --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/AdType.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile(hex2bin( + "0ae0030a2b676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f61645f747970652e70726f746f121d676f6f676c652e616473" . + "2e676f6f676c656164732e76302e656e756d7322ca010a0a416454797065" . + "456e756d22bb010a06416454797065120f0a0b554e535045434946494544" . + "1000120b0a07554e4b4e4f574e1001120b0a07544558545f414410021214" . + "0a10455850414e4445445f544558545f4144100312150a1144594e414d49" . + "435f5345415243485f4144100412190a15524553504f4e534956455f4449" . + "53504c41595f4144100512100a0c43414c4c5f4f4e4c595f41441006121e" . + "0a1a455850414e4445445f44594e414d49435f5345415243485f41441007" . + "120c0a08484f54454c5f4144100842bc010a21636f6d2e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e656e756d73420b416454797065" . + "50726f746f50015a42676f6f676c652e676f6c616e672e6f72672f67656e" . + "70726f746f2f676f6f676c65617069732f6164732f676f6f676c65616473" . + "2f76302f656e756d733b656e756d73a20203474141aa021d476f6f676c65" . + "2e4164732e476f6f676c654164732e56302e456e756d73ca021d476f6f67" . + "6c655c4164735c476f6f676c654164735c56305c456e756d73620670726f" . + "746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelSubType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelSubType.php new file mode 100644 index 000000000..f403daf9a --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelSubType.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile(hex2bin( + "0ac3030a40676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f6164766572746973696e675f6368616e6e656c5f7375625f74" . + "7970652e70726f746f121d676f6f676c652e6164732e676f6f676c656164" . + "732e76302e656e756d732285010a1d4164766572746973696e674368616e" . + "6e656c53756254797065456e756d22640a194164766572746973696e6743" . + "68616e6e656c53756254797065120f0a0b554e5350454349464945441000" . + "120b0a07554e4b4e4f574e100112150a115345415243485f4d4f42494c45" . + "5f415050100212120a0e5345415243485f45585052455353100442cf010a" . + "21636f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e65" . + "6e756d73421e4164766572746973696e674368616e6e656c537562547970" . + "6550726f746f50015a42676f6f676c652e676f6c616e672e6f72672f6765" . + "6e70726f746f2f676f6f676c65617069732f6164732f676f6f676c656164" . + "732f76302f656e756d733b656e756d73a20203474141aa021d476f6f676c" . + "652e4164732e476f6f676c654164732e56302e456e756d73ca021d476f6f" . + "676c655c4164735c476f6f676c654164735c56305c456e756d7362067072" . + "6f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelType.php new file mode 100644 index 000000000..6a39d7f22 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelType.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0aa1030a3c676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f6164766572746973696e675f6368616e6e656c5f747970652e" . + "70726f746f121d676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e656e756d73226b0a1a4164766572746973696e674368616e6e656c5479" . + "7065456e756d224d0a164164766572746973696e674368616e6e656c5479" . + "7065120f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e" . + "1001120a0a06534541524348100212090a05484f54454c100542cc010a21" . + "636f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e656e" . + "756d73421b4164766572746973696e674368616e6e656c5479706550726f" . + "746f50015a42676f6f676c652e676f6c616e672e6f72672f67656e70726f" . + "746f2f676f6f676c65617069732f6164732f676f6f676c656164732f7630" . + "2f656e756d733b656e756d73a20203474141aa021d476f6f676c652e4164" . + "732e476f6f676c654164732e56302e456e756d73ca021d476f6f676c655c" . + "4164735c476f6f676c654164735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/BiddingSource.php b/metadata/Google/Ads/GoogleAds/V0/Enums/BiddingSource.php new file mode 100644 index 000000000..4fcef6f06 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/BiddingSource.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0aa0030a32676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f62696464696e675f736f757263652e70726f746f121d676f6f" . + "676c652e6164732e676f6f676c656164732e76302e656e756d73227d0a11" . + "42696464696e67536f75726365456e756d22680a0d42696464696e67536f" . + "75726365120f0a0b554e5350454349464945441000120b0a07554e4b4e4f" . + "574e1001120b0a07414447524f55501002120d0a09435249544552494f4e" . + "1003121d0a1943414d504149474e5f42494444494e475f53545241544547" . + "59100542c3010a21636f6d2e676f6f676c652e6164732e676f6f676c6561" . + "64732e76302e656e756d73421242696464696e67536f7572636550726f74" . + "6f50015a42676f6f676c652e676f6c616e672e6f72672f67656e70726f74" . + "6f2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f" . + "656e756d733b656e756d73a20203474141aa021d476f6f676c652e416473" . + "2e476f6f676c654164732e56302e456e756d73ca021d476f6f676c655c41" . + "64735c476f6f676c654164735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/BiddingStrategyType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/BiddingStrategyType.php new file mode 100644 index 000000000..14d1d58e7 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/BiddingStrategyType.php @@ -0,0 +1,43 @@ +internalAddGeneratedFile(hex2bin( + "0acf040a39676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f62696464696e675f73747261746567795f747970652e70726f" . + "746f121d676f6f676c652e6164732e676f6f676c656164732e76302e656e" . + "756d73229e020a1742696464696e67537472617465677954797065456e75" . + "6d2282020a1342696464696e67537472617465677954797065120f0a0b55" . + "4e5350454349464945441000120b0a07554e4b4e4f574e100112100a0c45" . + "4e48414e4345445f4350431002120e0a0a4d414e55414c5f435043100312" . + "0e0a0a4d414e55414c5f43504d100412180a144d4158494d495a455f434f" . + "4e56455253494f4e53100a121d0a194d4158494d495a455f434f4e564552" . + "53494f4e5f56414c5545100b12150a11504147455f4f4e455f50524f4d4f" . + "5445441005120e0a0a5441524745545f435041100612180a145441524745" . + "545f4f555452414e4b5f53484152451007120f0a0b5441524745545f524f" . + "4153100812100a0c5441524745545f5350454e44100942c9010a21636f6d" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e656e756d73" . + "421842696464696e6753747261746567795479706550726f746f50015a42" . + "676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f" . + "676c65617069732f6164732f676f6f676c656164732f76302f656e756d73" . + "3b656e756d73a20203474141aa021d476f6f676c652e4164732e476f6f67" . + "6c654164732e56302e456e756d73ca021d476f6f676c655c4164735c476f" . + "6f676c654164735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/BudgetDeliveryMethod.php b/metadata/Google/Ads/GoogleAds/V0/Enums/BudgetDeliveryMethod.php new file mode 100644 index 000000000..2d9582cf5 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/BudgetDeliveryMethod.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0aa1030a3a676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f6275646765745f64656c69766572795f6d6574686f642e7072" . + "6f746f121d676f6f676c652e6164732e676f6f676c656164732e76302e65" . + "6e756d73226f0a1842756467657444656c69766572794d6574686f64456e" . + "756d22530a1442756467657444656c69766572794d6574686f64120f0a0b" . + "554e5350454349464945441000120b0a07554e4b4e4f574e1001120c0a08" . + "5354414e444152441002120f0a0b414343454c455241544544100342ca01" . + "0a21636f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "656e756d73421942756467657444656c69766572794d6574686f6450726f" . + "746f50015a42676f6f676c652e676f6c616e672e6f72672f67656e70726f" . + "746f2f676f6f676c65617069732f6164732f676f6f676c656164732f7630" . + "2f656e756d733b656e756d73a20203474141aa021d476f6f676c652e4164" . + "732e476f6f676c654164732e56302e456e756d73ca021d476f6f676c655c" . + "4164735c476f6f676c654164735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/BudgetStatus.php b/metadata/Google/Ads/GoogleAds/V0/Enums/BudgetStatus.php new file mode 100644 index 000000000..ee989575c --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/BudgetStatus.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile(hex2bin( + "0afb020a31676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f6275646765745f7374617475732e70726f746f121d676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e656e756d73225a0a1042" . + "7564676574537461747573456e756d22460a0c4275646765745374617475" . + "73120f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e10" . + "01120b0a07454e41424c45441002120b0a0752454d4f564544100342c201" . + "0a21636f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "656e756d73421142756467657453746174757350726f746f50015a42676f" . + "6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c" . + "65617069732f6164732f676f6f676c656164732f76302f656e756d733b65" . + "6e756d73a20203474141aa021d476f6f676c652e4164732e476f6f676c65" . + "4164732e56302e456e756d73ca021d476f6f676c655c4164735c476f6f67" . + "6c654164735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/CampaignServingStatus.php b/metadata/Google/Ads/GoogleAds/V0/Enums/CampaignServingStatus.php new file mode 100644 index 000000000..9992d6dc4 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/CampaignServingStatus.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile(hex2bin( + "0ac5030a3b676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f63616d706169676e5f73657276696e675f7374617475732e70" . + "726f746f121d676f6f676c652e6164732e676f6f676c656164732e76302e" . + "656e756d732290010a1943616d706169676e53657276696e675374617475" . + "73456e756d22730a1543616d706169676e53657276696e67537461747573" . + "120f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e1001" . + "120b0a0753455256494e47100212080a044e4f4e45100312090a05454e44" . + "45441004120b0a0750454e44494e471005120d0a0953555350454e444544" . + "100642cb010a21636f6d2e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e656e756d73421a43616d706169676e53657276696e67537461" . + "74757350726f746f50015a42676f6f676c652e676f6c616e672e6f72672f" . + "67656e70726f746f2f676f6f676c65617069732f6164732f676f6f676c65" . + "6164732f76302f656e756d733b656e756d73a20203474141aa021d476f6f" . + "676c652e4164732e476f6f676c654164732e56302e456e756d73ca021d47" . + "6f6f676c655c4164735c476f6f676c654164735c56305c456e756d736206" . + "70726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/CampaignStatus.php b/metadata/Google/Ads/GoogleAds/V0/Enums/CampaignStatus.php new file mode 100644 index 000000000..9e61d443b --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/CampaignStatus.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a8f030a33676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f63616d706169676e5f7374617475732e70726f746f121d676f" . + "6f676c652e6164732e676f6f676c656164732e76302e656e756d73226a0a" . + "1243616d706169676e537461747573456e756d22540a0e43616d70616967" . + "6e537461747573120f0a0b554e5350454349464945441000120b0a07554e" . + "4b4e4f574e1001120b0a07454e41424c45441002120a0a06504155534544" . + "1003120b0a0752454d4f564544100442c4010a21636f6d2e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e656e756d73421343616d7061" . + "69676e53746174757350726f746f50015a42676f6f676c652e676f6c616e" . + "672e6f72672f67656e70726f746f2f676f6f676c65617069732f6164732f" . + "676f6f676c656164732f76302f656e756d733b656e756d73a20203474141" . + "aa021d476f6f676c652e4164732e476f6f676c654164732e56302e456e75" . + "6d73ca021d476f6f676c655c4164735c476f6f676c654164735c56305c45" . + "6e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/CriterionType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/CriterionType.php new file mode 100644 index 000000000..06cb1c37f --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/CriterionType.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0aa1030a32676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f637269746572696f6e5f747970652e70726f746f121d676f6f" . + "676c652e6164732e676f6f676c656164732e76302e656e756d73227e0a11" . + "437269746572696f6e54797065456e756d22690a0d437269746572696f6e" . + "54797065120f0a0b554e5350454349464945441000120b0a07554e4b4e4f" . + "574e1001120b0a074b4559574f52441002120c0a08504c4154464f524d10" . + "06120c0a084c4f434154494f4e100712110a0d4c495354494e475f47524f" . + "5550100842c3010a21636f6d2e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e656e756d734212437269746572696f6e5479706550726f" . + "746f50015a42676f6f676c652e676f6c616e672e6f72672f67656e70726f" . + "746f2f676f6f676c65617069732f6164732f676f6f676c656164732f7630" . + "2f656e756d733b656e756d73a20203474141aa021d476f6f676c652e4164" . + "732e476f6f676c654164732e56302e456e756d73ca021d476f6f676c655c" . + "4164735c476f6f676c654164735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/DayOfWeek.php b/metadata/Google/Ads/GoogleAds/V0/Enums/DayOfWeek.php new file mode 100644 index 000000000..9cbab3ab2 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/DayOfWeek.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0ab4030a2f676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f6461795f6f665f7765656b2e70726f746f121d676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e656e756d732297010a0d4461" . + "794f665765656b456e756d2285010a094461794f665765656b120f0a0b55" . + "4e5350454349464945441000120b0a07554e4b4e4f574e1001120a0a064d" . + "4f4e4441591002120b0a07545545534441591003120d0a095745444e4553" . + "4441591004120c0a0854485552534441591005120a0a0646524944415910" . + "06120c0a0853415455524441591007120a0a0653554e444159100842bf01" . + "0a21636f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "656e756d73420e4461794f665765656b50726f746f50015a42676f6f676c" . + "652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c656170" . + "69732f6164732f676f6f676c656164732f76302f656e756d733b656e756d" . + "73a20203474141aa021d476f6f676c652e4164732e476f6f676c65416473" . + "2e56302e456e756d73ca021d476f6f676c655c4164735c476f6f676c6541" . + "64735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/Device.php b/metadata/Google/Ads/GoogleAds/V0/Enums/Device.php new file mode 100644 index 000000000..f0a2676c6 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/Device.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile(hex2bin( + "0aed020a2a676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f6465766963652e70726f746f121d676f6f676c652e6164732e" . + "676f6f676c656164732e76302e656e756d7322590a0a446576696365456e" . + "756d224b0a06446576696365120f0a0b554e535045434946494544100012" . + "0b0a07554e4b4e4f574e1001120a0a064d4f42494c451002120a0a065441" . + "424c45541003120b0a074445534b544f50100442bc010a21636f6d2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e656e756d73420b44" . + "657669636550726f746f50015a42676f6f676c652e676f6c616e672e6f72" . + "672f67656e70726f746f2f676f6f676c65617069732f6164732f676f6f67" . + "6c656164732f76302f656e756d733b656e756d73a20203474141aa021d47" . + "6f6f676c652e4164732e476f6f676c654164732e56302e456e756d73ca02" . + "1d476f6f676c655c4164735c476f6f676c654164735c56305c456e756d73" . + "620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldCategory.php b/metadata/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldCategory.php new file mode 100644 index 000000000..f9736dfaa --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldCategory.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile(hex2bin( + "0ac2030a3d676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f676f6f676c655f6164735f6669656c645f63617465676f7279" . + "2e70726f746f121d676f6f676c652e6164732e676f6f676c656164732e76" . + "302e656e756d73228a010a1a476f6f676c654164734669656c6443617465" . + "676f7279456e756d226c0a16476f6f676c654164734669656c6443617465" . + "676f7279120f0a0b554e5350454349464945441000120b0a07554e4b4e4f" . + "574e1001120c0a085245534f555243451002120d0a094154545249425554" . + "451003120b0a075345474d454e541005120a0a064d4554524943100642cc" . + "010a21636f6d2e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e656e756d73421b476f6f676c654164734669656c6443617465676f7279" . + "50726f746f50015a42676f6f676c652e676f6c616e672e6f72672f67656e" . + "70726f746f2f676f6f676c65617069732f6164732f676f6f676c65616473" . + "2f76302f656e756d733b656e756d73a20203474141aa021d476f6f676c65" . + "2e4164732e476f6f676c654164732e56302e456e756d73ca021d476f6f67" . + "6c655c4164735c476f6f676c654164735c56305c456e756d73620670726f" . + "746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldDataType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldDataType.php new file mode 100644 index 000000000..60da72bcf --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldDataType.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile(hex2bin( + "0a88040a3e676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f676f6f676c655f6164735f6669656c645f646174615f747970" . + "652e70726f746f121d676f6f676c652e6164732e676f6f676c656164732e" . + "76302e656e756d7322cf010a1a476f6f676c654164734669656c64446174" . + "6154797065456e756d22b0010a16476f6f676c654164734669656c644461" . + "746154797065120f0a0b554e5350454349464945441000120b0a07554e4b" . + "4e4f574e1001120b0a07424f4f4c45414e100212080a0444415445100312" . + "0a0a06444f55424c45100412080a04454e554d100512090a05464c4f4154" . + "100612090a05494e543332100712090a05494e5436341008120b0a074d45" . + "5353414745100912110a0d5245534f555243455f4e414d45100a120a0a06" . + "535452494e47100b42cc010a21636f6d2e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e656e756d73421b476f6f676c65416473466965" . + "6c64446174615479706550726f746f50015a42676f6f676c652e676f6c61" . + "6e672e6f72672f67656e70726f746f2f676f6f676c65617069732f616473" . + "2f676f6f676c656164732f76302f656e756d733b656e756d73a202034741" . + "41aa021d476f6f676c652e4164732e476f6f676c654164732e56302e456e" . + "756d73ca021d476f6f676c655c4164735c476f6f676c654164735c56305c" . + "456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/KeywordMatchType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/KeywordMatchType.php new file mode 100644 index 000000000..03aa5bf26 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/KeywordMatchType.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a94030a36676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f6b6579776f72645f6d617463685f747970652e70726f746f12" . + "1d676f6f676c652e6164732e676f6f676c656164732e76302e656e756d73" . + "226a0a144b6579776f72644d6174636854797065456e756d22520a104b65" . + "79776f72644d6174636854797065120f0a0b554e53504543494649454410" . + "00120b0a07554e4b4e4f574e100112090a0545584143541002120a0a0650" . + "4852415345100312090a0542524f4144100442c6010a21636f6d2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e656e756d7342154b65" . + "79776f72644d617463685479706550726f746f50015a42676f6f676c652e" . + "676f6c616e672e6f72672f67656e70726f746f2f676f6f676c6561706973" . + "2f6164732f676f6f676c656164732f76302f656e756d733b656e756d73a2" . + "0203474141aa021d476f6f676c652e4164732e476f6f676c654164732e56" . + "302e456e756d73ca021d476f6f676c655c4164735c476f6f676c65416473" . + "5c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/ListingCustomAttributeIndex.php b/metadata/Google/Ads/GoogleAds/V0/Enums/ListingCustomAttributeIndex.php new file mode 100644 index 000000000..a343148f0 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/ListingCustomAttributeIndex.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile(hex2bin( + "0a99040a42676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f6c697374696e675f637573746f6d5f6174747269627574655f" . + "696e6465782e70726f746f121d676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e656e756d7322d7010a1f4c697374696e67437573746f6d" . + "417474726962757465496e646578456e756d22b3010a1b4c697374696e67" . + "437573746f6d417474726962757465496e646578120f0a0b554e53504543" . + "49464945441000120b0a07554e4b4e4f574e100112160a12435553544f4d" . + "5f4154545249425554455f30100212160a12435553544f4d5f4154545249" . + "425554455f31100312160a12435553544f4d5f4154545249425554455f32" . + "100412160a12435553544f4d5f4154545249425554455f33100512160a12" . + "435553544f4d5f4154545249425554455f34100642d1010a21636f6d2e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e656e756d734220" . + "4c697374696e67437573746f6d417474726962757465496e64657850726f" . + "746f50015a42676f6f676c652e676f6c616e672e6f72672f67656e70726f" . + "746f2f676f6f676c65617069732f6164732f676f6f676c656164732f7630" . + "2f656e756d733b656e756d73a20203474141aa021d476f6f676c652e4164" . + "732e476f6f676c654164732e56302e456e756d73ca021d476f6f676c655c" . + "4164735c476f6f676c654164735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/ListingGroupType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/ListingGroupType.php new file mode 100644 index 000000000..36792b266 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/ListingGroupType.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a8d030a36676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f6c697374696e675f67726f75705f747970652e70726f746f12" . + "1d676f6f676c652e6164732e676f6f676c656164732e76302e656e756d73" . + "22630a144c697374696e6747726f757054797065456e756d224b0a104c69" . + "7374696e6747726f757054797065120f0a0b554e53504543494649454410" . + "00120b0a07554e4b4e4f574e1001120f0a0b5355424449564953494f4e10" . + "0212080a04554e4954100342c6010a21636f6d2e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e656e756d7342154c697374696e674772" . + "6f75705479706550726f746f50015a42676f6f676c652e676f6c616e672e" . + "6f72672f67656e70726f746f2f676f6f676c65617069732f6164732f676f" . + "6f676c656164732f76302f656e756d733b656e756d73a20203474141aa02" . + "1d476f6f676c652e4164732e476f6f676c654164732e56302e456e756d73" . + "ca021d476f6f676c655c4164735c476f6f676c654164735c56305c456e75" . + "6d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/PageOnePromotedStrategyGoal.php b/metadata/Google/Ads/GoogleAds/V0/Enums/PageOnePromotedStrategyGoal.php new file mode 100644 index 000000000..f494bb95d --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/PageOnePromotedStrategyGoal.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile(hex2bin( + "0aca030a43676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f706167655f6f6e655f70726f6d6f7465645f73747261746567" . + "795f676f616c2e70726f746f121d676f6f676c652e6164732e676f6f676c" . + "656164732e76302e656e756d732287010a1f506167654f6e6550726f6d6f" . + "7465645374726174656779476f616c456e756d22640a1b506167654f6e65" . + "50726f6d6f7465645374726174656779476f616c120f0a0b554e53504543" . + "49464945441000120b0a07554e4b4e4f574e1001120e0a0a46495253545f" . + "50414745100212170a1346495253545f504147455f50524f4d4f54454410" . + "0342d1010a21636f6d2e676f6f676c652e6164732e676f6f676c65616473" . + "2e76302e656e756d734220506167654f6e6550726f6d6f74656453747261" . + "74656779476f616c50726f746f50015a42676f6f676c652e676f6c616e67" . + "2e6f72672f67656e70726f746f2f676f6f676c65617069732f6164732f67" . + "6f6f676c656164732f76302f656e756d733b656e756d73a20203474141aa" . + "021d476f6f676c652e4164732e476f6f676c654164732e56302e456e756d" . + "73ca021d476f6f676c655c4164735c476f6f676c654164735c56305c456e" . + "756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/QualityScoreBucket.php b/metadata/Google/Ads/GoogleAds/V0/Enums/QualityScoreBucket.php new file mode 100644 index 000000000..a4af9cd95 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/QualityScoreBucket.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0aad030a38676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f7175616c6974795f73636f72655f6275636b65742e70726f74" . + "6f121d676f6f676c652e6164732e676f6f676c656164732e76302e656e75" . + "6d73227f0a165175616c69747953636f72654275636b6574456e756d2265" . + "0a125175616c69747953636f72654275636b6574120f0a0b554e53504543" . + "49464945441000120b0a07554e4b4e4f574e100112110a0d42454c4f575f" . + "415645524147451002120b0a0741564552414745100312110a0d41424f56" . + "455f41564552414745100442c8010a21636f6d2e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e656e756d7342175175616c6974795363" . + "6f72654275636b657450726f746f50015a42676f6f676c652e676f6c616e" . + "672e6f72672f67656e70726f746f2f676f6f676c65617069732f6164732f" . + "676f6f676c656164732f76302f656e756d733b656e756d73a20203474141" . + "aa021d476f6f676c652e4164732e476f6f676c654164732e56302e456e75" . + "6d73ca021d476f6f676c655c4164735c476f6f676c654164735c56305c45" . + "6e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/RecommendationType.php b/metadata/Google/Ads/GoogleAds/V0/Enums/RecommendationType.php new file mode 100644 index 000000000..a2d76226a --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/RecommendationType.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile(hex2bin( + "0ac0030a37676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f7265636f6d6d656e646174696f6e5f747970652e70726f746f" . + "121d676f6f676c652e6164732e676f6f676c656164732e76302e656e756d" . + "732292010a165265636f6d6d656e646174696f6e54797065456e756d2278" . + "0a125265636f6d6d656e646174696f6e54797065120f0a0b554e53504543" . + "49464945441000120b0a07554e4b4e4f574e100112130a0f43414d504149" . + "474e5f4255444745541002120b0a074b4559574f52441003120b0a075445" . + "58545f4144100412150a115441524745545f4350415f4f50545f494e1005" . + "42c8010a21636f6d2e676f6f676c652e6164732e676f6f676c656164732e" . + "76302e656e756d7342175265636f6d6d656e646174696f6e547970655072" . + "6f746f50015a42676f6f676c652e676f6c616e672e6f72672f67656e7072" . + "6f746f2f676f6f676c65617069732f6164732f676f6f676c656164732f76" . + "302f656e756d733b656e756d73a20203474141aa021d476f6f676c652e41" . + "64732e476f6f676c654164732e56302e456e756d73ca021d476f6f676c65" . + "5c4164735c476f6f676c654164735c56305c456e756d73620670726f746f" . + "33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/Slot.php b/metadata/Google/Ads/GoogleAds/V0/Enums/Slot.php new file mode 100644 index 000000000..4a079d7e7 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/Slot.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0ab4030a28676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f736c6f742e70726f746f121d676f6f676c652e6164732e676f" . + "6f676c656164732e76302e656e756d7322a3010a08536c6f74456e756d22" . + "96010a04536c6f74120f0a0b554e5350454349464945441000120b0a0755" . + "4e4b4e4f574e1001120f0a0b5345415243485f534944451002120e0a0a53" . + "45415243485f544f50100312100a0c5345415243485f4f54484552100412" . + "0b0a07434f4e54454e54100512160a125345415243485f504152544e4552" . + "5f544f50100612180a145345415243485f504152544e45525f4f54484552" . + "100742ba010a21636f6d2e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e656e756d734209536c6f7450726f746f50015a42676f6f676c" . + "652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c656170" . + "69732f6164732f676f6f676c656164732f76302f656e756d733b656e756d" . + "73a20203474141aa021d476f6f676c652e4164732e476f6f676c65416473" . + "2e56302e456e756d73ca021d476f6f676c655c4164735c476f6f676c6541" . + "64735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Enums/TargetCpaOptInRecommendationGoal.php b/metadata/Google/Ads/GoogleAds/V0/Enums/TargetCpaOptInRecommendationGoal.php new file mode 100644 index 000000000..9a78f9f6b --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Enums/TargetCpaOptInRecommendationGoal.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile(hex2bin( + "0afb030a49676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f7461726765745f6370615f6f70745f696e5f7265636f6d6d65" . + "6e646174696f6e5f676f616c2e70726f746f121d676f6f676c652e616473" . + "2e676f6f676c656164732e76302e656e756d7322ad010a24546172676574" . + "4370614f7074496e5265636f6d6d656e646174696f6e476f616c456e756d" . + "2284010a205461726765744370614f7074496e5265636f6d6d656e646174" . + "696f6e476f616c120f0a0b554e5350454349464945441000120b0a07554e" . + "4b4e4f574e1001120d0a0953414d455f434f5354100212140a1053414d45" . + "5f434f4e56455253494f4e531003120c0a0853414d455f4350411004120f" . + "0a0b434c4f534553545f435041100542d6010a21636f6d2e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e656e756d7342255461726765" . + "744370614f7074496e5265636f6d6d656e646174696f6e476f616c50726f" . + "746f50015a42676f6f676c652e676f6c616e672e6f72672f67656e70726f" . + "746f2f676f6f676c65617069732f6164732f676f6f676c656164732f7630" . + "2f656e756d733b656e756d73a20203474141aa021d476f6f676c652e4164" . + "732e476f6f676c654164732e56302e456e756d73ca021d476f6f676c655c" . + "4164735c476f6f676c654164735c56305c456e756d73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/AdCustomizerError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/AdCustomizerError.php new file mode 100644 index 000000000..8cc4138ff --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/AdCustomizerError.php @@ -0,0 +1,42 @@ +internalAddGeneratedFile(hex2bin( + "0a9c040a38676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f61645f637573746f6d697a65725f6572726f722e70726f74" . + "6f121e676f6f676c652e6164732e676f6f676c656164732e76302e657272" . + "6f727322e8010a154164437573746f6d697a65724572726f72456e756d22" . + "ce010a114164437573746f6d697a65724572726f72120f0a0b554e535045" . + "4349464945441000120b0a07554e4b4e4f574e100112210a1d434f554e54" . + "444f574e5f494e56414c49445f444154455f464f524d41541002121a0a16" . + "434f554e54444f574e5f444154455f494e5f504153541003121c0a18434f" . + "554e54444f574e5f494e56414c49445f4c4f43414c45100412270a23434f" . + "554e54444f574e5f494e56414c49445f53544152545f444159535f424546" . + "4f5245100512150a11554e4b4e4f574e5f555345525f4c495354100642cc" . + "010a22636f6d2e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e6572726f727342164164437573746f6d697a65724572726f7250726f74" . + "6f50015a44676f6f676c652e676f6c616e672e6f72672f67656e70726f74" . + "6f2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f" . + "6572726f72733b6572726f7273a20203474141aa021e476f6f676c652e41" . + "64732e476f6f676c654164732e56302e4572726f7273ca021e476f6f676c" . + "655c4164735c476f6f676c654164735c56305c4572726f7273620670726f" . + "746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/AdError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/AdError.php new file mode 100644 index 000000000..11ac5d901 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/AdError.php @@ -0,0 +1,172 @@ +internalAddGeneratedFile(hex2bin( + "0ae9220a2d676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f61645f6572726f722e70726f746f121e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e6572726f727322ca200a0b416445" . + "72726f72456e756d22ba200a0741644572726f72120f0a0b554e53504543" . + "49464945441000120b0a07554e4b4e4f574e1001122c0a2841445f435553" . + "544f4d495a4552535f4e4f545f535550504f525445445f464f525f41445f" . + "545950451002121a0a16415050524f58494d4154454c595f544f4f5f4c4f" . + "4e471003121b0a17415050524f58494d4154454c595f544f4f5f53484f52" . + "541004120f0a0b4241445f534e4950504554100512140a1043414e4e4f54" . + "5f4d4f444946595f4144100612270a2343414e4e4f545f5345545f425553" . + "494e4553535f4e414d455f49465f55524c5f534554100712140a1043414e" . + "4e4f545f5345545f4649454c441008122a0a2643414e4e4f545f5345545f" . + "4649454c445f574954485f4f524947494e5f41445f49445f534554100912" . + "2f0a2b43414e4e4f545f5345545f4649454c445f574954485f41445f4944" . + "5f5345545f464f525f53484152494e47100a12290a2543414e4e4f545f53" . + "45545f414c4c4f575f464c455849424c455f434f4c4f525f46414c534510" . + "0b12370a3343414e4e4f545f5345545f434f4c4f525f434f4e54524f4c5f" . + "5748454e5f4e41544956455f464f524d41545f53455454494e47100c1212" . + "0a0e43414e4e4f545f5345545f55524c100d12210a1d43414e4e4f545f53" . + "45545f574954484f55545f46494e414c5f55524c53100e121e0a1a43414e" . + "4e4f545f5345545f574954485f46494e414c5f55524c53100f12290a2543" . + "414e4e4f545f5345545f574954485f545241434b494e475f55524c5f5445" . + "4d504c4154451010121c0a1843414e4e4f545f5345545f574954485f5552" . + "4c5f44415441101112270a2343414e4e4f545f5553455f41445f53554243" . + "4c4153535f464f525f4f50455241544f52101212230a1f435553544f4d45" . + "525f4e4f545f415050524f5645445f4d4f42494c45414453101312280a24" . + "435553544f4d45525f4e4f545f415050524f5645445f5448495244504152" . + "54595f414453101412310a2d435553544f4d45525f4e4f545f415050524f" . + "5645445f544849524450415254595f52454449524543545f414453101512" . + "190a15435553544f4d45525f4e4f545f454c494749424c45101612310a2d" . + "435553544f4d45525f4e4f545f454c494749424c455f464f525f55504441" . + "54494e475f424541434f4e5f55524c1017121e0a1a44494d454e53494f4e" . + "5f414c52454144595f494e5f554e494f4e101812190a1544494d454e5349" . + "4f4e5f4d5553545f42455f5345541019121a0a1644494d454e53494f4e5f" . + "4e4f545f494e5f554e494f4e101a12230a1f444953504c41595f55524c5f" . + "43414e4e4f545f42455f535045434946494544101b12200a1c444f4d4553" . + "5449435f50484f4e455f4e554d4245525f464f524d4154101c121a0a1645" . + "4d455247454e43595f50484f4e455f4e554d424552101d120f0a0b454d50" . + "54595f4649454c44101e12300a2c464545445f4154545249425554455f4d" . + "5553545f484156455f4d415050494e475f464f525f545950455f4944101f" . + "12280a24464545445f4154545249425554455f4d415050494e475f545950" . + "455f4d49534d41544348102012210a1d494c4c4547414c5f41445f435553" . + "544f4d495a45525f5441475f555345102112130a0f494c4c4547414c5f54" . + "41475f5553451022121b0a17494e434f4e53495354454e545f44494d454e" . + "53494f4e53102312290a25494e434f4e53495354454e545f535441545553" . + "5f494e5f54454d504c4154455f554e494f4e102412140a10494e434f5252" . + "4543545f4c454e4754481025121a0a16494e454c494749424c455f464f52" . + "5f55504752414445102612260a22494e56414c49445f41445f4144445245" . + "53535f43414d504149474e5f544152474554102712130a0f494e56414c49" . + "445f41445f54595045102812270a23494e56414c49445f41545452494255" . + "5445535f464f525f4d4f42494c455f494d414745102912260a22494e5641" . + "4c49445f415454524942555445535f464f525f4d4f42494c455f54455854" . + "102a121f0a1b494e56414c49445f43414c4c5f544f5f414354494f4e5f54" . + "455854102b121d0a19494e56414c49445f4348415241435445525f464f52" . + "5f55524c102c12180a14494e56414c49445f434f554e5452595f434f4445" . + "102d12170a13494e56414c49445f4453415f55524c5f544147102e122a0a" . + "26494e56414c49445f455850414e4445445f44594e414d49435f53454152" . + "43485f41445f544147102f12110a0d494e56414c49445f494e5055541030" . + "121b0a17494e56414c49445f4d41524b55505f4c414e4755414745103112" . + "1a0a16494e56414c49445f4d4f42494c455f43415252494552103212210a" . + "1d494e56414c49445f4d4f42494c455f434152524945525f544152474554" . + "1033121e0a1a494e56414c49445f4e554d4245525f4f465f454c454d454e" . + "54531034121f0a1b494e56414c49445f50484f4e455f4e554d4245525f46" . + "4f524d4154103512310a2d494e56414c49445f524943485f4d454449415f" . + "4345525449464945445f56454e444f525f464f524d41545f494410361219" . + "0a15494e56414c49445f54454d504c4154455f44415441103712270a2349" . + "4e56414c49445f54454d504c4154455f454c454d454e545f4649454c445f" . + "54595045103812170a13494e56414c49445f54454d504c4154455f494410" . + "3912110a0d4c494e455f544f4f5f57494445103a12210a1d4d495353494e" . + "475f41445f435553544f4d495a45525f4d415050494e47103b121d0a194d" . + "495353494e475f414444524553535f434f4d504f4e454e54103c121e0a1a" . + "4d495353494e475f4144564552544953454d454e545f4e414d45103d1219" . + "0a154d495353494e475f425553494e4553535f4e414d45103e12180a144d" . + "495353494e475f4445534352495054494f4e31103f12180a144d49535349" . + "4e475f4445534352495054494f4e321040121f0a1b4d495353494e475f44" . + "455354494e4154494f4e5f55524c5f544147104112200a1c4d495353494e" . + "475f4c414e44494e475f504147455f55524c5f544147104212150a114d49" . + "5353494e475f44494d454e53494f4e104312170a134d495353494e475f44" . + "4953504c41595f55524c104412140a104d495353494e475f484541444c49" . + "4e45104512120a0e4d495353494e475f484549474854104612110a0d4d49" . + "5353494e475f494d4147451047122d0a294d495353494e475f4d41524b45" . + "54494e475f494d4147455f4f525f50524f445543545f564944454f531048" . + "121c0a184d495353494e475f4d41524b55505f4c414e4755414745531049" . + "121a0a164d495353494e475f4d4f42494c455f43415252494552104a1211" . + "0a0d4d495353494e475f50484f4e45104b12240a204d495353494e475f52" . + "455155495245445f54454d504c4154455f4649454c4453104c12200a1c4d" . + "495353494e475f54454d504c4154455f4649454c445f56414c5545104d12" . + "100a0c4d495353494e475f54455854104e12170a134d495353494e475f56" . + "495349424c455f55524c104f12110a0d4d495353494e475f574944544810" . + "5012270a234d554c5449504c455f44495354494e43545f46454544535f55" . + "4e535550504f52544544105112240a204d5553545f5553455f54454d505f" . + "41445f554e494f4e5f49445f4f4e5f4144441052120c0a08544f4f5f4c4f" . + "4e471053120d0a09544f4f5f53484f5254105412220a1e554e494f4e5f44" . + "494d454e53494f4e535f43414e4e4f545f4348414e47451055121d0a1955" . + "4e4b4e4f574e5f414444524553535f434f4d504f4e454e54105612160a12" . + "554e4b4e4f574e5f4649454c445f4e414d45105712170a13554e4b4e4f57" . + "4e5f554e495155455f4e414d451058121a0a16554e535550504f52544544" . + "5f44494d454e53494f4e53105912160a1255524c5f494e56414c49445f53" . + "4348454d45105a12200a1c55524c5f494e56414c49445f544f505f4c4556" . + "454c5f444f4d41494e105b12110a0d55524c5f4d414c464f524d4544105c" . + "120f0a0b55524c5f4e4f5f484f5354105d12160a1255524c5f4e4f545f45" . + "51554956414c454e54105e121a0a1655524c5f484f53545f4e414d455f54" . + "4f4f5f4c4f4e47105f12110a0d55524c5f4e4f5f534348454d451060121b" . + "0a1755524c5f4e4f5f544f505f4c4556454c5f444f4d41494e106112180a" . + "1455524c5f504154485f4e4f545f414c4c4f574544106212180a1455524c" . + "5f504f52545f4e4f545f414c4c4f574544106312190a1555524c5f515545" . + "52595f4e4f545f414c4c4f5745441064121d0a1955524c5f534348454d45" . + "5f4245464f52455f4453415f544147106512340a3055524c5f534348454d" . + "455f4245464f52455f455850414e4445445f44594e414d49435f53454152" . + "43485f41445f544147106612290a25555345525f444f45535f4e4f545f48" . + "4156455f4143434553535f544f5f54454d504c415445106712240a20494e" . + "434f4e53495354454e545f455850414e4441424c455f53455454494e4753" . + "106812120a0e494e56414c49445f464f524d4154106912160a12494e5641" . + "4c49445f4649454c445f54455854106a12170a13454c454d454e545f4e4f" . + "545f50524553454e54106b120f0a0b494d4147455f4552524f52106c1216" . + "0a1256414c55455f4e4f545f494e5f52414e4745106d12150a114649454c" . + "445f4e4f545f50524553454e54106e12180a14414444524553535f4e4f54" . + "5f434f4d504c455445106f12130a0f414444524553535f494e56414c4944" . + "107012190a15564944454f5f52455452494556414c5f4552524f52107112" . + "0f0a0b415544494f5f4552524f521072121f0a1b494e56414c49445f594f" . + "55545542455f444953504c41595f55524c1073121b0a17544f4f5f4d414e" . + "595f50524f445543545f494d414745531074121b0a17544f4f5f4d414e59" . + "5f50524f445543545f564944454f531075122e0a2a494e434f4d50415449" . + "424c455f41445f545950455f414e445f4445564943455f50524546455245" . + "4e43451076122a0a2643414c4c545241434b494e475f4e4f545f53555050" . + "4f525445445f464f525f434f554e5452591077122d0a2943415252494552" . + "5f53504543494649435f53484f52545f4e554d4245525f4e4f545f414c4c" . + "4f5745441078121a0a16444953414c4c4f5745445f4e554d4245525f5459" . + "50451079122a0a2650484f4e455f4e554d4245525f4e4f545f535550504f" . + "525445445f464f525f434f554e545259107a123c0a3850484f4e455f4e55" . + "4d4245525f4e4f545f535550504f525445445f574954485f43414c4c5452" . + "41434b494e475f464f525f434f554e545259107b12230a1f5052454d4955" . + "4d5f524154455f4e554d4245525f4e4f545f414c4c4f574544107c12230a" . + "1f56414e4954595f50484f4e455f4e554d4245525f4e4f545f414c4c4f57" . + "4544107d12230a1f494e56414c49445f43414c4c5f434f4e56455253494f" . + "4e5f545950455f4944107e123d0a3943414e4e4f545f44495341424c455f" . + "43414c4c5f434f4e56455253494f4e5f414e445f5345545f434f4e564552" . + "53494f4e5f545950455f4944107f12230a1e43414e4e4f545f5345545f50" . + "415448325f574954484f55545f504154483110800112330a2e4d49535349" . + "4e475f44594e414d49435f5345415243485f4144535f53455454494e475f" . + "444f4d41494e5f4e414d4510810112270a22494e434f4d50415449424c45" . + "5f574954485f5245535452494354494f4e5f5459504510820142c2010a22" . + "636f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e6572" . + "726f7273420c41644572726f7250726f746f50015a44676f6f676c652e67" . + "6f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f" . + "6164732f676f6f676c656164732f76302f6572726f72733b6572726f7273" . + "a20203474141aa021e476f6f676c652e4164732e476f6f676c654164732e" . + "56302e4572726f7273ca021e476f6f676c655c4164735c476f6f676c6541" . + "64735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupAdError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupAdError.php new file mode 100644 index 000000000..74b2eacd9 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupAdError.php @@ -0,0 +1,45 @@ +internalAddGeneratedFile(hex2bin( + "0afb040a36676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f61645f67726f75705f61645f6572726f722e70726f746f12" . + "1e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f72" . + "7322cc020a12416447726f757041644572726f72456e756d22b5020a0e41" . + "6447726f757041644572726f72120f0a0b554e5350454349464945441000" . + "120b0a07554e4b4e4f574e100112240a2041445f47524f55505f41445f4c" . + "4142454c5f444f45535f4e4f545f4558495354100212240a2041445f4752" . + "4f55505f41445f4c4142454c5f414c52454144595f455849535453100312" . + "180a1441445f4e4f545f554e4445525f414447524f5550100412270a2343" . + "414e4e4f545f4f5045524154455f4f4e5f52454d4f5645445f414447524f" . + "55504144100512200a1c43414e4e4f545f4352454154455f444550524543" . + "415445445f4144531006121a0a1643414e4e4f545f4352454154455f5445" . + "58545f4144531007120f0a0b454d5054595f4649454c44100812270a2352" . + "45534f555243455f5245464552454e4345445f494e5f4d554c5449504c45" . + "5f4f5053100942c9010a22636f6d2e676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e6572726f72734213416447726f757041644572726f" . + "7250726f746f50015a44676f6f676c652e676f6c616e672e6f72672f6765" . + "6e70726f746f2f676f6f676c65617069732f6164732f676f6f676c656164" . + "732f76302f6572726f72733b6572726f7273a20203474141aa021e476f6f" . + "676c652e4164732e476f6f676c654164732e56302e4572726f7273ca021e" . + "476f6f676c655c4164735c476f6f676c654164735c56305c4572726f7273" . + "620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupBidModifierError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupBidModifierError.php new file mode 100644 index 000000000..9729cc37e --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupBidModifierError.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile(hex2bin( + "0af8030a40676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f61645f67726f75705f6269645f6d6f6469666965725f6572" . + "726f722e70726f746f121e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e6572726f727322b6010a1b416447726f75704269644d6f6469" . + "666965724572726f72456e756d2296010a17416447726f75704269644d6f" . + "6469666965724572726f72120f0a0b554e5350454349464945441000120b" . + "0a07554e4b4e4f574e1001121e0a1a435249544552494f4e5f49445f4e4f" . + "545f535550504f525445441002123d0a3943414e4e4f545f4f5645525249" . + "44455f4f505445445f4f55545f43414d504149474e5f435249544552494f" . + "4e5f4249445f4d4f444946494552100342d2010a22636f6d2e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f7273421c416447" . + "726f75704269644d6f6469666965724572726f7250726f746f50015a4467" . + "6f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f67" . + "6c65617069732f6164732f676f6f676c656164732f76302f6572726f7273" . + "3b6572726f7273a20203474141aa021e476f6f676c652e4164732e476f6f" . + "676c654164732e56302e4572726f7273ca021e476f6f676c655c4164735c" . + "476f6f676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupCriterionError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupCriterionError.php new file mode 100644 index 000000000..afeca21df --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupCriterionError.php @@ -0,0 +1,88 @@ +internalAddGeneratedFile(hex2bin( + "0a940f0a3d676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f61645f67726f75705f637269746572696f6e5f6572726f72" . + "2e70726f746f121e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e6572726f727322d70c0a19416447726f7570437269746572696f6e45" . + "72726f72456e756d22b90c0a15416447726f7570437269746572696f6e45" . + "72726f72120f0a0b554e5350454349464945441000120b0a07554e4b4e4f" . + "574e1001122b0a2741445f47524f55505f435249544552494f4e5f4c4142" . + "454c5f444f45535f4e4f545f45584953541002122b0a2741445f47524f55" . + "505f435249544552494f4e5f4c4142454c5f414c52454144595f45584953" . + "54531003122a0a2643414e4e4f545f4144445f4c4142454c5f544f5f4e45" . + "4741544956455f435249544552494f4e100412170a13544f4f5f4d414e59" . + "5f4f5045524154494f4e53100512180a1443414e545f5550444154455f4e" . + "454741544956451006121a0a16434f4e43524554455f545950455f524551" . + "5549524544100712210a1d4249445f494e434f4d50415449424c455f5749" . + "54485f414447524f55501008121d0a1943414e4e4f545f5441524745545f" . + "414e445f4558434c5544451009120f0a0b494c4c4547414c5f55524c100a" . + "12180a14494e56414c49445f4b4559574f52445f54455854100b121b0a17" . + "494e56414c49445f44455354494e4154494f4e5f55524c100c121f0a1b4d" . + "495353494e475f44455354494e4154494f4e5f55524c5f544147100d1231" . + "0a2d4b4559574f52445f4c4556454c5f4249445f4e4f545f535550504f52" . + "5445445f464f525f4d414e55414c43504d100e12170a13494e56414c4944" . + "5f555345525f535441545553100f121c0a1843414e4e4f545f4144445f43" . + "524954455249415f54595045101012200a1c43414e4e4f545f4558434c55" . + "44455f43524954455249415f54595045101112350a3143414d504149474e" . + "5f545950455f4e4f545f434f4d50415449424c455f574954485f50415254" . + "49414c5f4641494c555245101b122d0a294f5045524154494f4e535f464f" . + "525f544f4f5f4d414e595f53484f5050494e475f414447524f555053101c" . + "12340a3043414e4e4f545f4d4f444946595f55524c5f4649454c44535f57" . + "4954485f4455504c49434154455f454c454d454e5453101d12210a1d4341" . + "4e4e4f545f5345545f574954484f55545f46494e414c5f55524c53101e12" . + "360a3243414e4e4f545f434c4541525f46494e414c5f55524c535f49465f" . + "46494e414c5f4d4f42494c455f55524c535f4558495354101f12330a2f43" . + "414e4e4f545f434c4541525f46494e414c5f55524c535f49465f46494e41" . + "4c5f4150505f55524c535f45584953541020123b0a3743414e4e4f545f43" . + "4c4541525f46494e414c5f55524c535f49465f545241434b494e475f5552" . + "4c5f54454d504c4154455f4558495354531021123a0a3643414e4e4f545f" . + "434c4541525f46494e414c5f55524c535f49465f55524c5f435553544f4d" . + "5f504152414d45544552535f4558495354102212320a2e43414e4e4f545f" . + "5345545f424f54485f44455354494e4154494f4e5f55524c5f414e445f46" . + "494e414c5f55524c531023123d0a3943414e4e4f545f5345545f424f5448" . + "5f44455354494e4154494f4e5f55524c5f414e445f545241434b494e475f" . + "55524c5f54454d504c4154451024122f0a2b46494e414c5f55524c535f4e" . + "4f545f535550504f525445445f464f525f435249544552494f4e5f545950" . + "45102512360a3246494e414c5f4d4f42494c455f55524c535f4e4f545f53" . + "5550504f525445445f464f525f435249544552494f4e5f54595045102612" . + "230a1f494e56414c49445f4c495354494e475f47524f55505f4849455241" . + "524348591027122b0a274c495354494e475f47524f55505f554e49545f43" . + "414e4e4f545f484156455f4348494c4452454e102812320a2e4c49535449" . + "4e475f47524f55505f5355424449564953494f4e5f52455155495245535f" . + "4f54484552535f434153451029123a0a364c495354494e475f47524f5550" . + "5f52455155495245535f53414d455f44494d454e53494f4e5f545950455f" . + "41535f5349424c494e4753102a12200a1c4c495354494e475f47524f5550" . + "5f414c52454144595f455849535453102b12200a1c4c495354494e475f47" . + "524f55505f444f45535f4e4f545f4558495354102c12230a1f4c49535449" . + "4e475f47524f55505f43414e4e4f545f42455f52454d4f564544102d121e" . + "0a1a494e56414c49445f4c495354494e475f47524f55505f54595045102e" . + "122a0a264c495354494e475f47524f55505f4144445f4d41595f4f4e4c59" . + "5f5553455f54454d505f4944102f42d0010a22636f6d2e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e6572726f7273421a416447726f" . + "7570437269746572696f6e4572726f7250726f746f50015a44676f6f676c" . + "652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c656170" . + "69732f6164732f676f6f676c656164732f76302f6572726f72733b657272" . + "6f7273a20203474141aa021e476f6f676c652e4164732e476f6f676c6541" . + "64732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f67" . + "6c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupError.php new file mode 100644 index 000000000..5d7a2dbb7 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/AdGroupError.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile(hex2bin( + "0aca060a33676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f61645f67726f75705f6572726f722e70726f746f121e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f727322a0" . + "040a10416447726f75704572726f72456e756d228b040a0c416447726f75" . + "704572726f72120f0a0b554e5350454349464945441000120b0a07554e4b" . + "4e4f574e1001121a0a164455504c49434154455f414447524f55505f4e41" . + "4d45100212180a14494e56414c49445f414447524f55505f4e414d451003" . + "12250a21414456455254495345525f4e4f545f4f4e5f434f4e54454e545f" . + "4e4554574f524b1005120f0a0b4249445f544f4f5f4249471006122a0a26" . + "4249445f545950455f414e445f42494444494e475f53545241544547595f" . + "4d49534d41544348100712180a144d495353494e475f414447524f55505f" . + "4e414d45100812200a1c414447524f55505f4c4142454c5f444f45535f4e" . + "4f545f4558495354100912200a1c414447524f55505f4c4142454c5f414c" . + "52454144595f455849535453100a122c0a28494e56414c49445f434f4e54" . + "454e545f4249445f435249544552494f4e5f545950455f47524f5550100b" . + "12380a3441445f47524f55505f545950455f4e4f545f56414c49445f464f" . + "525f4144564552544953494e475f4348414e4e454c5f54595045100c1239" . + "0a35414447524f55505f545950455f4e4f545f535550504f525445445f46" . + "4f525f43414d504149474e5f53414c45535f434f554e545259100d12420a" . + "3e43414e4e4f545f4144445f414447524f55505f4f465f545950455f4453" . + "415f544f5f43414d504149474e5f574954484f55545f4453415f53455454" . + "494e47100e42c7010a22636f6d2e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e6572726f72734211416447726f75704572726f725072" . + "6f746f50015a44676f6f676c652e676f6c616e672e6f72672f67656e7072" . + "6f746f2f676f6f676c65617069732f6164732f676f6f676c656164732f76" . + "302f6572726f72733b6572726f7273a20203474141aa021e476f6f676c65" . + "2e4164732e476f6f676c654164732e56302e4572726f7273ca021e476f6f" . + "676c655c4164735c476f6f676c654164735c56305c4572726f7273620670" . + "726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/AdSharingError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/AdSharingError.php new file mode 100644 index 000000000..67801ee9e --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/AdSharingError.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile(hex2bin( + "0ad7030a35676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f61645f73686172696e675f6572726f722e70726f746f121e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e6572726f7273" . + "22a9010a12416453686172696e674572726f72456e756d2292010a0e4164" . + "53686172696e674572726f72120f0a0b554e535045434946494544100012" . + "0b0a07554e4b4e4f574e100112200a1c41445f47524f55505f414c524541" . + "44595f434f4e5441494e535f4144100212220a1e494e434f4d5041544942" . + "4c455f41445f554e4445525f41445f47524f55501003121c0a1843414e4e" . + "4f545f53484152455f494e4143544956455f4144100442c9010a22636f6d" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f72" . + "734213416453686172696e674572726f7250726f746f50015a44676f6f67" . + "6c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c6561" . + "7069732f6164732f676f6f676c656164732f76302f6572726f72733b6572" . + "726f7273a20203474141aa021e476f6f676c652e4164732e476f6f676c65" . + "4164732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f" . + "676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/AdxError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/AdxError.php new file mode 100644 index 000000000..a9d098f8c --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/AdxError.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile(hex2bin( + "0af1020a2e676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6164785f6572726f722e70726f746f121e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e6572726f727322510a0c416478" . + "4572726f72456e756d22410a084164784572726f72120f0a0b554e535045" . + "4349464945441000120b0a07554e4b4e4f574e100112170a13554e535550" . + "504f525445445f46454154555245100242c3010a22636f6d2e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f7273420d416478" . + "4572726f7250726f746f50015a44676f6f676c652e676f6c616e672e6f72" . + "672f67656e70726f746f2f676f6f676c65617069732f6164732f676f6f67" . + "6c656164732f76302f6572726f72733b6572726f7273a20203474141aa02" . + "1e476f6f676c652e4164732e476f6f676c654164732e56302e4572726f72" . + "73ca021e476f6f676c655c4164735c476f6f676c654164735c56305c4572" . + "726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/AuthenticationError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/AuthenticationError.php new file mode 100644 index 000000000..5d03cbea1 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/AuthenticationError.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile(hex2bin( + "0af7060a39676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f61757468656e7469636174696f6e5f6572726f722e70726f" . + "746f121e676f6f676c652e6164732e676f6f676c656164732e76302e6572" . + "726f727322c0040a1741757468656e7469636174696f6e4572726f72456e" . + "756d22a4040a1341757468656e7469636174696f6e4572726f72120f0a0b" . + "554e5350454349464945441000120b0a07554e4b4e4f574e100112180a14" . + "41555448454e5449434154494f4e5f4552524f521002121e0a1a434c4945" . + "4e545f435553544f4d45525f49445f494e56414c4944100512160a124355" . + "53544f4d45525f4e4f545f464f554e441008121a0a16474f4f474c455f41" . + "43434f554e545f44454c45544544100912210a1d474f4f474c455f414343" . + "4f554e545f434f4f4b49455f494e56414c4944100a12290a254641494c45" . + "445f544f5f41555448454e5449434154455f474f4f474c455f4143434f55" . + "4e54100b122d0a29474f4f474c455f4143434f554e545f555345525f414e" . + "445f4144535f555345525f4d49534d41544348100c12190a154c4f47494e" . + "5f434f4f4b49455f5245515549524544100d12100a0c4e4f545f4144535f" . + "55534552100e12170a134f415554485f544f4b454e5f494e56414c494410" . + "0f12170a134f415554485f544f4b454e5f45585049524544101012180a14" . + "4f415554485f544f4b454e5f44495341424c4544101112170a134f415554" . + "485f544f4b454e5f5245564f4b45441012121e0a1a4f415554485f544f4b" . + "454e5f4845414445525f494e56414c4944101312180a144c4f47494e5f43" . + "4f4f4b49455f494e56414c4944101412230a1f4641494c45445f544f5f52" . + "455452494556455f4c4f47494e5f434f4f4b4945101512130a0f55534552" . + "5f49445f494e56414c4944101642ce010a22636f6d2e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e6572726f7273421841757468656e" . + "7469636174696f6e4572726f7250726f746f50015a44676f6f676c652e67" . + "6f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f" . + "6164732f676f6f676c656164732f76302f6572726f72733b6572726f7273" . + "a20203474141aa021e476f6f676c652e4164732e476f6f676c654164732e" . + "56302e4572726f7273ca021e476f6f676c655c4164735c476f6f676c6541" . + "64735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/AuthorizationError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/AuthorizationError.php new file mode 100644 index 000000000..6d2fceba3 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/AuthorizationError.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile(hex2bin( + "0a92040a38676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f617574686f72697a6174696f6e5f6572726f722e70726f74" . + "6f121e676f6f676c652e6164732e676f6f676c656164732e76302e657272" . + "6f727322dd010a16417574686f72697a6174696f6e4572726f72456e756d" . + "22c2010a12417574686f72697a6174696f6e4572726f72120f0a0b554e53" . + "50454349464945441000120b0a07554e4b4e4f574e1001121a0a16555345" . + "525f5045524d495353494f4e5f44454e494544100212230a1f444556454c" . + "4f5045525f544f4b454e5f4e4f545f57484954454c49535445441003121e" . + "0a1a444556454c4f5045525f544f4b454e5f50524f484942495445441004" . + "12140a1050524f4a4543545f44495341424c4544100512170a1341555448" . + "4f52495a4154494f4e5f4552524f52100642cd010a22636f6d2e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e6572726f727342174175" . + "74686f72697a6174696f6e4572726f7250726f746f50015a44676f6f676c" . + "652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c656170" . + "69732f6164732f676f6f676c656164732f76302f6572726f72733b657272" . + "6f7273a20203474141aa021e476f6f676c652e4164732e476f6f676c6541" . + "64732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f67" . + "6c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/BiddingError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/BiddingError.php new file mode 100644 index 000000000..1990718ba --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/BiddingError.php @@ -0,0 +1,65 @@ +internalAddGeneratedFile(hex2bin( + "0ae2090a32676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f62696464696e675f6572726f722e70726f746f121e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e6572726f727322b907" . + "0a1042696464696e674572726f72456e756d22a4070a0c42696464696e67" . + "4572726f72120f0a0b554e5350454349464945441000120b0a07554e4b4e" . + "4f574e1001122b0a2742494444494e475f53545241544547595f5452414e" . + "534954494f4e5f4e4f545f414c4c4f5745441002122e0a2a43414e4e4f54" . + "5f4154544143485f42494444494e475f53545241544547595f544f5f4341" . + "4d504149474e1007122b0a27494e56414c49445f414e4f4e594d4f55535f" . + "42494444494e475f53545241544547595f54595045100a12210a1d494e56" . + "414c49445f42494444494e475f53545241544547595f54595045100e120f" . + "0a0b494e56414c49445f424944101112330a2f42494444494e475f535452" . + "41544547595f4e4f545f415641494c41424c455f464f525f4143434f554e" . + "545f54595045101212230a1f434f4e56455253494f4e5f545241434b494e" . + "475f4e4f545f454e41424c45441013121a0a164e4f545f454e4f5547485f" . + "434f4e56455253494f4e53101412300a2c43414e4e4f545f435245415445" . + "5f43414d504149474e5f574954485f42494444494e475f53545241544547" . + "591015124f0a4b43414e4e4f545f5441524745545f434f4e54454e545f4e" . + "4554574f524b5f4f4e4c595f574954485f43414d504149474e5f4c455645" . + "4c5f504f505f42494444494e475f5354524154454759101712330a2f4249" . + "4444494e475f53545241544547595f4e4f545f535550504f525445445f57" . + "4954485f41445f5343484544554c45101812310a2d5041595f5045525f43" . + "4f4e56455253494f4e5f4e4f545f415641494c41424c455f464f525f4355" . + "53544f4d4552101912320a2e5041595f5045525f434f4e56455253494f4e" . + "5f4e4f545f414c4c4f5745445f574954485f5441524745545f435041101a" . + "123a0a3642494444494e475f53545241544547595f4e4f545f414c4c4f57" . + "45445f464f525f5345415243485f4f4e4c595f43414d504149474e53101b" . + "123b0a3742494444494e475f53545241544547595f4e4f545f535550504f" . + "525445445f494e5f4452414654535f4f525f4558504552494d454e545310" . + "1c12490a4542494444494e475f53545241544547595f545950455f444f45" . + "535f4e4f545f535550504f52545f50524f445543545f545950455f414447" . + "524f55505f435249544552494f4e101d12110a0d4249445f544f4f5f534d" . + "414c4c101e120f0a0b4249445f544f4f5f424947101f12220a1e4249445f" . + "544f4f5f4d414e595f4652414354494f4e414c5f44494749545310201217" . + "0a13494e56414c49445f444f4d41494e5f4e414d45102142c7010a22636f" . + "6d2e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f" . + "7273421142696464696e674572726f7250726f746f50015a44676f6f676c" . + "652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c656170" . + "69732f6164732f676f6f676c656164732f76302f6572726f72733b657272" . + "6f7273a20203474141aa021e476f6f676c652e4164732e476f6f676c6541" . + "64732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f67" . + "6c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/BiddingStrategyError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/BiddingStrategyError.php new file mode 100644 index 000000000..9bf6789ff --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/BiddingStrategyError.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile(hex2bin( + "0a93040a3b676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f62696464696e675f73747261746567795f6572726f722e70" . + "726f746f121e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "6572726f727322d9010a1842696464696e6753747261746567794572726f" . + "72456e756d22bc010a1442696464696e6753747261746567794572726f72" . + "120f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e1001" . + "12120a0e4455504c49434154455f4e414d45100212270a2343414e4e4f54" . + "5f4348414e47455f42494444494e475f53545241544547595f5459504510" . + "0312250a2143414e4e4f545f52454d4f56455f4153534f4349415445445f" . + "5354524154454759100412220a1e42494444494e475f5354524154454759" . + "5f4e4f545f535550504f52544544100542cf010a22636f6d2e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f72734219426964" . + "64696e6753747261746567794572726f7250726f746f50015a44676f6f67" . + "6c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c6561" . + "7069732f6164732f676f6f676c656164732f76302f6572726f72733b6572" . + "726f7273a20203474141aa021e476f6f676c652e4164732e476f6f676c65" . + "4164732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f" . + "676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/CampaignBudgetError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/CampaignBudgetError.php new file mode 100644 index 000000000..81d9efbf7 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/CampaignBudgetError.php @@ -0,0 +1,57 @@ +internalAddGeneratedFile(hex2bin( + "0af2070a3a676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f63616d706169676e5f6275646765745f6572726f722e7072" . + "6f746f121e676f6f676c652e6164732e676f6f676c656164732e76302e65" . + "72726f727322ba050a1743616d706169676e4275646765744572726f7245" . + "6e756d229e050a1343616d706169676e4275646765744572726f72120f0a" . + "0b554e5350454349464945441000120b0a07554e4b4e4f574e1001121b0a" . + "1743414d504149474e5f4255444745545f52454d4f5645441002121a0a16" . + "43414d504149474e5f4255444745545f494e5f555345100312280a244341" . + "4d504149474e5f4255444745545f504552494f445f4e4f545f415641494c" . + "41424c451004123c0a3843414e4e4f545f4d4f444946595f4649454c445f" . + "4f465f494d504c494349544c595f5348415245445f43414d504149474e5f" . + "425544474554100612360a3243414e4e4f545f5550444154455f43414d50" . + "4149474e5f4255444745545f544f5f494d504c494349544c595f53484152" . + "4544100712430a3f43414e4e4f545f5550444154455f43414d504149474e" . + "5f4255444745545f544f5f4558504c494349544c595f5348415245445f57" . + "4954484f55545f4e414d45100812360a3243414e4e4f545f555044415445" . + "5f43414d504149474e5f4255444745545f544f5f4558504c494349544c59" . + "5f534841524544100912480a4443414e4e4f545f5553455f494d504c4943" . + "49544c595f5348415245445f43414d504149474e5f4255444745545f5749" . + "54485f4d554c5449504c455f43414d504149474e53100a12120a0e445550" . + "4c49434154455f4e414d45100b12220a1e4d4f4e45595f414d4f554e545f" . + "494e5f57524f4e475f43555252454e4359100c122f0a2b4d4f4e45595f41" . + "4d4f554e545f4c4553535f5448414e5f43555252454e43595f4d494e494d" . + "554d5f435043100d121a0a164d4f4e45595f414d4f554e545f544f4f5f4c" . + "41524745100e12190a154e454741544956455f4d4f4e45595f414d4f554e" . + "54100f12290a254e4f4e5f4d554c5449504c455f4f465f4d494e494d554d" . + "5f43555252454e43595f554e4954101042ce010a22636f6d2e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f7273421843616d" . + "706169676e4275646765744572726f7250726f746f50015a44676f6f676c" . + "652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c656170" . + "69732f6164732f676f6f676c656164732f76302f6572726f72733b657272" . + "6f7273a20203474141aa021e476f6f676c652e4164732e476f6f676c6541" . + "64732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f67" . + "6c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/CampaignCriterionError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/CampaignCriterionError.php new file mode 100644 index 000000000..d61086dab --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/CampaignCriterionError.php @@ -0,0 +1,50 @@ +internalAddGeneratedFile(hex2bin( + "0a8d060a3d676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f63616d706169676e5f637269746572696f6e5f6572726f72" . + "2e70726f746f121e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e6572726f727322cf030a1a43616d706169676e437269746572696f6e" . + "4572726f72456e756d22b0030a1643616d706169676e437269746572696f" . + "6e4572726f72120f0a0b554e5350454349464945441000120b0a07554e4b" . + "4e4f574e1001121a0a16434f4e43524554455f545950455f524551554952" . + "4544100212190a15494e56414c49445f504c4143454d454e545f55524c10" . + "0312200a1c43414e4e4f545f4558434c5544455f43524954455249415f54" . + "595045100412270a2343414e4e4f545f5345545f5354415455535f464f52" . + "5f43524954455249415f545950451005122b0a2743414e4e4f545f534554" . + "5f5354415455535f464f525f4558434c554445445f435249544552494110" . + "06121d0a1943414e4e4f545f5441524745545f414e445f4558434c554445" . + "100712170a13544f4f5f4d414e595f4f5045524154494f4e531008122d0a" . + "294f50455241544f525f4e4f545f535550504f525445445f464f525f4352" . + "49544552494f4e5f54595045100912430a3f53484f5050494e475f43414d" . + "504149474e5f53414c45535f434f554e5452595f4e4f545f535550504f52" . + "5445445f464f525f53414c45535f4348414e4e454c100a121d0a1943414e" . + "4e4f545f4144445f4558495354494e475f4649454c44100b42d1010a2263" . + "6f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e657272" . + "6f7273421b43616d706169676e437269746572696f6e4572726f7250726f" . + "746f50015a44676f6f676c652e676f6c616e672e6f72672f67656e70726f" . + "746f2f676f6f676c65617069732f6164732f676f6f676c656164732f7630" . + "2f6572726f72733b6572726f7273a20203474141aa021e476f6f676c652e" . + "4164732e476f6f676c654164732e56302e4572726f7273ca021e476f6f67" . + "6c655c4164735c476f6f676c654164735c56305c4572726f727362067072" . + "6f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/CampaignError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/CampaignError.php new file mode 100644 index 000000000..95a606bc3 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/CampaignError.php @@ -0,0 +1,87 @@ +internalAddGeneratedFile(hex2bin( + "0afa0e0a33676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f63616d706169676e5f6572726f722e70726f746f121e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f727322cf" . + "0c0a1143616d706169676e4572726f72456e756d22b90c0a0d43616d7061" . + "69676e4572726f72120f0a0b554e5350454349464945441000120b0a0755" . + "4e4b4e4f574e100112210a1d43414e4e4f545f5441524745545f434f4e54" . + "454e545f4e4554574f524b100312200a1c43414e4e4f545f544152474554" . + "5f5345415243485f4e4554574f524b100412360a3243414e4e4f545f5441" . + "524745545f5345415243485f4e4554574f524b5f574954484f55545f474f" . + "4f474c455f534541524348100512300a2c43414e4e4f545f544152474554" . + "5f474f4f474c455f5345415243485f464f525f43504d5f43414d50414947" . + "4e1006122d0a2943414d504149474e5f4d5553545f5441524745545f4154" . + "5f4c454153545f4f4e455f4e4554574f524b100712280a2443414e4e4f54" . + "5f5441524745545f504152544e45525f5345415243485f4e4554574f524b" . + "1008124b0a4743414e4e4f545f5441524745545f434f4e54454e545f4e45" . + "54574f524b5f4f4e4c595f574954485f43524954455249415f4c4556454c" . + "5f42494444494e475f5354524154454759100912360a3243414d50414947" . + "4e5f4455524154494f4e5f4d5553545f434f4e5441494e5f414c4c5f5255" . + "4e4e41424c455f545249414c53100a12240a2043414e4e4f545f4d4f4449" . + "46595f464f525f545249414c5f43414d504149474e100b121b0a17445550" . + "4c49434154455f43414d504149474e5f4e414d45100c121f0a1b494e434f" . + "4d50415449424c455f43414d504149474e5f4649454c44100d12190a1549" . + "4e56414c49445f43414d504149474e5f4e414d45100e122a0a26494e5641" . + "4c49445f41445f53455256494e475f4f5054494d495a4154494f4e5f5354" . + "41545553100f12180a14494e56414c49445f545241434b494e475f55524c" . + "1010123e0a3a43414e4e4f545f5345545f424f54485f545241434b494e47" . + "5f55524c5f54454d504c4154455f414e445f545241434b494e475f534554" . + "54494e47101112200a1c4d41585f494d5052455353494f4e535f4e4f545f" . + "494e5f52414e47451012121b0a1754494d455f554e49545f4e4f545f5355" . + "50504f52544544101312310a2d494e56414c49445f4f5045524154494f4e" . + "5f49465f53455256494e475f5354415455535f4841535f454e4445441014" . + "121b0a174255444745545f43414e4e4f545f42455f534841524544101512" . + "250a2143414d504149474e5f43414e4e4f545f5553455f5348415245445f" . + "425544474554101612300a2c43414e4e4f545f4348414e47455f42554447" . + "45545f4f4e5f43414d504149474e5f574954485f545249414c5310171221" . + "0a1d43414d504149474e5f4c4142454c5f444f45535f4e4f545f45584953" . + "54101812210a1d43414d504149474e5f4c4142454c5f414c52454144595f" . + "4558495354531019121c0a184d495353494e475f53484f5050494e475f53" . + "455454494e47101a12220a1e494e56414c49445f53484f5050494e475f53" . + "414c45535f434f554e545259101b12390a3553484f5050494e475f4d4552" . + "4348414e545f4e4f545f414c4c4f5745445f464f525f5055524348415345" . + "535f4f4e5f474f4f474c45101c12400a3c5055524348415345535f4f4e5f" . + "474f4f474c455f4e4f545f535550504f525445445f464f525f53484f5050" . + "494e475f53414c45535f434f554e545259101d122a0a264d495353494e47" . + "5f554e4956455253414c5f4150505f43414d504149474e5f53455454494e" . + "47101e123b0a374144564552544953494e475f4348414e4e454c5f545950" . + "455f4e4f545f415641494c41424c455f464f525f4143434f554e545f5459" . + "5045101f12280a24494e56414c49445f4144564552544953494e475f4348" . + "414e4e454c5f5355425f545950451020122c0a2841545f4c454153545f4f" . + "4e455f434f4e56455253494f4e5f4d5553545f42455f53454c4543544544" . + "1021121f0a1b43414e4e4f545f5345545f41445f524f544154494f4e5f4d" . + "4f44451022122f0a2b43414e4e4f545f4d4f444946595f53544152545f44" . + "4154455f49465f414c52454144595f535441525445441023121b0a174341" . + "4e4e4f545f5345545f444154455f544f5f504153541024121f0a1b4d4953" . + "53494e475f484f54454c5f435553544f4d45525f4c494e4b1025121f0a1b" . + "494e56414c49445f484f54454c5f435553544f4d45525f4c494e4b102612" . + "190a154d495353494e475f484f54454c5f53455454494e47102742c8010a" . + "22636f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e65" . + "72726f7273421243616d706169676e4572726f7250726f746f50015a4467" . + "6f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f67" . + "6c65617069732f6164732f676f6f676c656164732f76302f6572726f7273" . + "3b6572726f7273a20203474141aa021e476f6f676c652e4164732e476f6f" . + "676c654164732e56302e4572726f7273ca021e476f6f676c655c4164735c" . + "476f6f676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/CollectionSizeError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/CollectionSizeError.php new file mode 100644 index 000000000..e9b906114 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/CollectionSizeError.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0aa0030a3a676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f636f6c6c656374696f6e5f73697a655f6572726f722e7072" . + "6f746f121e676f6f676c652e6164732e676f6f676c656164732e76302e65" . + "72726f727322690a17436f6c6c656374696f6e53697a654572726f72456e" . + "756d224e0a13436f6c6c656374696f6e53697a654572726f72120f0a0b55" . + "4e5350454349464945441000120b0a07554e4b4e4f574e1001120b0a0754" . + "4f4f5f4645571002120c0a08544f4f5f4d414e59100342ce010a22636f6d" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f72" . + "734218436f6c6c656374696f6e53697a654572726f7250726f746f50015a" . + "44676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f" . + "6f676c65617069732f6164732f676f6f676c656164732f76302f6572726f" . + "72733b6572726f7273a20203474141aa021e476f6f676c652e4164732e47" . + "6f6f676c654164732e56302e4572726f7273ca021e476f6f676c655c4164" . + "735c476f6f676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/ContextError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/ContextError.php new file mode 100644 index 000000000..814110664 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/ContextError.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a91030a32676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f636f6e746578745f6572726f722e70726f746f121e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e6572726f727322690a" . + "10436f6e746578744572726f72456e756d22550a0c436f6e746578744572" . + "726f72120f0a0b554e5350454349464945441000120b0a07554e4b4e4f57" . + "4e100112270a234f5045524154494f4e5f4e4f545f5045524d4954544544" . + "5f464f525f434f4e54455854100242c7010a22636f6d2e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e6572726f72734211436f6e7465" . + "78744572726f7250726f746f50015a44676f6f676c652e676f6c616e672e" . + "6f72672f67656e70726f746f2f676f6f676c65617069732f6164732f676f" . + "6f676c656164732f76302f6572726f72733b6572726f7273a20203474141" . + "aa021e476f6f676c652e4164732e476f6f676c654164732e56302e457272" . + "6f7273ca021e476f6f676c655c4164735c476f6f676c654164735c56305c" . + "4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/CriterionError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/CriterionError.php new file mode 100644 index 000000000..dcd25bf11 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/CriterionError.php @@ -0,0 +1,136 @@ +internalAddGeneratedFile(hex2bin( + "0aa01a0a34676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f637269746572696f6e5f6572726f722e70726f746f121e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e6572726f727322" . + "f3170a12437269746572696f6e4572726f72456e756d22dc170a0e437269" . + "746572696f6e4572726f72120f0a0b554e5350454349464945441000120b" . + "0a07554e4b4e4f574e1001121a0a16434f4e43524554455f545950455f52" . + "455155495245441002121d0a19494e56414c49445f4558434c554445445f" . + "43415445474f5259100312180a14494e56414c49445f4b4559574f52445f" . + "54455854100412190a154b4559574f52445f544558545f544f4f5f4c4f4e" . + "471005121e0a1a4b4559574f52445f4841535f544f4f5f4d414e595f574f" . + "5244531006121d0a194b4559574f52445f4841535f494e56414c49445f43" . + "48415253100712190a15494e56414c49445f504c4143454d454e545f5552" . + "4c100812150a11494e56414c49445f555345525f4c495354100912190a15" . + "494e56414c49445f555345525f494e544552455354100a12240a20494e56" . + "414c49445f464f524d41545f464f525f504c4143454d454e545f55524c10" . + "0b121d0a19504c4143454d454e545f55524c5f49535f544f4f5f4c4f4e47" . + "100c12220a1e504c4143454d454e545f55524c5f4841535f494c4c454741" . + "4c5f43484152100d122c0a28504c4143454d454e545f55524c5f4841535f" . + "4d554c5449504c455f53495445535f494e5f4c494e45100e12390a35504c" . + "4143454d454e545f49535f4e4f545f415641494c41424c455f464f525f54" . + "4152474554494e475f4f525f4558434c5553494f4e100f12190a15494e56" . + "414c49445f564552544943414c5f504154481010121e0a1a494e56414c49" . + "445f594f55545542455f4348414e4e454c5f49441011121c0a18494e5641" . + "4c49445f594f55545542455f564944454f5f4944101212270a23594f5554" . + "5542455f564552544943414c5f4348414e4e454c5f444550524543415445" . + "441013122a0a26594f55545542455f44454d4f475241504849435f434841" . + "4e4e454c5f444550524543415445441014121b0a17594f55545542455f55" . + "524c5f554e535550504f52544544101512200a1c43414e4e4f545f455843" . + "4c5544455f43524954455249415f545950451016121c0a1843414e4e4f54" . + "5f4144445f43524954455249415f545950451017121a0a16494e56414c49" . + "445f50524f445543545f46494c5445521018121b0a1750524f445543545f" . + "46494c5445525f544f4f5f4c4f4e47101912240a2043414e4e4f545f4558" . + "434c5544455f53494d494c41525f555345525f4c495354101a121f0a1b43" . + "414e4e4f545f4144445f434c4f5345445f555345525f4c495354101b123a" . + "0a3643414e4e4f545f4144445f444953504c41595f4f4e4c595f4c495354" . + "535f544f5f5345415243485f4f4e4c595f43414d504149474e53101c1235" . + "0a3143414e4e4f545f4144445f444953504c41595f4f4e4c595f4c495354" . + "535f544f5f5345415243485f43414d504149474e53101d12370a3343414e" . + "4e4f545f4144445f444953504c41595f4f4e4c595f4c495354535f544f5f" . + "53484f5050494e475f43414d504149474e53101e12310a2d43414e4e4f54" . + "5f4144445f555345525f494e544552455354535f544f5f5345415243485f" . + "43414d504149474e53101f12390a3543414e4e4f545f5345545f42494453" . + "5f4f4e5f435249544552494f4e5f545950455f494e5f5345415243485f43" . + "414d504149474e53102012370a3343414e4e4f545f4144445f55524c535f" . + "544f5f435249544552494f4e5f545950455f464f525f43414d504149474e" . + "5f54595045102112160a12494e56414c49445f49505f4144445245535310" . + "2212150a11494e56414c49445f49505f464f524d4154102312160a12494e" . + "56414c49445f4d4f42494c455f4150501024121f0a1b494e56414c49445f" . + "4d4f42494c455f4150505f43415445474f5259102512180a14494e56414c" . + "49445f435249544552494f4e5f49441026121b0a1743414e4e4f545f5441" . + "524745545f435249544552494f4e102712240a2043414e4e4f545f544152" . + "4745545f4f42534f4c4554455f435249544552494f4e102812220a1e4352" . + "49544552494f4e5f49445f414e445f545950455f4d49534d415443481029" . + "121c0a18494e56414c49445f50524f58494d4954595f524144495553102a" . + "12220a1e494e56414c49445f50524f58494d4954595f5241444955535f55" . + "4e495453102b12200a1c494e56414c49445f535452454554414444524553" . + "535f4c454e475448102c121b0a17494e56414c49445f434954594e414d45" . + "5f4c454e475448102d121d0a19494e56414c49445f524547494f4e434f44" . + "455f4c454e475448102e121d0a19494e56414c49445f524547494f4e4e41" . + "4d455f4c454e475448102f121d0a19494e56414c49445f504f5354414c43" . + "4f44455f4c454e475448103012180a14494e56414c49445f434f554e5452" . + "595f434f4445103112140a10494e56414c49445f4c415449545544451032" . + "12150a11494e56414c49445f4c4f4e474954554445103312360a3250524f" . + "58494d4954595f47454f504f494e545f414e445f414444524553535f424f" . + "54485f43414e4e4f545f42455f4e554c4c1034121d0a19494e56414c4944" . + "5f50524f58494d4954595f414444524553531035121c0a18494e56414c49" . + "445f555345525f444f4d41494e5f4e414d45103612200a1c435249544552" . + "494f4e5f504152414d455445525f544f4f5f4c4f4e47103712260a224144" . + "5f5343484544554c455f54494d455f494e54455256414c535f4f5645524c" . + "4150103812320a2e41445f5343484544554c455f494e54455256414c5f43" . + "414e4e4f545f5350414e5f4d554c5449504c455f44415953103912250a21" . + "41445f5343484544554c455f494e56414c49445f54494d455f494e544552" . + "56414c103a12300a2c41445f5343484544554c455f45584345454445445f" . + "494e54455256414c535f5045525f4441595f4c494d4954103b122f0a2b41" . + "445f5343484544554c455f435249544552494f4e5f49445f4d49534d4154" . + "4348494e475f4649454c4453103c12240a2043414e4e4f545f4249445f4d" . + "4f444946595f435249544552494f4e5f54595045103d12320a2e43414e4e" . + "4f545f4249445f4d4f444946595f435249544552494f4e5f43414d504149" . + "474e5f4f505445445f4f5554103e12280a2443414e4e4f545f4249445f4d" . + "4f444946595f4e454741544956455f435249544552494f4e103f121f0a1b" . + "4249445f4d4f4449464945525f414c52454144595f455849535453104012" . + "170a13464545445f49445f4e4f545f414c4c4f574544104112280a244143" . + "434f554e545f494e454c494749424c455f464f525f43524954455249415f" . + "545950451042122e0a2a43524954455249415f545950455f494e56414c49" . + "445f464f525f42494444494e475f53545241544547591043121c0a184341" . + "4e4e4f545f4558434c5544455f435249544552494f4e1044121b0a174341" . + "4e4e4f545f52454d4f56455f435249544552494f4e1045121a0a1650524f" . + "445543545f53434f50455f544f4f5f4c4f4e47104612250a2150524f4455" . + "43545f53434f50455f544f4f5f4d414e595f44494d454e53494f4e531047" . + "121e0a1a50524f445543545f504152544954494f4e5f544f4f5f4c4f4e47" . + "104812290a2550524f445543545f504152544954494f4e5f544f4f5f4d41" . + "4e595f44494d454e53494f4e531049121d0a19494e56414c49445f50524f" . + "445543545f44494d454e53494f4e104a12220a1e494e56414c49445f5052" . + "4f445543545f44494d454e53494f4e5f54595045104b12240a20494e5641" . + "4c49445f50524f445543545f42494444494e475f43415445474f5259104c" . + "121c0a184d495353494e475f53484f5050494e475f53455454494e47104d" . + "121d0a19494e56414c49445f4d41544348494e475f46554e4354494f4e10" . + "4e121f0a1b4c4f434154494f4e5f46494c5445525f4e4f545f414c4c4f57" . + "4544104f121b0a174c4f434154494f4e5f46494c5445525f494e56414c49" . + "44105012320a2e43414e4e4f545f4154544143485f43524954455249415f" . + "41545f43414d504149474e5f414e445f414447524f5550105112390a3548" . + "4f54454c5f4c454e4754485f4f465f535441595f4f5645524c4150535f57" . + "4954485f4558495354494e475f435249544552494f4e105212410a3d484f" . + "54454c5f414456414e43455f424f4f4b494e475f57494e444f575f4f5645" . + "524c4150535f574954485f4558495354494e475f435249544552494f4e10" . + "5342c9010a22636f6d2e676f6f676c652e6164732e676f6f676c65616473" . + "2e76302e6572726f72734213437269746572696f6e4572726f7250726f74" . + "6f50015a44676f6f676c652e676f6c616e672e6f72672f67656e70726f74" . + "6f2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f" . + "6572726f72733b6572726f7273a20203474141aa021e476f6f676c652e41" . + "64732e476f6f676c654164732e56302e4572726f7273ca021e476f6f676c" . + "655c4164735c476f6f676c654164735c56305c4572726f7273620670726f" . + "746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/DateError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/DateError.php new file mode 100644 index 000000000..8d49d4a16 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/DateError.php @@ -0,0 +1,45 @@ +internalAddGeneratedFile(hex2bin( + "0a83050a2f676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f646174655f6572726f722e70726f746f121e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e6572726f727322e0020a0d44" . + "6174654572726f72456e756d22ce020a09446174654572726f72120f0a0b" . + "554e5350454349464945441000120b0a07554e4b4e4f574e100112200a1c" . + "494e56414c49445f4649454c445f56414c5545535f494e5f444154451002" . + "12250a21494e56414c49445f4649454c445f56414c5545535f494e5f4441" . + "54455f54494d45100312170a13494e56414c49445f535452494e475f4441" . + "54451004121c0a18494e56414c49445f535452494e475f444154455f5449" . + "4d451006121d0a194541524c4945525f5448414e5f4d494e494d554d5f44" . + "4154451007121b0a174c415445525f5448414e5f4d4158494d554d5f4441" . + "5445100812330a2f444154455f52414e47455f4d494e494d554d5f444154" . + "455f4c415445525f5448414e5f4d4158494d554d5f44415445100912320a" . + "2e444154455f52414e47455f4d494e494d554d5f414e445f4d4158494d55" . + "4d5f44415445535f424f54485f4e554c4c100a42c4010a22636f6d2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f7273420e" . + "446174654572726f7250726f746f50015a44676f6f676c652e676f6c616e" . + "672e6f72672f67656e70726f746f2f676f6f676c65617069732f6164732f" . + "676f6f676c656164732f76302f6572726f72733b6572726f7273a2020347" . + "4141aa021e476f6f676c652e4164732e476f6f676c654164732e56302e45" . + "72726f7273ca021e476f6f676c655c4164735c476f6f676c654164735c56" . + "305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/DateRangeError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/DateRangeError.php new file mode 100644 index 000000000..104c5bdab --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/DateRangeError.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile(hex2bin( + "0a94040a35676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f646174655f72616e67655f6572726f722e70726f746f121e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e6572726f7273" . + "22e6010a124461746552616e67654572726f72456e756d22cf010a0e4461" . + "746552616e67654572726f72120f0a0b554e535045434946494544100012" . + "0b0a07554e4b4e4f574e100112100a0c494e56414c49445f444154451002" . + "121d0a1953544152545f444154455f41465445525f454e445f4441544510" . + "03121b0a1743414e4e4f545f5345545f444154455f544f5f504153541004" . + "12200a1c41465445525f4d4158494d554d5f414c4c4f5741424c455f4441" . + "54451005122f0a2b43414e4e4f545f4d4f444946595f53544152545f4441" . + "54455f49465f414c52454144595f53544152544544100642c9010a22636f" . + "6d2e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f" . + "727342134461746552616e67654572726f7250726f746f50015a44676f6f" . + "676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c65" . + "617069732f6164732f676f6f676c656164732f76302f6572726f72733b65" . + "72726f7273a20203474141aa021e476f6f676c652e4164732e476f6f676c" . + "654164732e56302e4572726f7273ca021e476f6f676c655c4164735c476f" . + "6f676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/DistinctError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/DistinctError.php new file mode 100644 index 000000000..a71b9c094 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/DistinctError.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a97030a33676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f64697374696e63745f6572726f722e70726f746f121e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f7273226d" . + "0a1144697374696e63744572726f72456e756d22580a0d44697374696e63" . + "744572726f72120f0a0b554e5350454349464945441000120b0a07554e4b" . + "4e4f574e100112150a114455504c49434154455f454c454d454e54100212" . + "120a0e4455504c49434154455f54595045100342c8010a22636f6d2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f72734212" . + "44697374696e63744572726f7250726f746f50015a44676f6f676c652e67" . + "6f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f" . + "6164732f676f6f676c656164732f76302f6572726f72733b6572726f7273" . + "a20203474141aa021e476f6f676c652e4164732e476f6f676c654164732e" . + "56302e4572726f7273ca021e476f6f676c655c4164735c476f6f676c6541" . + "64735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/Errors.php b/metadata/Google/Ads/GoogleAds/V0/Errors/Errors.php new file mode 100644 index 000000000..862b49457 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/Errors.php @@ -0,0 +1,384 @@ +internalAddGeneratedFile(hex2bin( + "0af7470a2b676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6572726f72732e70726f746f121e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e6572726f72731a2a676f6f676c652f61" . + "64732f676f6f676c656164732f76302f636f6d6d6f6e2f76616c75652e70" . + "726f746f1a38676f6f676c652f6164732f676f6f676c656164732f76302f" . + "6572726f72732f61645f637573746f6d697a65725f6572726f722e70726f" . + "746f1a2d676f6f676c652f6164732f676f6f676c656164732f76302f6572" . + "726f72732f61645f6572726f722e70726f746f1a36676f6f676c652f6164" . + "732f676f6f676c656164732f76302f6572726f72732f61645f67726f7570" . + "5f61645f6572726f722e70726f746f1a40676f6f676c652f6164732f676f" . + "6f676c656164732f76302f6572726f72732f61645f67726f75705f626964" . + "5f6d6f6469666965725f6572726f722e70726f746f1a3d676f6f676c652f" . + "6164732f676f6f676c656164732f76302f6572726f72732f61645f67726f" . + "75705f637269746572696f6e5f6572726f722e70726f746f1a33676f6f67" . + "6c652f6164732f676f6f676c656164732f76302f6572726f72732f61645f" . + "67726f75705f6572726f722e70726f746f1a35676f6f676c652f6164732f" . + "676f6f676c656164732f76302f6572726f72732f61645f73686172696e67" . + "5f6572726f722e70726f746f1a2e676f6f676c652f6164732f676f6f676c" . + "656164732f76302f6572726f72732f6164785f6572726f722e70726f746f" . + "1a39676f6f676c652f6164732f676f6f676c656164732f76302f6572726f" . + "72732f61757468656e7469636174696f6e5f6572726f722e70726f746f1a" . + "38676f6f676c652f6164732f676f6f676c656164732f76302f6572726f72" . + "732f617574686f72697a6174696f6e5f6572726f722e70726f746f1a3267" . + "6f6f676c652f6164732f676f6f676c656164732f76302f6572726f72732f" . + "62696464696e675f6572726f722e70726f746f1a3b676f6f676c652f6164" . + "732f676f6f676c656164732f76302f6572726f72732f62696464696e675f" . + "73747261746567795f6572726f722e70726f746f1a3a676f6f676c652f61" . + "64732f676f6f676c656164732f76302f6572726f72732f63616d70616967" . + "6e5f6275646765745f6572726f722e70726f746f1a3d676f6f676c652f61" . + "64732f676f6f676c656164732f76302f6572726f72732f63616d70616967" . + "6e5f637269746572696f6e5f6572726f722e70726f746f1a33676f6f676c" . + "652f6164732f676f6f676c656164732f76302f6572726f72732f63616d70" . + "6169676e5f6572726f722e70726f746f1a3a676f6f676c652f6164732f67" . + "6f6f676c656164732f76302f6572726f72732f636f6c6c656374696f6e5f" . + "73697a655f6572726f722e70726f746f1a32676f6f676c652f6164732f67" . + "6f6f676c656164732f76302f6572726f72732f636f6e746578745f657272" . + "6f722e70726f746f1a34676f6f676c652f6164732f676f6f676c65616473" . + "2f76302f6572726f72732f637269746572696f6e5f6572726f722e70726f" . + "746f1a2f676f6f676c652f6164732f676f6f676c656164732f76302f6572" . + "726f72732f646174655f6572726f722e70726f746f1a35676f6f676c652f" . + "6164732f676f6f676c656164732f76302f6572726f72732f646174655f72" . + "616e67655f6572726f722e70726f746f1a33676f6f676c652f6164732f67" . + "6f6f676c656164732f76302f6572726f72732f64697374696e63745f6572" . + "726f722e70726f746f1a43676f6f676c652f6164732f676f6f676c656164" . + "732f76302f6572726f72732f666565645f6174747269627574655f726566" . + "6572656e63655f6572726f722e70726f746f1a30676f6f676c652f616473" . + "2f676f6f676c656164732f76302f6572726f72732f6669656c645f657272" . + "6f722e70726f746f1a35676f6f676c652f6164732f676f6f676c65616473" . + "2f76302f6572726f72732f6669656c645f6d61736b5f6572726f722e7072" . + "6f746f1a33676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f66756e6374696f6e5f6572726f722e70726f746f1a3b676f" . + "6f676c652f6164732f676f6f676c656164732f76302f6572726f72732f66" . + "756e6374696f6e5f70617273696e675f6572726f722e70726f746f1a2d67" . + "6f6f676c652f6164732f676f6f676c656164732f76302f6572726f72732f" . + "69645f6572726f722e70726f746f1a30676f6f676c652f6164732f676f6f" . + "676c656164732f76302f6572726f72732f696d6167655f6572726f722e70" . + "726f746f1a33676f6f676c652f6164732f676f6f676c656164732f76302f" . + "6572726f72732f696e7465726e616c5f6572726f722e70726f746f1a3967" . + "6f6f676c652f6164732f676f6f676c656164732f76302f6572726f72732f" . + "6c6973745f6f7065726174696f6e5f6572726f722e70726f746f1a37676f" . + "6f676c652f6164732f676f6f676c656164732f76302f6572726f72732f6d" . + "656469615f62756e646c655f6572726f722e70726f746f1a30676f6f676c" . + "652f6164732f676f6f676c656164732f76302f6572726f72732f6d656469" . + "615f6572726f722e70726f746f1a35676f6f676c652f6164732f676f6f67" . + "6c656164732f76302f6572726f72732f6d756c7469706c6965725f657272" . + "6f722e70726f746f1a31676f6f676c652f6164732f676f6f676c65616473" . + "2f76302f6572726f72732f6d75746174655f6572726f722e70726f746f1a" . + "40676f6f676c652f6164732f676f6f676c656164732f76302f6572726f72" . + "732f6e65775f7265736f757263655f6372656174696f6e5f6572726f722e" . + "70726f746f1a34676f6f676c652f6164732f676f6f676c656164732f7630" . + "2f6572726f72732f6e6f745f656d7074795f6572726f722e70726f746f1a" . + "2f676f6f676c652f6164732f676f6f676c656164732f76302f6572726f72" . + "732f6e756c6c5f6572726f722e70726f746f1a42676f6f676c652f616473" . + "2f676f6f676c656164732f76302f6572726f72732f6f7065726174696f6e" . + "5f6163636573735f64656e6965645f6572726f722e70726f746f1a33676f" . + "6f676c652f6164732f676f6f676c656164732f76302f6572726f72732f6f" . + "70657261746f725f6572726f722e70726f746f1a30676f6f676c652f6164" . + "732f676f6f676c656164732f76302f6572726f72732f71756572795f6572" . + "726f722e70726f746f1a30676f6f676c652f6164732f676f6f676c656164" . + "732f76302f6572726f72732f71756f74615f6572726f722e70726f746f1a" . + "30676f6f676c652f6164732f676f6f676c656164732f76302f6572726f72" . + "732f72616e67655f6572726f722e70726f746f1a39676f6f676c652f6164" . + "732f676f6f676c656164732f76302f6572726f72732f7265636f6d6d656e" . + "646174696f6e5f6572726f722e70726f746f1a36676f6f676c652f616473" . + "2f676f6f676c656164732f76302f6572726f72732f726567696f6e5f636f" . + "64655f6572726f722e70726f746f1a32676f6f676c652f6164732f676f6f" . + "676c656164732f76302f6572726f72732f726571756573745f6572726f72" . + "2e70726f746f1a41676f6f676c652f6164732f676f6f676c656164732f76" . + "302f6572726f72732f7265736f757263655f6163636573735f64656e6965" . + "645f6572726f722e70726f746f1a48676f6f676c652f6164732f676f6f67" . + "6c656164732f76302f6572726f72732f7265736f757263655f636f756e74" . + "5f6c696d69745f65786365656465645f6572726f722e70726f746f1a3267" . + "6f6f676c652f6164732f676f6f676c656164732f76302f6572726f72732f" . + "73657474696e675f6572726f722e70726f746f1a38676f6f676c652f6164" . + "732f676f6f676c656164732f76302f6572726f72732f737472696e675f66" . + "6f726d61745f6572726f722e70726f746f1a38676f6f676c652f6164732f" . + "676f6f676c656164732f76302f6572726f72732f737472696e675f6c656e" . + "6774685f6572726f722e70726f746f1a34676f6f676c652f6164732f676f" . + "6f676c656164732f76302f6572726f72732f75726c5f6669656c645f6572" . + "726f722e70726f746f1a1e676f6f676c652f70726f746f6275662f777261" . + "70706572732e70726f746f22520a10476f6f676c654164734661696c7572" . + "65123e0a066572726f727318012003280b322e2e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e6572726f72732e476f6f676c65416473" . + "4572726f722298020a0e476f6f676c654164734572726f72123d0a0a6572" . + "726f725f636f646518012001280b32292e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e6572726f72732e4572726f72436f6465120f0a" . + "076d65737361676518022001280912360a07747269676765721803200128" . + "0b32252e676f6f676c652e6164732e676f6f676c656164732e76302e636f" . + "6d6d6f6e2e56616c7565123f0a086c6f636174696f6e18042001280b322d" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f72" . + "732e4572726f724c6f636174696f6e123d0a0764657461696c7318052001" . + "280b322c2e676f6f676c652e6164732e676f6f676c656164732e76302e65" . + "72726f72732e4572726f7244657461696c7322bf270a094572726f72436f" . + "646512560a0d726571756573745f6572726f7218012001280e323d2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f72732e52" . + "6571756573744572726f72456e756d2e526571756573744572726f724800" . + "126f0a1662696464696e675f73747261746567795f6572726f7218022001" . + "280e324d2e676f6f676c652e6164732e676f6f676c656164732e76302e65" . + "72726f72732e42696464696e6753747261746567794572726f72456e756d" . + "2e42696464696e6753747261746567794572726f724800125a0a0f75726c" . + "5f6669656c645f6572726f7218032001280e323f2e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e6572726f72732e55726c4669656c64" . + "4572726f72456e756d2e55726c4669656c644572726f72480012690a146c" . + "6973745f6f7065726174696f6e5f6572726f7218042001280e32492e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f72732e4c" . + "6973744f7065726174696f6e4572726f72456e756d2e4c6973744f706572" . + "6174696f6e4572726f72480012500a0b71756572795f6572726f72180520" . + "01280e32392e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "6572726f72732e51756572794572726f72456e756d2e5175657279457272" . + "6f72480012530a0c6d75746174655f6572726f7218072001280e323b2e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e6572726f72732e" . + "4d75746174654572726f72456e756d2e4d75746174654572726f72480012" . + "5d0a106669656c645f6d61736b5f6572726f7218082001280e32412e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f72732e46" . + "69656c644d61736b4572726f72456e756d2e4669656c644d61736b457272" . + "6f72480012680a13617574686f72697a6174696f6e5f6572726f72180920" . + "01280e32492e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "6572726f72732e417574686f72697a6174696f6e4572726f72456e756d2e" . + "417574686f72697a6174696f6e4572726f72480012590a0e696e7465726e" . + "616c5f6572726f72180a2001280e323f2e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e6572726f72732e496e7465726e616c4572726f" . + "72456e756d2e496e7465726e616c4572726f72480012500a0b71756f7461" . + "5f6572726f72180b2001280e32392e676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e6572726f72732e51756f74614572726f72456e756d" . + "2e51756f74614572726f72480012470a0861645f6572726f72180c200128" . + "0e32332e676f6f676c652e6164732e676f6f676c656164732e76302e6572" . + "726f72732e41644572726f72456e756d2e41644572726f72480012570a0e" . + "61645f67726f75705f6572726f72180d2001280e323d2e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e6572726f72732e416447726f75" . + "704572726f72456e756d2e416447726f75704572726f724800126c0a1563" . + "616d706169676e5f6275646765745f6572726f72180e2001280e324b2e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e6572726f72732e" . + "43616d706169676e4275646765744572726f72456e756d2e43616d706169" . + "676e4275646765744572726f72480012590a0e63616d706169676e5f6572" . + "726f72180f2001280e323f2e676f6f676c652e6164732e676f6f676c6561" . + "64732e76302e6572726f72732e43616d706169676e4572726f72456e756d" . + "2e43616d706169676e4572726f724800126b0a1461757468656e74696361" . + "74696f6e5f6572726f7218112001280e324b2e676f6f676c652e6164732e" . + "676f6f676c656164732e76302e6572726f72732e41757468656e74696361" . + "74696f6e4572726f72456e756d2e41757468656e7469636174696f6e4572" . + "726f72480012730a1861645f67726f75705f637269746572696f6e5f6572" . + "726f7218122001280e324f2e676f6f676c652e6164732e676f6f676c6561" . + "64732e76302e6572726f72732e416447726f7570437269746572696f6e45" . + "72726f72456e756d2e416447726f7570437269746572696f6e4572726f72" . + "480012660a1361645f637573746f6d697a65725f6572726f721813200128" . + "0e32472e676f6f676c652e6164732e676f6f676c656164732e76302e6572" . + "726f72732e4164437573746f6d697a65724572726f72456e756d2e416443" . + "7573746f6d697a65724572726f724800125e0a1161645f67726f75705f61" . + "645f6572726f7218152001280e32412e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e6572726f72732e416447726f757041644572726f" . + "72456e756d2e416447726f757041644572726f724800125d0a1061645f73" . + "686172696e675f6572726f7218182001280e32412e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e6572726f72732e416453686172696e" . + "674572726f72456e756d2e416453686172696e674572726f724800124a0a" . + "096164785f6572726f7218192001280e32352e676f6f676c652e6164732e" . + "676f6f676c656164732e76302e6572726f72732e4164784572726f72456e" . + "756d2e4164784572726f72480012560a0d62696464696e675f6572726f72" . + "181a2001280e323d2e676f6f676c652e6164732e676f6f676c656164732e" . + "76302e6572726f72732e42696464696e674572726f72456e756d2e426964" . + "64696e674572726f72480012750a1863616d706169676e5f637269746572" . + "696f6e5f6572726f72181d2001280e32512e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e6572726f72732e43616d706169676e437269" . + "746572696f6e4572726f72456e756d2e43616d706169676e437269746572" . + "696f6e4572726f724800126c0a15636f6c6c656374696f6e5f73697a655f" . + "6572726f72181f2001280e324b2e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e6572726f72732e436f6c6c656374696f6e53697a6545" . + "72726f72456e756d2e436f6c6c656374696f6e53697a654572726f724800" . + "125c0a0f637269746572696f6e5f6572726f7218202001280e32412e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f72732e43" . + "7269746572696f6e4572726f72456e756d2e437269746572696f6e457272" . + "6f724800124d0a0a646174655f6572726f7218212001280e32372e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e6572726f72732e4461" . + "74654572726f72456e756d2e446174654572726f724800125d0a10646174" . + "655f72616e67655f6572726f7218222001280e32412e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e6572726f72732e4461746552616e" . + "67654572726f72456e756d2e4461746552616e67654572726f7248001259" . + "0a0e64697374696e63745f6572726f7218232001280e323f2e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f72732e44697374" . + "696e63744572726f72456e756d2e44697374696e63744572726f72480012" . + "85010a1e666565645f6174747269627574655f7265666572656e63655f65" . + "72726f7218242001280e325b2e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e6572726f72732e46656564417474726962757465526566" . + "6572656e63654572726f72456e756d2e4665656441747472696275746552" . + "65666572656e63654572726f72480012590a0e66756e6374696f6e5f6572" . + "726f7218252001280e323f2e676f6f676c652e6164732e676f6f676c6561" . + "64732e76302e6572726f72732e46756e6374696f6e4572726f72456e756d" . + "2e46756e6374696f6e4572726f724800126f0a1666756e6374696f6e5f70" . + "617273696e675f6572726f7218262001280e324d2e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e6572726f72732e46756e6374696f6e" . + "50617273696e674572726f72456e756d2e46756e6374696f6e5061727369" . + "6e674572726f72480012470a0869645f6572726f7218272001280e32332e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e6572726f7273" . + "2e49644572726f72456e756d2e49644572726f72480012500a0b696d6167" . + "655f6572726f7218282001280e32392e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e6572726f72732e496d6167654572726f72456e75" . + "6d2e496d6167654572726f72480012630a126d656469615f62756e646c65" . + "5f6572726f72182a2001280e32452e676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e6572726f72732e4d6564696142756e646c65457272" . + "6f72456e756d2e4d6564696142756e646c654572726f72480012500a0b6d" . + "656469615f6572726f72182b2001280e32392e676f6f676c652e6164732e" . + "676f6f676c656164732e76302e6572726f72732e4d656469614572726f72" . + "456e756d2e4d656469614572726f724800125f0a106d756c7469706c6965" . + "725f6572726f72182c2001280e32432e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e6572726f72732e4d756c7469706c696572457272" . + "6f72456e756d2e4d756c7469706c6965724572726f724800127c0a1b6e65" . + "775f7265736f757263655f6372656174696f6e5f6572726f72182d200128" . + "0e32552e676f6f676c652e6164732e676f6f676c656164732e76302e6572" . + "726f72732e4e65775265736f757263654372656174696f6e4572726f7245" . + "6e756d2e4e65775265736f757263654372656174696f6e4572726f724800" . + "125a0a0f6e6f745f656d7074795f6572726f72182e2001280e323f2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f72732e4e" . + "6f74456d7074794572726f72456e756d2e4e6f74456d7074794572726f72" . + "4800124d0a0a6e756c6c5f6572726f72182f2001280e32372e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f72732e4e756c6c" . + "4572726f72456e756d2e4e756c6c4572726f72480012590a0e6f70657261" . + "746f725f6572726f7218302001280e323f2e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e6572726f72732e4f70657261746f72457272" . + "6f72456e756d2e4f70657261746f724572726f72480012500a0b72616e67" . + "655f6572726f7218312001280e32392e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e6572726f72732e52616e67654572726f72456e75" . + "6d2e52616e67654572726f724800126b0a147265636f6d6d656e64617469" . + "6f6e5f6572726f72183a2001280e324b2e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e6572726f72732e5265636f6d6d656e64617469" . + "6f6e4572726f72456e756d2e5265636f6d6d656e646174696f6e4572726f" . + "72480012600a11726567696f6e5f636f64655f6572726f7218332001280e" . + "32432e676f6f676c652e6164732e676f6f676c656164732e76302e657272" . + "6f72732e526567696f6e436f64654572726f72456e756d2e526567696f6e" . + "436f64654572726f72480012560a0d73657474696e675f6572726f721834" . + "2001280e323d2e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e6572726f72732e53657474696e674572726f72456e756d2e5365747469" . + "6e674572726f72480012660a13737472696e675f666f726d61745f657272" . + "6f7218352001280e32472e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e6572726f72732e537472696e67466f726d61744572726f7245" . + "6e756d2e537472696e67466f726d61744572726f72480012660a13737472" . + "696e675f6c656e6774685f6572726f7218362001280e32472e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f72732e53747269" . + "6e674c656e6774684572726f72456e756d2e537472696e674c656e677468" . + "4572726f7248001282010a1d6f7065726174696f6e5f6163636573735f64" . + "656e6965645f6572726f7218372001280e32592e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e6572726f72732e4f7065726174696f6e" . + "41636365737344656e6965644572726f72456e756d2e4f7065726174696f" . + "6e41636365737344656e6965644572726f724800127f0a1c7265736f7572" . + "63655f6163636573735f64656e6965645f6572726f7218382001280e3257" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f72" . + "732e5265736f7572636541636365737344656e6965644572726f72456e75" . + "6d2e5265736f7572636541636365737344656e6965644572726f72480012" . + "92010a237265736f757263655f636f756e745f6c696d69745f6578636565" . + "6465645f6572726f7218392001280e32632e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e6572726f72732e5265736f75726365436f75" . + "6e744c696d697445786365656465644572726f72456e756d2e5265736f75" . + "726365436f756e744c696d697445786365656465644572726f724800127a" . + "0a1b61645f67726f75705f6269645f6d6f6469666965725f6572726f7218" . + "3b2001280e32532e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e6572726f72732e416447726f75704269644d6f646966696572457272" . + "6f72456e756d2e416447726f75704269644d6f6469666965724572726f72" . + "480012560a0d636f6e746578745f6572726f72183c2001280e323d2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f72732e43" . + "6f6e746578744572726f72456e756d2e436f6e746578744572726f724800" . + "12500a0b6669656c645f6572726f72183d2001280e32392e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e6572726f72732e4669656c64" . + "4572726f72456e756d2e4669656c644572726f724800420c0a0a6572726f" . + "725f636f646522f6010a0d4572726f724c6f636174696f6e12340a0f6f70" . + "65726174696f6e5f696e64657818012001280b321b2e676f6f676c652e70" . + "726f746f6275662e496e74363456616c7565125b0a136669656c645f7061" . + "74685f656c656d656e747318022003280b323e2e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e6572726f72732e4572726f724c6f6361" . + "74696f6e2e4669656c6450617468456c656d656e741a520a104669656c64" . + "50617468456c656d656e7412120a0a6669656c645f6e616d651801200128" . + "09122a0a05696e64657818022001280b321b2e676f6f676c652e70726f74" . + "6f6275662e496e74363456616c75652288010a0c4572726f724465746169" . + "6c73121e0a16756e7075626c69736865645f6572726f725f636f64651801" . + "2001280912580a18706f6c6963795f76696f6c6174696f6e5f6465746169" . + "6c7318022001280b32362e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e6572726f72732e506f6c69637956696f6c6174696f6e446574" . + "61696c7322b3010a16506f6c69637956696f6c6174696f6e44657461696c" . + "7312230a1b65787465726e616c5f706f6c6963795f646573637269707469" . + "6f6e180220012809123f0a036b657918042001280b32322e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e636f6d6d6f6e2e506f6c6963" . + "7956696f6c6174696f6e4b6579121c0a1465787465726e616c5f706f6c69" . + "63795f6e616d6518052001280912150a0d69735f6578656d707469626c65" . + "18062001280842c1010a22636f6d2e676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e6572726f7273420b4572726f727350726f746f5001" . + "5a44676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f67" . + "6f6f676c65617069732f6164732f676f6f676c656164732f76302f657272" . + "6f72733b6572726f7273a20203474141aa021e476f6f676c652e4164732e" . + "476f6f676c654164732e56302e4572726f7273ca021e476f6f676c655c41" . + "64735c476f6f676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/FeedAttributeReferenceError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/FeedAttributeReferenceError.php new file mode 100644 index 000000000..3510dfd5d --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/FeedAttributeReferenceError.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile(hex2bin( + "0a83040a43676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f666565645f6174747269627574655f7265666572656e6365" . + "5f6572726f722e70726f746f121e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e6572726f727322ba010a1f4665656441747472696275" . + "74655265666572656e63654572726f72456e756d2296010a1b4665656441" . + "74747269627574655265666572656e63654572726f72120f0a0b554e5350" . + "454349464945441000120b0a07554e4b4e4f574e100112210a1d43414e4e" . + "4f545f5245464552454e43455f44454c455445445f46454544100212150a" . + "11494e56414c49445f464545445f4e414d451003121f0a1b494e56414c49" . + "445f464545445f4154545249425554455f4e414d45100442d6010a22636f" . + "6d2e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f" . + "72734220466565644174747269627574655265666572656e63654572726f" . + "7250726f746f50015a44676f6f676c652e676f6c616e672e6f72672f6765" . + "6e70726f746f2f676f6f676c65617069732f6164732f676f6f676c656164" . + "732f76302f6572726f72733b6572726f7273a20203474141aa021e476f6f" . + "676c652e4164732e476f6f676c654164732e56302e4572726f7273ca021e" . + "476f6f676c655c4164735c476f6f676c654164735c56305c4572726f7273" . + "620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/FieldError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/FieldError.php new file mode 100644 index 000000000..c58b7ea1d --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/FieldError.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile(hex2bin( + "0acd030a30676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6669656c645f6572726f722e70726f746f121e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f727322a8010a0e" . + "4669656c644572726f72456e756d2295010a0a4669656c644572726f7212" . + "0f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e100112" . + "0c0a085245515549524544100212130a0f494d4d555441424c455f464945" . + "4c44100312110a0d494e56414c49445f56414c5545100412170a1356414c" . + "55455f4d5553545f42455f554e5345541005121a0a165245515549524544" . + "5f4e4f4e454d5054595f4c495354100642c5010a22636f6d2e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f7273420f466965" . + "6c644572726f7250726f746f50015a44676f6f676c652e676f6c616e672e" . + "6f72672f67656e70726f746f2f676f6f676c65617069732f6164732f676f" . + "6f676c656164732f76302f6572726f72733b6572726f7273a20203474141" . + "aa021e476f6f676c652e4164732e476f6f676c654164732e56302e457272" . + "6f7273ca021e476f6f676c655c4164735c476f6f676c654164735c56305c" . + "4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/FieldMaskError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/FieldMaskError.php new file mode 100644 index 000000000..3dca6400e --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/FieldMaskError.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile(hex2bin( + "0ad5030a35676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6669656c645f6d61736b5f6572726f722e70726f746f121e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e6572726f7273" . + "22a7010a124669656c644d61736b4572726f72456e756d2290010a0e4669" . + "656c644d61736b4572726f72120f0a0b554e535045434946494544100012" . + "0b0a07554e4b4e4f574e100112160a124649454c445f4d41534b5f4d4953" . + "53494e471005121a0a164649454c445f4d41534b5f4e4f545f414c4c4f57" . + "4544100412130a0f4649454c445f4e4f545f464f554e44100212170a1346" . + "49454c445f4841535f5355424649454c4453100342c9010a22636f6d2e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e6572726f727342" . + "134669656c644d61736b4572726f7250726f746f50015a44676f6f676c65" . + "2e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069" . + "732f6164732f676f6f676c656164732f76302f6572726f72733b6572726f" . + "7273a20203474141aa021e476f6f676c652e4164732e476f6f676c654164" . + "732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f676c" . + "654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/FunctionError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/FunctionError.php new file mode 100644 index 000000000..9f2b069b3 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/FunctionError.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile(hex2bin( + "0aec060a33676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f66756e6374696f6e5f6572726f722e70726f746f121e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f727322c1" . + "040a1146756e6374696f6e4572726f72456e756d22ab040a0d46756e6374" . + "696f6e4572726f72120f0a0b554e5350454349464945441000120b0a0755" . + "4e4b4e4f574e1001121b0a17494e56414c49445f46554e4354494f4e5f46" . + "4f524d4154100212160a12444154415f545950455f4d49534d4154434810" . + "0312200a1c494e56414c49445f434f4e4a554e4354494f4e5f4f50455241" . + "4e44531004121e0a1a494e56414c49445f4e554d4245525f4f465f4f5045" . + "52414e4453100512180a14494e56414c49445f4f504552414e445f545950" . + "45100612140a10494e56414c49445f4f50455241544f52100712200a1c49" . + "4e56414c49445f524551554553545f434f4e544558545f54595045100812" . + "290a25494e56414c49445f46554e4354494f4e5f464f525f43414c4c5f50" . + "4c414345484f4c444552100912240a20494e56414c49445f46554e435449" . + "4f4e5f464f525f504c414345484f4c444552100a12130a0f494e56414c49" . + "445f4f504552414e44100b12220a1e4d495353494e475f434f4e5354414e" . + "545f4f504552414e445f56414c5545100c12220a1e494e56414c49445f43" . + "4f4e5354414e545f4f504552414e445f56414c5545100d12130a0f494e56" . + "414c49445f4e455354494e47100e12230a1f4d554c5449504c455f464545" . + "445f4944535f4e4f545f535550504f52544544100f122f0a2b494e56414c" . + "49445f46554e4354494f4e5f464f525f464545445f574954485f46495845" . + "445f534348454d411010121a0a16494e56414c49445f4154545249425554" . + "455f4e414d45101142c8010a22636f6d2e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e6572726f7273421246756e6374696f6e457272" . + "6f7250726f746f50015a44676f6f676c652e676f6c616e672e6f72672f67" . + "656e70726f746f2f676f6f676c65617069732f6164732f676f6f676c6561" . + "64732f76302f6572726f72733b6572726f7273a20203474141aa021e476f" . + "6f676c652e4164732e476f6f676c654164732e56302e4572726f7273ca02" . + "1e476f6f676c655c4164735c476f6f676c654164735c56305c4572726f72" . + "73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/FunctionParsingError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/FunctionParsingError.php new file mode 100644 index 000000000..425c249b3 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/FunctionParsingError.php @@ -0,0 +1,47 @@ +internalAddGeneratedFile(hex2bin( + "0abc050a3b676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f66756e6374696f6e5f70617273696e675f6572726f722e70" . + "726f746f121e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "6572726f72732282030a1846756e6374696f6e50617273696e674572726f" . + "72456e756d22e5020a1446756e6374696f6e50617273696e674572726f72" . + "120f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e1001" . + "12110a0d4e4f5f4d4f52455f494e505554100212160a1245585045435445" . + "445f434841524143544552100312180a14554e45585045435445445f5345" . + "50415241544f521004121a0a16554e4d4154434845445f4c4546545f4252" . + "41434b45541005121b0a17554e4d4154434845445f52494748545f425241" . + "434b45541006121d0a19544f4f5f4d414e595f4e45535445445f46554e43" . + "54494f4e531007121e0a1a4d495353494e475f52494748545f48414e445f" . + "4f504552414e44100812190a15494e56414c49445f4f50455241544f525f" . + "4e414d451009122f0a2b464545445f4154545249425554455f4f50455241" . + "4e445f415247554d454e545f4e4f545f494e5445474552100a120f0a0b4e" . + "4f5f4f504552414e4453100b12150a11544f4f5f4d414e595f4f50455241" . + "4e4453100c42cf010a22636f6d2e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e6572726f7273421946756e6374696f6e50617273696e" . + "674572726f7250726f746f50015a44676f6f676c652e676f6c616e672e6f" . + "72672f67656e70726f746f2f676f6f676c65617069732f6164732f676f6f" . + "676c656164732f76302f6572726f72733b6572726f7273a20203474141aa" . + "021e476f6f676c652e4164732e476f6f676c654164732e56302e4572726f" . + "7273ca021e476f6f676c655c4164735c476f6f676c654164735c56305c45" . + "72726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/IdError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/IdError.php new file mode 100644 index 000000000..63c437bd1 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/IdError.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile(hex2bin( + "0ae3020a2d676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f69645f6572726f722e70726f746f121e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e6572726f727322450a0b49644572" . + "726f72456e756d22360a0749644572726f72120f0a0b554e535045434946" . + "4945441000120b0a07554e4b4e4f574e1001120d0a094e4f545f464f554e" . + "44100242c2010a22636f6d2e676f6f676c652e6164732e676f6f676c6561" . + "64732e76302e6572726f7273420c49644572726f7250726f746f50015a44" . + "676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f" . + "676c65617069732f6164732f676f6f676c656164732f76302f6572726f72" . + "733b6572726f7273a20203474141aa021e476f6f676c652e4164732e476f" . + "6f676c654164732e56302e4572726f7273ca021e476f6f676c655c416473" . + "5c476f6f676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/ImageError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/ImageError.php new file mode 100644 index 000000000..c5a7c2071 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/ImageError.php @@ -0,0 +1,68 @@ +internalAddGeneratedFile(hex2bin( + "0aaf0a0a30676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f696d6167655f6572726f722e70726f746f121e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f7273228a080a0e" . + "496d6167654572726f72456e756d22f7070a0a496d6167654572726f7212" . + "0f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e100112" . + "110a0d494e56414c49445f494d414745100212110a0d53544f524147455f" . + "4552524f521003120f0a0b4241445f52455155455354100412130a0f554e" . + "45585045435445445f53495a45100512180a14414e494d415445445f4e4f" . + "545f414c4c4f574544100612160a12414e494d4154494f4e5f544f4f5f4c" . + "4f4e47100712100a0c5345525645525f4552524f52100812190a15434d59" . + "4b5f4a5045475f4e4f545f414c4c4f574544100912150a11464c4153485f" . + "4e4f545f414c4c4f574544100a121a0a16464c4153485f574954484f5554" . + "5f434c49434b544147100b12260a22464c4153485f4552524f525f414654" . + "45525f464958494e475f434c49434b5f544147100c121a0a16414e494d41" . + "5445445f56495355414c5f454646454354100d120f0a0b464c4153485f45" . + "52524f52100e12120a0e4c41594f55545f50524f424c454d100f121e0a1a" . + "50524f424c454d5f52454144494e475f494d4147455f46494c4510101217" . + "0a134552524f525f53544f52494e475f494d4147451011121c0a18415350" . + "4543545f524154494f5f4e4f545f414c4c4f5745441012121d0a19464c41" . + "53485f4841535f4e4554574f524b5f4f424a454354531013121d0a19464c" . + "4153485f4841535f4e4554574f524b5f4d4554484f4453101412110a0d46" . + "4c4153485f4841535f55524c1015121c0a18464c4153485f4841535f4d4f" . + "5553455f545241434b494e47101612180a14464c4153485f4841535f5241" . + "4e444f4d5f4e554d101712160a12464c4153485f53454c465f5441524745" . + "54531018121b0a17464c4153485f4241445f47455455524c5f5441524745" . + "541019121f0a1b464c4153485f56455253494f4e5f4e4f545f535550504f" . + "52544544101a12260a22464c4153485f574954484f55545f484152445f43" . + "4f4445445f434c49434b5f55524c101b12160a12494e56414c49445f464c" . + "4153485f46494c45101c12240a204641494c45445f544f5f4649585f434c" . + "49434b5f5441475f494e5f464c415348101d12240a20464c4153485f4143" . + "4345535345535f4e4554574f524b5f5245534f5552434553101e121a0a16" . + "464c4153485f45585445524e414c5f4a535f43414c4c101f121a0a16464c" . + "4153485f45585445524e414c5f46535f43414c4c102012120a0e46494c45" . + "5f544f4f5f4c41524745102112180a14494d4147455f444154415f544f4f" . + "5f4c415247451022121a0a16494d4147455f50524f43455353494e475f45" . + "52524f52102312130a0f494d4147455f544f4f5f534d414c4c102412110a" . + "0d494e56414c49445f494e505554102512180a1450524f424c454d5f5245" . + "4144494e475f46494c45102642c5010a22636f6d2e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e6572726f7273420f496d6167654572" . + "726f7250726f746f50015a44676f6f676c652e676f6c616e672e6f72672f" . + "67656e70726f746f2f676f6f676c65617069732f6164732f676f6f676c65" . + "6164732f76302f6572726f72733b6572726f7273a20203474141aa021e47" . + "6f6f676c652e4164732e476f6f676c654164732e56302e4572726f7273ca" . + "021e476f6f676c655c4164735c476f6f676c654164735c56305c4572726f" . + "7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/InternalError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/InternalError.php new file mode 100644 index 000000000..41d0532ab --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/InternalError.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0ab4030a33676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f696e7465726e616c5f6572726f722e70726f746f121e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f72732289" . + "010a11496e7465726e616c4572726f72456e756d22740a0d496e7465726e" . + "616c4572726f72120f0a0b554e5350454349464945441000120b0a07554e" . + "4b4e4f574e100112120a0e494e5445524e414c5f4552524f521002121c0a" . + "184552524f525f434f44455f4e4f545f5055424c4953484544100312130a" . + "0f5452414e5349454e545f4552524f52100442c8010a22636f6d2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e6572726f7273421249" . + "6e7465726e616c4572726f7250726f746f50015a44676f6f676c652e676f" . + "6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f61" . + "64732f676f6f676c656164732f76302f6572726f72733b6572726f7273a2" . + "0203474141aa021e476f6f676c652e4164732e476f6f676c654164732e56" . + "302e4572726f7273ca021e476f6f676c655c4164735c476f6f676c654164" . + "735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/ListOperationError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/ListOperationError.php new file mode 100644 index 000000000..21132195c --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/ListOperationError.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0ab3030a39676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6c6973745f6f7065726174696f6e5f6572726f722e70726f" . + "746f121e676f6f676c652e6164732e676f6f676c656164732e76302e6572" . + "726f7273227e0a164c6973744f7065726174696f6e4572726f72456e756d" . + "22640a124c6973744f7065726174696f6e4572726f72120f0a0b554e5350" . + "454349464945441000120b0a07554e4b4e4f574e1001121a0a1652455155" . + "495245445f4649454c445f4d495353494e47100712140a104455504c4943" . + "4154455f56414c554553100842cd010a22636f6d2e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e6572726f727342174c6973744f7065" . + "726174696f6e4572726f7250726f746f50015a44676f6f676c652e676f6c" . + "616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f6164" . + "732f676f6f676c656164732f76302f6572726f72733b6572726f7273a202" . + "03474141aa021e476f6f676c652e4164732e476f6f676c654164732e5630" . + "2e4572726f7273ca021e476f6f676c655c4164735c476f6f676c65416473" . + "5c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/MediaBundleError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/MediaBundleError.php new file mode 100644 index 000000000..8b05238d6 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/MediaBundleError.php @@ -0,0 +1,57 @@ +internalAddGeneratedFile(hex2bin( + "0aea070a37676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6d656469615f62756e646c655f6572726f722e70726f746f" . + "121e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f" . + "727322b8050a144d6564696142756e646c654572726f72456e756d229f05" . + "0a104d6564696142756e646c654572726f72120f0a0b554e535045434946" . + "4945441000120b0a07554e4b4e4f574e1001120f0a0b4241445f52455155" . + "455354100312220a1e444f55424c45434c49434b5f42554e444c455f4e4f" . + "545f414c4c4f5745441004121c0a1845585445524e414c5f55524c5f4e4f" . + "545f414c4c4f574544100512120a0e46494c455f544f4f5f4c4152474510" . + "06122e0a2a474f4f474c455f5745425f44455349474e45525f5a49505f46" . + "494c455f4e4f545f5055424c4953484544100712110a0d494e56414c4944" . + "5f494e505554100812180a14494e56414c49445f4d454449415f42554e44" . + "4c451009121e0a1a494e56414c49445f4d454449415f42554e444c455f45" . + "4e545259100a12150a11494e56414c49445f4d494d455f54595045100b12" . + "100a0c494e56414c49445f50415448100c12190a15494e56414c49445f55" . + "524c5f5245464552454e4345100d12180a144d454449415f444154415f54" . + "4f4f5f4c41524745100e12260a224d495353494e475f5052494d4152595f" . + "4d454449415f42554e444c455f454e545259100f12100a0c534552564552" . + "5f4552524f52101012110a0d53544f524147455f4552524f521011121d0a" . + "195357494646595f42554e444c455f4e4f545f414c4c4f57454410121212" . + "0a0e544f4f5f4d414e595f46494c4553101312130a0f554e455850454354" . + "45445f53495a451014122f0a2b554e535550504f525445445f474f4f474c" . + "455f5745425f44455349474e45525f454e5649524f4e4d454e541015121d" . + "0a19554e535550504f525445445f48544d4c355f46454154555245101612" . + "290a2555524c5f494e5f4d454449415f42554e444c455f4e4f545f53534c" . + "5f434f4d504c49414e541017121b0a17435553544f4d5f455849545f4e4f" . + "545f414c4c4f574544101842cb010a22636f6d2e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e6572726f727342154d6564696142756e" . + "646c654572726f7250726f746f50015a44676f6f676c652e676f6c616e67" . + "2e6f72672f67656e70726f746f2f676f6f676c65617069732f6164732f67" . + "6f6f676c656164732f76302f6572726f72733b6572726f7273a202034741" . + "41aa021e476f6f676c652e4164732e476f6f676c654164732e56302e4572" . + "726f7273ca021e476f6f676c655c4164735c476f6f676c654164735c5630" . + "5c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/MediaError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/MediaError.php new file mode 100644 index 000000000..418f99ee9 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/MediaError.php @@ -0,0 +1,59 @@ +internalAddGeneratedFile(hex2bin( + "0ab4080a30676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6d656469615f6572726f722e70726f746f121e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f7273228f060a0e" . + "4d656469614572726f72456e756d22fc050a0a4d656469614572726f7212" . + "0f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e100112" . + "1c0a1843414e4e4f545f4144445f5354414e444152445f49434f4e100212" . + "300a2c43414e4e4f545f53454c4543545f5354414e444152445f49434f4e" . + "5f574954485f4f544845525f5459504553100312240a2043414e4e4f545f" . + "535045434946595f4d454449415f49445f414e445f44415441100412130a" . + "0f4455504c49434154455f4d454449411005120f0a0b454d5054595f4649" . + "454c44100612270a235245534f555243455f5245464552454e4345445f49" . + "4e5f4d554c5449504c455f4f50531007122a0a264649454c445f4e4f545f" . + "535550504f525445445f464f525f4d454449415f5355425f545950451008" . + "12140a10494e56414c49445f4d454449415f49441009121a0a16494e5641" . + "4c49445f4d454449415f5355425f54595045100a12160a12494e56414c49" . + "445f4d454449415f54595045100b12150a11494e56414c49445f4d494d45" . + "5f54595045100c12180a14494e56414c49445f5245464552454e43455f49" . + "44100d12170a13494e56414c49445f594f555f545542455f4944100e121c" . + "0a184d454449415f4641494c45445f5452414e53434f44494e47100f1218" . + "0a144d454449415f4e4f545f5452414e53434f444544101012290a254d45" . + "4449415f545950455f444f45535f4e4f545f4d415443485f4f424a454354" . + "5f54595045101112170a134e4f5f4649454c44535f535045434946494544" . + "101212220a1e4e554c4c5f5245464552454e43455f49445f414e445f4d45" . + "4449415f49441013120c0a08544f4f5f4c4f4e47101412190a15554e5355" . + "50504f525445445f4f5045524154494f4e101512140a10554e535550504f" . + "525445445f54595045101612200a1c594f555f545542455f534552564943" . + "455f554e415641494c41424c451017122c0a28594f555f545542455f5649" . + "44454f5f4841535f4e4f4e5f504f5349544956455f4455524154494f4e10" . + "18121c0a18594f555f545542455f564944454f5f4e4f545f464f554e4410" . + "1942c5010a22636f6d2e676f6f676c652e6164732e676f6f676c65616473" . + "2e76302e6572726f7273420f4d656469614572726f7250726f746f50015a" . + "44676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f" . + "6f676c65617069732f6164732f676f6f676c656164732f76302f6572726f" . + "72733b6572726f7273a20203474141aa021e476f6f676c652e4164732e47" . + "6f6f676c654164732e56302e4572726f7273ca021e476f6f676c655c4164" . + "735c476f6f676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/MultiplierError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/MultiplierError.php new file mode 100644 index 000000000..82d20e1fa --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/MultiplierError.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile(hex2bin( + "0afe060a35676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6d756c7469706c6965725f6572726f722e70726f746f121e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e6572726f7273" . + "22cf040a134d756c7469706c6965724572726f72456e756d22b7040a0f4d" . + "756c7469706c6965724572726f72120f0a0b554e53504543494649454410" . + "00120b0a07554e4b4e4f574e100112170a134d554c5449504c4945525f54" . + "4f4f5f48494748100212160a124d554c5449504c4945525f544f4f5f4c4f" . + "571003121e0a1a544f4f5f4d414e595f4652414354494f4e414c5f444947" . + "4954531004122f0a2b4d554c5449504c4945525f4e4f545f414c4c4f5745" . + "445f464f525f42494444494e475f5354524154454759100512330a2f4d55" . + "4c5449504c4945525f4e4f545f414c4c4f5745445f5748454e5f42415345" . + "5f4249445f49535f4d495353494e471006121b0a174e4f5f4d554c544950" . + "4c4945525f535045434946494544100712300a2c4d554c5449504c494552" . + "5f4341555345535f4249445f544f5f4558434545445f4441494c595f4255" . + "44474554100812320a2e4d554c5449504c4945525f4341555345535f4249" . + "445f544f5f4558434545445f4d4f4e54484c595f42554447455410091231" . + "0a2d4d554c5449504c4945525f4341555345535f4249445f544f5f455843" . + "4545445f435553544f4d5f425544474554100a12330a2f4d554c5449504c" . + "4945525f4341555345535f4249445f544f5f4558434545445f4d41585f41" . + "4c4c4f5745445f424944100b12310a2d4249445f4c4553535f5448414e5f" . + "4d494e5f414c4c4f5745445f4249445f574954485f4d554c5449504c4945" . + "52100c12310a2d4d554c5449504c4945525f414e445f42494444494e475f" . + "53545241544547595f545950455f4d49534d41544348100d42ca010a2263" . + "6f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e657272" . + "6f727342144d756c7469706c6965724572726f7250726f746f50015a4467" . + "6f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f67" . + "6c65617069732f6164732f676f6f676c656164732f76302f6572726f7273" . + "3b6572726f7273a20203474141aa021e476f6f676c652e4164732e476f6f" . + "676c654164732e56302e4572726f7273ca021e476f6f676c655c4164735c" . + "476f6f676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/MutateError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/MutateError.php new file mode 100644 index 000000000..030170bbd --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/MutateError.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a9f030a31676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6d75746174655f6572726f722e70726f746f121e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e6572726f727322790a0f" . + "4d75746174654572726f72456e756d22660a0b4d75746174654572726f72" . + "120f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e1001" . + "12160a125245534f555243455f4e4f545f464f554e44100312210a1d4944" . + "5f4558495354535f494e5f4d554c5449504c455f4d555441544553100742" . + "c6010a22636f6d2e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e6572726f727342104d75746174654572726f7250726f746f50015a44" . + "676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f" . + "676c65617069732f6164732f676f6f676c656164732f76302f6572726f72" . + "733b6572726f7273a20203474141aa021e476f6f676c652e4164732e476f" . + "6f676c654164732e56302e4572726f7273ca021e476f6f676c655c416473" . + "5c476f6f676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/NewResourceCreationError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/NewResourceCreationError.php new file mode 100644 index 000000000..6d3f595c7 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/NewResourceCreationError.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile(hex2bin( + "0af0030a40676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6e65775f7265736f757263655f6372656174696f6e5f6572" . + "726f722e70726f746f121e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e6572726f727322ad010a1c4e65775265736f75726365437265" . + "6174696f6e4572726f72456e756d228c010a184e65775265736f75726365" . + "4372656174696f6e4572726f72120f0a0b554e5350454349464945441000" . + "120b0a07554e4b4e4f574e100112190a1543414e4e4f545f5345545f4944" . + "5f464f525f414444100212160a124455504c49434154455f54454d505f49" . + "44531003121f0a1b54454d505f49445f5245534f555243455f4841445f45" . + "52524f5253100442d3010a22636f6d2e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e6572726f7273421d4e65775265736f7572636543" . + "72656174696f6e4572726f7250726f746f50015a44676f6f676c652e676f" . + "6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f61" . + "64732f676f6f676c656164732f76302f6572726f72733b6572726f7273a2" . + "0203474141aa021e476f6f676c652e4164732e476f6f676c654164732e56" . + "302e4572726f7273ca021e476f6f676c655c4164735c476f6f676c654164" . + "735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/NotEmptyError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/NotEmptyError.php new file mode 100644 index 000000000..a98a67279 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/NotEmptyError.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile(hex2bin( + "0afd020a34676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6e6f745f656d7074795f6572726f722e70726f746f121e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e6572726f727322" . + "520a114e6f74456d7074794572726f72456e756d223d0a0d4e6f74456d70" . + "74794572726f72120f0a0b554e5350454349464945441000120b0a07554e" . + "4b4e4f574e1001120e0a0a454d5054595f4c495354100242c8010a22636f" . + "6d2e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f" . + "727342124e6f74456d7074794572726f7250726f746f50015a44676f6f67" . + "6c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c6561" . + "7069732f6164732f676f6f676c656164732f76302f6572726f72733b6572" . + "726f7273a20203474141aa021e476f6f676c652e4164732e476f6f676c65" . + "4164732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f" . + "676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/NullError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/NullError.php new file mode 100644 index 000000000..b1136ed1d --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/NullError.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile(hex2bin( + "0aee020a2f676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6e756c6c5f6572726f722e70726f746f121e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e6572726f7273224c0a0d4e75" . + "6c6c4572726f72456e756d223b0a094e756c6c4572726f72120f0a0b554e" . + "5350454349464945441000120b0a07554e4b4e4f574e100112100a0c4e55" . + "4c4c5f434f4e54454e54100242c4010a22636f6d2e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e6572726f7273420e4e756c6c457272" . + "6f7250726f746f50015a44676f6f676c652e676f6c616e672e6f72672f67" . + "656e70726f746f2f676f6f676c65617069732f6164732f676f6f676c6561" . + "64732f76302f6572726f72733b6572726f7273a20203474141aa021e476f" . + "6f676c652e4164732e476f6f676c654164732e56302e4572726f7273ca02" . + "1e476f6f676c655c4164735c476f6f676c654164735c56305c4572726f72" . + "73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/OperationAccessDeniedError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/OperationAccessDeniedError.php new file mode 100644 index 000000000..a4adcb876 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/OperationAccessDeniedError.php @@ -0,0 +1,50 @@ +internalAddGeneratedFile(hex2bin( + "0a8b060a42676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6f7065726174696f6e5f6163636573735f64656e6965645f" . + "6572726f722e70726f746f121e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e6572726f727322c4030a1e4f7065726174696f6e416363" . + "65737344656e6965644572726f72456e756d22a1030a1a4f706572617469" . + "6f6e41636365737344656e6965644572726f72120f0a0b554e5350454349" . + "464945441000120b0a07554e4b4e4f574e100112180a14414354494f4e5f" . + "4e4f545f5045524d4954544544100212220a1e4352454154455f4f504552" . + "4154494f4e5f4e4f545f5045524d4954544544100312220a1e52454d4f56" . + "455f4f5045524154494f4e5f4e4f545f5045524d4954544544100412220a" . + "1e5550444154455f4f5045524154494f4e5f4e4f545f5045524d49545445" . + "441005122a0a264d55544154455f414354494f4e5f4e4f545f5045524d49" . + "545445445f464f525f434c49454e541006122d0a294f5045524154494f4e" . + "5f4e4f545f5045524d49545445445f464f525f43414d504149474e5f5459" . + "5045100712230a1f4352454154455f41535f52454d4f5645445f4e4f545f" . + "5045524d4954544544100812300a2c4f5045524154494f4e5f4e4f545f50" . + "45524d49545445445f464f525f52454d4f5645445f5245534f5552434510" . + "09122d0a294f5045524154494f4e5f4e4f545f5045524d49545445445f46" . + "4f525f41445f47524f55505f54595045100a42d5010a22636f6d2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e6572726f7273421f4f" . + "7065726174696f6e41636365737344656e6965644572726f7250726f746f" . + "50015a44676f6f676c652e676f6c616e672e6f72672f67656e70726f746f" . + "2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f65" . + "72726f72733b6572726f7273a20203474141aa021e476f6f676c652e4164" . + "732e476f6f676c654164732e56302e4572726f7273ca021e476f6f676c65" . + "5c4164735c476f6f676c654164735c56305c4572726f7273620670726f74" . + "6f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/OperatorError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/OperatorError.php new file mode 100644 index 000000000..9de42e014 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/OperatorError.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a88030a33676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f6f70657261746f725f6572726f722e70726f746f121e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e6572726f7273225e" . + "0a114f70657261746f724572726f72456e756d22490a0d4f70657261746f" . + "724572726f72120f0a0b554e5350454349464945441000120b0a07554e4b" . + "4e4f574e1001121a0a164f50455241544f525f4e4f545f535550504f5254" . + "4544100242c8010a22636f6d2e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e6572726f727342124f70657261746f724572726f725072" . + "6f746f50015a44676f6f676c652e676f6c616e672e6f72672f67656e7072" . + "6f746f2f676f6f676c65617069732f6164732f676f6f676c656164732f76" . + "302f6572726f72733b6572726f7273a20203474141aa021e476f6f676c65" . + "2e4164732e476f6f676c654164732e56302e4572726f7273ca021e476f6f" . + "676c655c4164735c476f6f676c654164735c56305c4572726f7273620670" . + "726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/QueryError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/QueryError.php new file mode 100644 index 000000000..44102e77f --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/QueryError.php @@ -0,0 +1,86 @@ +internalAddGeneratedFile(hex2bin( + "0adb0e0a30676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f71756572795f6572726f722e70726f746f121e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f727322b60c0a0e" . + "51756572794572726f72456e756d22a30c0a0a51756572794572726f7212" . + "0f0a0b554e5350454349464945441000120b0a07554e4b4e4f574e100112" . + "0f0a0b51554552595f4552524f52103212150a114241445f454e554d5f43" . + "4f4e5354414e54101212170a134241445f4553434150455f53455155454e" . + "4345100712120a0e4241445f4649454c445f4e414d45100c12130a0f4241" . + "445f4c494d49545f56414c5545100f120e0a0a4241445f4e554d42455210" . + "0512100a0c4241445f4f50455241544f52100312240a204241445f524553" . + "4f555243455f545950455f494e5f46524f4d5f434c41555345102d120e0a" . + "0a4241445f53594d424f4c1002120d0a094241445f56414c554510041217" . + "0a13444154455f52414e47455f544f4f5f57494445102412100a0c455850" . + "45435445445f414e44101e120f0a0b45585045435445445f4259100e122d" . + "0a2945585045435445445f44494d454e53494f4e5f4649454c445f494e5f" . + "53454c4543545f434c41555345102512220a1e45585045435445445f4649" . + "4c544552535f4f4e5f444154455f52414e4745103712110a0d4558504543" . + "5445445f46524f4d102c12110a0d45585045435445445f4c495354102912" . + "2e0a2a45585045435445445f5245464552454e4345445f4649454c445f49" . + "4e5f53454c4543545f434c41555345101012130a0f45585045435445445f" . + "53454c454354100d12190a1545585045435445445f53494e474c455f5641" . + "4c5545102a12280a2445585045435445445f56414c55455f574954485f42" . + "45545745454e5f4f50455241544f52101d12170a13494e56414c49445f44" . + "4154455f464f524d4154102612180a14494e56414c49445f535452494e47" . + "5f56414c5545103912270a23494e56414c49445f56414c55455f57495448" . + "5f4245545745454e5f4f50455241544f52101a12260a22494e56414c4944" . + "5f56414c55455f574954485f445552494e475f4f50455241544f52101612" . + "240a20494e56414c49445f56414c55455f574954485f4c494b455f4f5045" . + "5241544f521038121b0a174f50455241544f525f4649454c445f4d49534d" . + "41544348102312260a2250524f484942495445445f454d5054595f4c4953" . + "545f494e5f434f4e444954494f4e101c121c0a1850524f48494249544544" . + "5f454e554d5f434f4e5354414e54103612310a2d50524f48494249544544" . + "5f4649454c445f434f4d42494e4154494f4e5f494e5f53454c4543545f43" . + "4c41555345101f12270a2350524f484942495445445f4649454c445f494e" . + "5f4f524445525f42595f434c41555345102812250a2150524f4849424954" . + "45445f4649454c445f494e5f53454c4543545f434c41555345101712240a" . + "2050524f484942495445445f4649454c445f494e5f57484552455f434c41" . + "5553451018122b0a2750524f484942495445445f5245534f555243455f54" . + "5950455f494e5f46524f4d5f434c41555345102b122d0a2950524f484942" . + "495445445f5245534f555243455f545950455f494e5f53454c4543545f43" . + "4c415553451030122f0a2b50524f484942495445445f4d45545249435f49" . + "4e5f53454c4543545f4f525f57484552455f434c41555345103112300a2c" . + "50524f484942495445445f5345474d454e545f494e5f53454c4543545f4f" . + "525f57484552455f434c415553451033123c0a3850524f48494249544544" . + "5f5345474d454e545f574954485f4d45545249435f494e5f53454c454354" . + "5f4f525f57484552455f434c41555345103512170a134c494d49545f5641" . + "4c55455f544f4f5f4c4f57101912200a1c50524f484942495445445f4e45" . + "574c494e455f494e5f535452494e47100812280a2450524f484942495445" . + "445f56414c55455f434f4d42494e4154494f4e5f494e5f4c495354100a12" . + "360a3250524f484942495445445f56414c55455f434f4d42494e4154494f" . + "4e5f574954485f4245545745454e5f4f50455241544f52101512190a1553" . + "5452494e475f4e4f545f5445524d494e41544544100612150a11544f4f5f" . + "4d414e595f5345474d454e54531022121b0a17554e45585045435445445f" . + "454e445f4f465f51554552591009121a0a16554e45585045435445445f46" . + "524f4d5f434c41555345102f12160a12554e5245434f474e495a45445f46" . + "49454c44102012140a10554e45585045435445445f494e505554100b42c5" . + "010a22636f6d2e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e6572726f7273420f51756572794572726f7250726f746f50015a44676f" . + "6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c" . + "65617069732f6164732f676f6f676c656164732f76302f6572726f72733b" . + "6572726f7273a20203474141aa021e476f6f676c652e4164732e476f6f67" . + "6c654164732e56302e4572726f7273ca021e476f6f676c655c4164735c47" . + "6f6f676c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/QuotaError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/QuotaError.php new file mode 100644 index 000000000..625de95a4 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/QuotaError.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a8f030a30676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f71756f74615f6572726f722e70726f746f121e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f7273226b0a0e51" . + "756f74614572726f72456e756d22590a0a51756f74614572726f72120f0a" . + "0b554e5350454349464945441000120b0a07554e4b4e4f574e100112160a" . + "125245534f555243455f455848415553544544100212150a114143434553" . + "535f50524f48494249544544100342c5010a22636f6d2e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e6572726f7273420f51756f7461" . + "4572726f7250726f746f50015a44676f6f676c652e676f6c616e672e6f72" . + "672f67656e70726f746f2f676f6f676c65617069732f6164732f676f6f67" . + "6c656164732f76302f6572726f72733b6572726f7273a20203474141aa02" . + "1e476f6f676c652e4164732e476f6f676c654164732e56302e4572726f72" . + "73ca021e476f6f676c655c4164735c476f6f676c654164735c56305c4572" . + "726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/RangeError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/RangeError.php new file mode 100644 index 000000000..e3f914f67 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/RangeError.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile(hex2bin( + "0afb020a30676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f72616e67655f6572726f722e70726f746f121e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e6572726f727322570a0e52" . + "616e67654572726f72456e756d22450a0a52616e67654572726f72120f0a" . + "0b554e5350454349464945441000120b0a07554e4b4e4f574e1001120b0a" . + "07544f4f5f4c4f571002120c0a08544f4f5f48494748100342c5010a2263" . + "6f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e657272" . + "6f7273420f52616e67654572726f7250726f746f50015a44676f6f676c65" . + "2e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069" . + "732f6164732f676f6f676c656164732f76302f6572726f72733b6572726f" . + "7273a20203474141aa021e476f6f676c652e4164732e476f6f676c654164" . + "732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f676c" . + "654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/RecommendationError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/RecommendationError.php new file mode 100644 index 000000000..2967bf826 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/RecommendationError.php @@ -0,0 +1,42 @@ +internalAddGeneratedFile(hex2bin( + "0aa0040a39676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f7265636f6d6d656e646174696f6e5f6572726f722e70726f" . + "746f121e676f6f676c652e6164732e676f6f676c656164732e76302e6572" . + "726f727322e9010a175265636f6d6d656e646174696f6e4572726f72456e" . + "756d22cd010a135265636f6d6d656e646174696f6e4572726f72120f0a0b" . + "554e5350454349464945441000120b0a07554e4b4e4f574e1001121b0a17" . + "4255444745545f414d4f554e545f544f4f5f534d414c4c1002121b0a1742" . + "55444745545f414d4f554e545f544f4f5f4c41524745100312190a15494e" . + "56414c49445f4255444745545f414d4f554e54100412100a0c504f4c4943" . + "595f4552524f52100512160a12494e56414c49445f4249445f414d4f554e" . + "54100612190a15414447524f55505f4b4559574f52445f4c494d49541007" . + "42ce010a22636f6d2e676f6f676c652e6164732e676f6f676c656164732e" . + "76302e6572726f727342185265636f6d6d656e646174696f6e4572726f72" . + "50726f746f50015a44676f6f676c652e676f6c616e672e6f72672f67656e" . + "70726f746f2f676f6f676c65617069732f6164732f676f6f676c65616473" . + "2f76302f6572726f72733b6572726f7273a20203474141aa021e476f6f67" . + "6c652e4164732e476f6f676c654164732e56302e4572726f7273ca021e47" . + "6f6f676c655c4164735c476f6f676c654164735c56305c4572726f727362" . + "0670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/RegionCodeError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/RegionCodeError.php new file mode 100644 index 000000000..838175507 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/RegionCodeError.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a8e030a36676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f726567696f6e5f636f64655f6572726f722e70726f746f12" . + "1e676f6f676c652e6164732e676f6f676c656164732e76302e6572726f72" . + "73225f0a13526567696f6e436f64654572726f72456e756d22480a0f5265" . + "67696f6e436f64654572726f72120f0a0b554e5350454349464945441000" . + "120b0a07554e4b4e4f574e100112170a13494e56414c49445f524547494f" . + "4e5f434f4445100242ca010a22636f6d2e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e6572726f72734214526567696f6e436f646545" . + "72726f7250726f746f50015a44676f6f676c652e676f6c616e672e6f7267" . + "2f67656e70726f746f2f676f6f676c65617069732f6164732f676f6f676c" . + "656164732f76302f6572726f72733b6572726f7273a20203474141aa021e" . + "476f6f676c652e4164732e476f6f676c654164732e56302e4572726f7273" . + "ca021e476f6f676c655c4164735c476f6f676c654164735c56305c457272" . + "6f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/RequestError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/RequestError.php new file mode 100644 index 000000000..48efd5be9 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/RequestError.php @@ -0,0 +1,50 @@ +internalAddGeneratedFile(hex2bin( + "0a8c060a32676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f726571756573745f6572726f722e70726f746f121e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e6572726f727322e303" . + "0a10526571756573744572726f72456e756d22ce030a0c52657175657374" . + "4572726f72120f0a0b554e5350454349464945441000120b0a07554e4b4e" . + "4f574e100112190a155245534f555243455f4e414d455f4d495353494e47" . + "1003121b0a175245534f555243455f4e414d455f4d414c464f524d454410" . + "0412130a0f4241445f5245534f555243455f4944101112170a13494e5641" . + "4c49445f435553544f4d45525f4944101012160a124f5045524154494f4e" . + "5f5245515549524544100512160a125245534f555243455f4e4f545f464f" . + "554e44100612160a12494e56414c49445f504147455f544f4b454e100712" . + "160a12455850495245445f504147455f544f4b454e1008121a0a16524551" . + "55495245445f4649454c445f4d495353494e47100912130a0f494d4d5554" . + "41424c455f4649454c44100b121e0a1a544f4f5f4d414e595f4d55544154" . + "455f4f5045524154494f4e53100d12290a2543414e4e4f545f42455f4558" . + "4543555445445f42595f4d414e414745525f4143434f554e54100e121f0a" . + "1b43414e4e4f545f4d4f444946595f464f524549474e5f4649454c44100f" . + "12160a12494e56414c49445f454e554d5f56414c5545101212250a214445" . + "56454c4f5045525f544f4b454e5f504152414d455445525f4d495353494e" . + "47101342c7010a22636f6d2e676f6f676c652e6164732e676f6f676c6561" . + "64732e76302e6572726f72734211526571756573744572726f7250726f74" . + "6f50015a44676f6f676c652e676f6c616e672e6f72672f67656e70726f74" . + "6f2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f" . + "6572726f72733b6572726f7273a20203474141aa021e476f6f676c652e41" . + "64732e476f6f676c654164732e56302e4572726f7273ca021e476f6f676c" . + "655c4164735c476f6f676c654164735c56305c4572726f7273620670726f" . + "746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/ResourceAccessDeniedError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/ResourceAccessDeniedError.php new file mode 100644 index 000000000..c457c36f0 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/ResourceAccessDeniedError.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0ab7030a41676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f7265736f757263655f6163636573735f64656e6965645f65" . + "72726f722e70726f746f121e676f6f676c652e6164732e676f6f676c6561" . + "64732e76302e6572726f727322730a1d5265736f75726365416363657373" . + "44656e6965644572726f72456e756d22520a195265736f75726365416363" . + "65737344656e6965644572726f72120f0a0b554e53504543494649454410" . + "00120b0a07554e4b4e4f574e100112170a1357524954455f414343455353" . + "5f44454e494544100342d4010a22636f6d2e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e6572726f7273421e5265736f757263654163" . + "6365737344656e6965644572726f7250726f746f50015a44676f6f676c65" . + "2e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069" . + "732f6164732f676f6f676c656164732f76302f6572726f72733b6572726f" . + "7273a20203474141aa021e476f6f676c652e4164732e476f6f676c654164" . + "732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f676c" . + "654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/ResourceCountLimitExceededError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/ResourceCountLimitExceededError.php new file mode 100644 index 000000000..365f97ad4 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/ResourceCountLimitExceededError.php @@ -0,0 +1,44 @@ +internalAddGeneratedFile(hex2bin( + "0adb040a48676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f7265736f757263655f636f756e745f6c696d69745f657863" . + "65656465645f6572726f722e70726f746f121e676f6f676c652e6164732e" . + "676f6f676c656164732e76302e6572726f72732289020a235265736f7572" . + "6365436f756e744c696d697445786365656465644572726f72456e756d22" . + "e1010a1f5265736f75726365436f756e744c696d69744578636565646564" . + "4572726f72120f0a0b554e5350454349464945441000120b0a07554e4b4e" . + "4f574e100112110a0d4143434f554e545f4c494d4954100212120a0e4341" . + "4d504149474e5f4c494d4954100312110a0d414447524f55505f4c494d49" . + "54100412150a1141445f47524f55505f41445f4c494d49541005121c0a18" . + "41445f47524f55505f435249544552494f4e5f4c494d4954100612140a10" . + "5348415245445f5345545f4c494d49541007121b0a174d41544348494e47" . + "5f46554e4354494f4e5f4c494d4954100842da010a22636f6d2e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e6572726f727342245265" . + "736f75726365436f756e744c696d697445786365656465644572726f7250" . + "726f746f50015a44676f6f676c652e676f6c616e672e6f72672f67656e70" . + "726f746f2f676f6f676c65617069732f6164732f676f6f676c656164732f" . + "76302f6572726f72733b6572726f7273a20203474141aa021e476f6f676c" . + "652e4164732e476f6f676c654164732e56302e4572726f7273ca021e476f" . + "6f676c655c4164735c476f6f676c654164735c56305c4572726f72736206" . + "70726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/SettingError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/SettingError.php new file mode 100644 index 000000000..6afc717fb --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/SettingError.php @@ -0,0 +1,70 @@ +internalAddGeneratedFile(hex2bin( + "0ae70a0a32676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f73657474696e675f6572726f722e70726f746f121e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e6572726f727322be08" . + "0a1053657474696e674572726f72456e756d22a9080a0c53657474696e67" . + "4572726f72120f0a0b554e5350454349464945441000120b0a07554e4b4e" . + "4f574e100112210a1d53455454494e475f545950455f49535f4e4f545f41" . + "5641494c41424c45100312300a2c53455454494e475f545950455f49535f" . + "4e4f545f434f4d50415449424c455f574954485f43414d504149474e1004" . + "123b0a37544152474554494e475f53455454494e475f434f4e5441494e53" . + "5f494e56414c49445f435249544552494f4e5f545950455f47524f555010" . + "0512510a4d544152474554494e475f53455454494e475f44454d4f475241" . + "504849435f435249544552494f4e5f545950455f47524f5550535f4d5553" . + "545f42455f5345545f544f5f5441524745545f414c4c1006125c0a585441" . + "52474554494e475f53455454494e475f43414e4e4f545f4348414e47455f" . + "5441524745545f414c4c5f544f5f46414c53455f464f525f44454d4f4752" . + "41504849435f435249544552494f4e5f545950455f47524f555010071243" . + "0a3f44594e414d49435f5345415243485f4144535f53455454494e475f41" . + "545f4c454153545f4f4e455f464545445f49445f4d5553545f42455f5052" . + "4553454e541008123b0a3744594e414d49435f5345415243485f4144535f" . + "53455454494e475f434f4e5441494e535f494e56414c49445f444f4d4149" . + "4e5f4e414d45100912360a3244594e414d49435f5345415243485f414453" . + "5f53455454494e475f434f4e5441494e535f535542444f4d41494e5f4e41" . + "4d45100a123d0a3944594e414d49435f5345415243485f4144535f534554" . + "54494e475f434f4e5441494e535f494e56414c49445f4c414e4755414745" . + "5f434f4445100b123e0a3a5441524745545f414c4c5f49535f4e4f545f41" . + "4c4c4f5745445f464f525f504c4143454d454e545f494e5f534541524348" . + "5f43414d504149474e100c12380a34554e4956455253414c5f4150505f43" . + "414d504149474e5f53455454494e475f4455504c49434154455f44455343" . + "52495054494f4e100d12420a3e554e4956455253414c5f4150505f43414d" . + "504149474e5f53455454494e475f4445534352495054494f4e5f4c494e45" . + "5f57494454485f544f4f5f4c4f4e47100e123c0a38554e4956455253414c" . + "5f4150505f43414d504149474e5f53455454494e475f4150505f49445f43" . + "414e4e4f545f42455f4d4f444946494544100f12380a34544f4f5f4d414e" . + "595f594f55545542455f4d454449415f4944535f494e5f554e4956455253" . + "414c5f4150505f43414d504149474e101012360a32544f4f5f4d414e595f" . + "494d4147455f4d454449415f4944535f494e5f554e4956455253414c5f41" . + "50505f43414d504149474e101112310a2d4d454449415f494e434f4d5041" . + "5449424c455f464f525f554e4956455253414c5f4150505f43414d504149" . + "474e1012121e0a1a544f4f5f4d414e595f4558434c414d4154494f4e5f4d" . + "41524b53101342c7010a22636f6d2e676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e6572726f7273421153657474696e674572726f7250" . + "726f746f50015a44676f6f676c652e676f6c616e672e6f72672f67656e70" . + "726f746f2f676f6f676c65617069732f6164732f676f6f676c656164732f" . + "76302f6572726f72733b6572726f7273a20203474141aa021e476f6f676c" . + "652e4164732e476f6f676c654164732e56302e4572726f7273ca021e476f" . + "6f676c655c4164735c476f6f676c654164735c56305c4572726f72736206" . + "70726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/StringFormatError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/StringFormatError.php new file mode 100644 index 000000000..18631a8ff --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/StringFormatError.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile(hex2bin( + "0aa4030a38676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f737472696e675f666f726d61745f6572726f722e70726f74" . + "6f121e676f6f676c652e6164732e676f6f676c656164732e76302e657272" . + "6f727322710a15537472696e67466f726d61744572726f72456e756d2258" . + "0a11537472696e67466f726d61744572726f72120f0a0b554e5350454349" . + "464945441000120b0a07554e4b4e4f574e100112110a0d494c4c4547414c" . + "5f4348415253100212120a0e494e56414c49445f464f524d4154100342cc" . + "010a22636f6d2e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e6572726f72734216537472696e67466f726d61744572726f7250726f74" . + "6f50015a44676f6f676c652e676f6c616e672e6f72672f67656e70726f74" . + "6f2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f" . + "6572726f72733b6572726f7273a20203474141aa021e476f6f676c652e41" . + "64732e476f6f676c654164732e56302e4572726f7273ca021e476f6f676c" . + "655c4164735c476f6f676c654164735c56305c4572726f7273620670726f" . + "746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/StringLengthError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/StringLengthError.php new file mode 100644 index 000000000..c46681398 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/StringLengthError.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile(hex2bin( + "0a9a030a38676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f737472696e675f6c656e6774685f6572726f722e70726f74" . + "6f121e676f6f676c652e6164732e676f6f676c656164732e76302e657272" . + "6f727322670a15537472696e674c656e6774684572726f72456e756d224e" . + "0a11537472696e674c656e6774684572726f72120f0a0b554e5350454349" . + "464945441000120b0a07554e4b4e4f574e1001120d0a09544f4f5f53484f" . + "52541002120c0a08544f4f5f4c4f4e47100342cc010a22636f6d2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e6572726f7273421653" . + "7472696e674c656e6774684572726f7250726f746f50015a44676f6f676c" . + "652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c656170" . + "69732f6164732f676f6f676c656164732f76302f6572726f72733b657272" . + "6f7273a20203474141aa021e476f6f676c652e4164732e476f6f676c6541" . + "64732e56302e4572726f7273ca021e476f6f676c655c4164735c476f6f67" . + "6c654164735c56305c4572726f7273620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Errors/UrlFieldError.php b/metadata/Google/Ads/GoogleAds/V0/Errors/UrlFieldError.php new file mode 100644 index 000000000..a748d66c0 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Errors/UrlFieldError.php @@ -0,0 +1,88 @@ +internalAddGeneratedFile(hex2bin( + "0a830f0a34676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "72726f72732f75726c5f6669656c645f6572726f722e70726f746f121e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e6572726f727322" . + "d70c0a1155726c4669656c644572726f72456e756d22c10c0a0d55726c46" . + "69656c644572726f72120f0a0b554e5350454349464945441000120b0a07" . + "554e4b4e4f574e100112210a1d494e56414c49445f545241434b494e475f" . + "55524c5f54454d504c415445100212280a24494e56414c49445f5441475f" . + "494e5f545241434b494e475f55524c5f54454d504c415445100312250a21" . + "4d495353494e475f545241434b494e475f55524c5f54454d504c4154455f" . + "5441471004122d0a294d495353494e475f50524f544f434f4c5f494e5f54" . + "5241434b494e475f55524c5f54454d504c4154451005122d0a29494e5641" . + "4c49445f50524f544f434f4c5f494e5f545241434b494e475f55524c5f54" . + "454d504c415445100612230a1f4d414c464f524d45445f545241434b494e" . + "475f55524c5f54454d504c415445100712290a254d495353494e475f484f" . + "53545f494e5f545241434b494e475f55524c5f54454d504c415445100812" . + "280a24494e56414c49445f544c445f494e5f545241434b494e475f55524c" . + "5f54454d504c4154451009122e0a2a524544554e44414e545f4e45535445" . + "445f545241434b494e475f55524c5f54454d504c4154455f544147100a12" . + "150a11494e56414c49445f46494e414c5f55524c100b121c0a18494e5641" . + "4c49445f5441475f494e5f46494e414c5f55524c100c12220a1e52454455" . + "4e44414e545f4e45535445445f46494e414c5f55524c5f544147100d1221" . + "0a1d4d495353494e475f50524f544f434f4c5f494e5f46494e414c5f5552" . + "4c100e12210a1d494e56414c49445f50524f544f434f4c5f494e5f46494e" . + "414c5f55524c100f12170a134d414c464f524d45445f46494e414c5f5552" . + "4c1010121d0a194d495353494e475f484f53545f494e5f46494e414c5f55" . + "524c1011121c0a18494e56414c49445f544c445f494e5f46494e414c5f55" . + "524c1012121c0a18494e56414c49445f46494e414c5f4d4f42494c455f55" . + "524c101312230a1f494e56414c49445f5441475f494e5f46494e414c5f4d" . + "4f42494c455f55524c101412290a25524544554e44414e545f4e45535445" . + "445f46494e414c5f4d4f42494c455f55524c5f544147101512280a244d49" . + "5353494e475f50524f544f434f4c5f494e5f46494e414c5f4d4f42494c45" . + "5f55524c101612280a24494e56414c49445f50524f544f434f4c5f494e5f" . + "46494e414c5f4d4f42494c455f55524c1017121e0a1a4d414c464f524d45" . + "445f46494e414c5f4d4f42494c455f55524c101812240a204d495353494e" . + "475f484f53545f494e5f46494e414c5f4d4f42494c455f55524c10191223" . + "0a1f494e56414c49445f544c445f494e5f46494e414c5f4d4f42494c455f" . + "55524c101a12190a15494e56414c49445f46494e414c5f4150505f55524c" . + "101b12200a1c494e56414c49445f5441475f494e5f46494e414c5f415050" . + "5f55524c101c12260a22524544554e44414e545f4e45535445445f46494e" . + "414c5f4150505f55524c5f544147101d12200a1c4d554c5449504c455f41" . + "50505f55524c535f464f525f4f5354595045101e12120a0e494e56414c49" . + "445f4f5354595045101f12200a1c494e56414c49445f50524f544f434f4c" . + "5f464f525f4150505f55524c102012220a1e494e56414c49445f5041434b" . + "4147455f49445f464f525f4150505f55524c1021122d0a2955524c5f4355" . + "53544f4d5f504152414d45544552535f434f554e545f455843454544535f" . + "4c494d4954102212320a2e494e56414c49445f434841524143544552535f" . + "494e5f55524c5f435553544f4d5f504152414d455445525f4b4559102712" . + "340a30494e56414c49445f434841524143544552535f494e5f55524c5f43" . + "5553544f4d5f504152414d455445525f56414c55451028122d0a29494e56" . + "414c49445f5441475f494e5f55524c5f435553544f4d5f504152414d4554" . + "45525f56414c55451029122d0a29524544554e44414e545f4e4553544544" . + "5f55524c5f435553544f4d5f504152414d455445525f544147102a12140a" . + "104d495353494e475f50524f544f434f4c102b120f0a0b494e56414c4944" . + "5f55524c102c121e0a1a44455354494e4154494f4e5f55524c5f44455052" . + "454341544544102d12160a12494e56414c49445f5441475f494e5f55524c" . + "102e12130a0f4d495353494e475f55524c5f544147102f12140a10445550" . + "4c49434154455f55524c5f4944103012120a0e494e56414c49445f55524c" . + "5f4944103142c8010a22636f6d2e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e6572726f7273421255726c4669656c644572726f7250" . + "726f746f50015a44676f6f676c652e676f6c616e672e6f72672f67656e70" . + "726f746f2f676f6f676c65617069732f6164732f676f6f676c656164732f" . + "76302f6572726f72733b6572726f7273a20203474141aa021e476f6f676c" . + "652e4164732e476f6f676c654164732e56302e4572726f7273ca021e476f" . + "6f676c655c4164735c476f6f676c654164735c56305c4572726f72736206" . + "70726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroup.php b/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroup.php new file mode 100644 index 000000000..45e097a41 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroup.php @@ -0,0 +1,67 @@ +internalAddGeneratedFile(hex2bin( + "0a98090a30676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f61645f67726f75702e70726f746f1221676f6f676c" . + "652e6164732e676f6f676c656164732e76302e7265736f75726365731a33" . + "676f6f676c652f6164732f676f6f676c656164732f76302f656e756d732f" . + "61645f67726f75705f7374617475732e70726f746f1a31676f6f676c652f" . + "6164732f676f6f676c656164732f76302f656e756d732f61645f67726f75" . + "705f747970652e70726f746f1a1e676f6f676c652f70726f746f6275662f" . + "77726170706572732e70726f746f22dc050a07416447726f757012150a0d" . + "7265736f757263655f6e616d6518012001280912270a0269641803200128" . + "0b321b2e676f6f676c652e70726f746f6275662e496e74363456616c7565" . + "122a0a046e616d6518042001280b321c2e676f6f676c652e70726f746f62" . + "75662e537472696e6756616c7565124e0a0673746174757318052001280e" . + "323e2e676f6f676c652e6164732e676f6f676c656164732e76302e656e75" . + "6d732e416447726f7570537461747573456e756d2e416447726f75705374" . + "6174757312480a0474797065180c2001280e323a2e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e656e756d732e416447726f75705479" . + "7065456e756d2e416447726f757054797065123b0a15747261636b696e67" . + "5f75726c5f74656d706c617465180d2001280b321c2e676f6f676c652e70" . + "726f746f6275662e537472696e6756616c7565124e0a1575726c5f637573" . + "746f6d5f706172616d657465727318062003280b322f2e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e636f6d6d6f6e2e437573746f6d" . + "506172616d65746572122e0a0863616d706169676e180a2001280b321c2e" . + "676f6f676c652e70726f746f6275662e537472696e6756616c756512330a" . + "0e6370635f6269645f6d6963726f73180e2001280b321b2e676f6f676c65" . + "2e70726f746f6275662e496e74363456616c756512330a0e63706d5f6269" . + "645f6d6963726f73180f2001280b321b2e676f6f676c652e70726f746f62" . + "75662e496e74363456616c756512330a0e6370615f6269645f6d6963726f" . + "7318102001280b321b2e676f6f676c652e70726f746f6275662e496e7436" . + "3456616c756512330a0e6370765f6269645f6d6963726f7318112001280b" . + "321b2e676f6f676c652e70726f746f6275662e496e74363456616c756512" . + "3a0a147461726765745f726f61735f6f7665727269646518132001280b32" . + "1c2e676f6f676c652e70726f746f6275662e446f75626c6556616c756542" . + "d1010a25636f6d2e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e7265736f7572636573420c416447726f757050726f746f50015a4a67" . + "6f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f67" . + "6c65617069732f6164732f676f6f676c656164732f76302f7265736f7572" . + "6365733b7265736f7572636573a20203474141aa0221476f6f676c652e41" . + "64732e476f6f676c654164732e56302e5265736f7572636573ca0221476f" . + "6f676c655c4164735c476f6f676c654164735c56305c5265736f75726365" . + "73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroupAd.php b/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroupAd.php new file mode 100644 index 000000000..3ec0653b8 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroupAd.php @@ -0,0 +1,47 @@ +internalAddGeneratedFile(hex2bin( + "0ae7040a33676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f61645f67726f75705f61642e70726f746f1221676f" . + "6f676c652e6164732e676f6f676c656164732e76302e7265736f75726365" . + "731a36676f6f676c652f6164732f676f6f676c656164732f76302f656e75" . + "6d732f61645f67726f75705f61645f7374617475732e70726f746f1a1e67" . + "6f6f676c652f70726f746f6275662f77726170706572732e70726f746f22" . + "d6010a09416447726f7570416412150a0d7265736f757263655f6e616d65" . + "18012001280912520a0673746174757318032001280e32422e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e656e756d732e416447726f" . + "75704164537461747573456e756d2e416447726f75704164537461747573" . + "122e0a0861645f67726f757018042001280b321c2e676f6f676c652e7072" . + "6f746f6275662e537472696e6756616c7565122e0a02616418052001280b" . + "32222e676f6f676c652e6164732e676f6f676c656164732e76302e636f6d" . + "6d6f6e2e416442d3010a25636f6d2e676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e7265736f7572636573420e416447726f7570416450" . + "726f746f50015a4a676f6f676c652e676f6c616e672e6f72672f67656e70" . + "726f746f2f676f6f676c65617069732f6164732f676f6f676c656164732f" . + "76302f7265736f75726365733b7265736f7572636573a20203474141aa02" . + "21476f6f676c652e4164732e476f6f676c654164732e56302e5265736f75" . + "72636573ca0221476f6f676c655c4164735c476f6f676c654164735c5630" . + "5c5265736f7572636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroupBidModifier.php b/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroupBidModifier.php new file mode 100644 index 000000000..a1e15386e --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroupBidModifier.php @@ -0,0 +1,57 @@ +internalAddGeneratedFile(hex2bin( + "0aad070a3d676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f61645f67726f75705f6269645f6d6f646966696572" . + "2e70726f746f1221676f6f676c652e6164732e676f6f676c656164732e76" . + "302e7265736f75726365731a1e676f6f676c652f70726f746f6275662f77" . + "726170706572732e70726f746f22c1040a12416447726f75704269644d6f" . + "64696669657212150a0d7265736f757263655f6e616d6518012001280912" . + "2e0a0861645f67726f757018022001280b321c2e676f6f676c652e70726f" . + "746f6275662e537472696e6756616c756512310a0c637269746572696f6e" . + "5f696418032001280b321b2e676f6f676c652e70726f746f6275662e496e" . + "74363456616c756512320a0c6269645f6d6f64696669657218042001280b" . + "321c2e676f6f676c652e70726f746f6275662e446f75626c6556616c7565" . + "125f0a19686f74656c5f646174655f73656c656374696f6e5f7479706518" . + "052001280b323a2e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e636f6d6d6f6e2e486f74656c4461746553656c656374696f6e547970" . + "65496e666f480012650a1c686f74656c5f616476616e63655f626f6f6b69" . + "6e675f77696e646f7718062001280b323d2e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e636f6d6d6f6e2e486f74656c416476616e63" . + "65426f6f6b696e6757696e646f77496e666f480012550a14686f74656c5f" . + "6c656e6774685f6f665f7374617918072001280b32352e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e636f6d6d6f6e2e486f74656c4c" . + "656e6774684f6653746179496e666f480012510a12686f74656c5f636865" . + "636b5f696e5f64617918082001280b32332e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e636f6d6d6f6e2e486f74656c436865636b49" . + "6e446179496e666f4800420b0a09637269746572696f6e42dc010a25636f" . + "6d2e676f6f676c652e6164732e676f6f676c656164732e76302e7265736f" . + "75726365734217416447726f75704269644d6f64696669657250726f746f" . + "50015a4a676f6f676c652e676f6c616e672e6f72672f67656e70726f746f" . + "2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f72" . + "65736f75726365733b7265736f7572636573a20203474141aa0221476f6f" . + "676c652e4164732e476f6f676c654164732e56302e5265736f7572636573" . + "ca0221476f6f676c655c4164735c476f6f676c654164735c56305c526573" . + "6f7572636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion.php b/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion.php new file mode 100644 index 000000000..b598a1b20 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion.php @@ -0,0 +1,123 @@ +internalAddGeneratedFile(hex2bin( + "0acd150a3a676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f61645f67726f75705f637269746572696f6e2e7072" . + "6f746f1221676f6f676c652e6164732e676f6f676c656164732e76302e72" . + "65736f75726365731a35676f6f676c652f6164732f676f6f676c65616473" . + "2f76302f636f6d6d6f6e2f637573746f6d5f706172616d657465722e7072" . + "6f746f1a3d676f6f676c652f6164732f676f6f676c656164732f76302f65" . + "6e756d732f61645f67726f75705f637269746572696f6e5f737461747573" . + "2e70726f746f1a32676f6f676c652f6164732f676f6f676c656164732f76" . + "302f656e756d732f62696464696e675f736f757263652e70726f746f1a32" . + "676f6f676c652f6164732f676f6f676c656164732f76302f656e756d732f" . + "637269746572696f6e5f747970652e70726f746f1a38676f6f676c652f61" . + "64732f676f6f676c656164732f76302f656e756d732f7175616c6974795f" . + "73636f72655f6275636b65742e70726f746f1a1e676f6f676c652f70726f" . + "746f6275662f77726170706572732e70726f746f22ce100a10416447726f" . + "7570437269746572696f6e12150a0d7265736f757263655f6e616d651801" . + "2001280912310a0c637269746572696f6e5f6964181a2001280b321b2e67" . + "6f6f676c652e70726f746f6275662e496e74363456616c756512600a0673" . + "746174757318032001280e32502e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e656e756d732e416447726f7570437269746572696f6e" . + "537461747573456e756d2e416447726f7570437269746572696f6e537461" . + "74757312550a0c7175616c6974795f696e666f18042001280b323f2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e7265736f75726365" . + "732e416447726f7570437269746572696f6e2e5175616c697479496e666f" . + "122e0a0861645f67726f757018052001280b321c2e676f6f676c652e7072" . + "6f746f6275662e537472696e6756616c7565124c0a047479706518192001" . + "280e323e2e676f6f676c652e6164732e676f6f676c656164732e76302e65" . + "6e756d732e437269746572696f6e54797065456e756d2e43726974657269" . + "6f6e54797065122c0a086e65676174697665181f2001280b321a2e676f6f" . + "676c652e70726f746f6275662e426f6f6c56616c756512330a0e6370635f" . + "6269645f6d6963726f7318102001280b321b2e676f6f676c652e70726f74" . + "6f6275662e496e74363456616c756512330a0e63706d5f6269645f6d6963" . + "726f7318112001280b321b2e676f6f676c652e70726f746f6275662e496e" . + "74363456616c756512330a0e6370765f6269645f6d6963726f7318182001" . + "280b321b2e676f6f676c652e70726f746f6275662e496e74363456616c75" . + "65123d0a186566666563746976655f6370635f6269645f6d6963726f7318" . + "122001280b321b2e676f6f676c652e70726f746f6275662e496e74363456" . + "616c7565123d0a186566666563746976655f63706d5f6269645f6d696372" . + "6f7318132001280b321b2e676f6f676c652e70726f746f6275662e496e74" . + "363456616c7565123d0a186566666563746976655f6370765f6269645f6d" . + "6963726f7318142001280b321b2e676f6f676c652e70726f746f6275662e" . + "496e74363456616c756512600a186566666563746976655f6370635f6269" . + "645f736f7572636518152001280e323e2e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e656e756d732e42696464696e67536f75726365" . + "456e756d2e42696464696e67536f7572636512600a186566666563746976" . + "655f63706d5f6269645f736f7572636518162001280e323e2e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e656e756d732e4269646469" . + "6e67536f75726365456e756d2e42696464696e67536f7572636512600a18" . + "6566666563746976655f6370765f6269645f736f7572636518172001280e" . + "323e2e676f6f676c652e6164732e676f6f676c656164732e76302e656e75" . + "6d732e42696464696e67536f75726365456e756d2e42696464696e67536f" . + "7572636512610a12706f736974696f6e5f657374696d61746573180a2001" . + "280b32452e676f6f676c652e6164732e676f6f676c656164732e76302e72" . + "65736f75726365732e416447726f7570437269746572696f6e2e506f7369" . + "74696f6e457374696d6174657312300a0a66696e616c5f75726c73180b20" . + "03280b321c2e676f6f676c652e70726f746f6275662e537472696e675661" . + "6c7565123b0a15747261636b696e675f75726c5f74656d706c617465180d" . + "2001280b321c2e676f6f676c652e70726f746f6275662e537472696e6756" . + "616c7565124e0a1575726c5f637573746f6d5f706172616d657465727318" . + "0e2003280b322f2e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e636f6d6d6f6e2e437573746f6d506172616d65746572123e0a076b65" . + "79776f7264181b2001280b322b2e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e636f6d6d6f6e2e4b6579776f7264496e666f48001249" . + "0a0d6c697374696e675f67726f757018202001280b32302e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e636f6d6d6f6e2e4c69737469" . + "6e6747726f7570496e666f48001aff020a0b5175616c697479496e666f12" . + "320a0d7175616c6974795f73636f726518012001280b321b2e676f6f676c" . + "652e70726f746f6275662e496e74333256616c756512680a166372656174" . + "6976655f7175616c6974795f73636f726518022001280e32482e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e656e756d732e5175616c" . + "69747953636f72654275636b6574456e756d2e5175616c69747953636f72" . + "654275636b6574126a0a18706f73745f636c69636b5f7175616c6974795f" . + "73636f726518032001280e32482e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e656e756d732e5175616c69747953636f72654275636b" . + "6574456e756d2e5175616c69747953636f72654275636b657412660a1473" . + "65617263685f7072656469637465645f63747218042001280e32482e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e656e756d732e5175" . + "616c69747953636f72654275636b6574456e756d2e5175616c6974795363" . + "6f72654275636b65741acc010a11506f736974696f6e457374696d617465" . + "73123a0a1566697273745f706167655f6370635f6d6963726f7318012001" . + "280b321b2e676f6f676c652e70726f746f6275662e496e74363456616c75" . + "65123e0a1966697273745f706f736974696f6e5f6370635f6d6963726f73" . + "18022001280b321b2e676f6f676c652e70726f746f6275662e496e743634" . + "56616c7565123b0a16746f705f6f665f706167655f6370635f6d6963726f" . + "7318032001280b321b2e676f6f676c652e70726f746f6275662e496e7436" . + "3456616c7565420b0a09637269746572696f6e42da010a25636f6d2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e7265736f75726365" . + "734215416447726f7570437269746572696f6e50726f746f50015a4a676f" . + "6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c" . + "65617069732f6164732f676f6f676c656164732f76302f7265736f757263" . + "65733b7265736f7572636573a20203474141aa0221476f6f676c652e4164" . + "732e476f6f676c654164732e56302e5265736f7572636573ca0221476f6f" . + "676c655c4164735c476f6f676c654164735c56305c5265736f7572636573" . + "620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/BiddingStrategy.php b/metadata/Google/Ads/GoogleAds/V0/Resources/BiddingStrategy.php new file mode 100644 index 000000000..ae340d937 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/BiddingStrategy.php @@ -0,0 +1,62 @@ +internalAddGeneratedFile(hex2bin( + "0ab0080a38676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f62696464696e675f73747261746567792e70726f74" . + "6f1221676f6f676c652e6164732e676f6f676c656164732e76302e726573" . + "6f75726365731a39676f6f676c652f6164732f676f6f676c656164732f76" . + "302f656e756d732f62696464696e675f73747261746567795f747970652e" . + "70726f746f1a1e676f6f676c652f70726f746f6275662f77726170706572" . + "732e70726f746f2291050a0f42696464696e67537472617465677912150a" . + "0d7265736f757263655f6e616d6518012001280912270a02696418032001" . + "280b321b2e676f6f676c652e70726f746f6275662e496e74363456616c75" . + "65122a0a046e616d6518042001280b321c2e676f6f676c652e70726f746f" . + "6275662e537472696e6756616c756512580a047479706518052001280e32" . + "4a2e676f6f676c652e6164732e676f6f676c656164732e76302e656e756d" . + "732e42696464696e67537472617465677954797065456e756d2e42696464" . + "696e6753747261746567795479706512430a0c656e68616e6365645f6370" . + "6318072001280b322b2e676f6f676c652e6164732e676f6f676c65616473" . + "2e76302e636f6d6d6f6e2e456e68616e6365644370634800124c0a117061" . + "67655f6f6e655f70726f6d6f74656418082001280b322f2e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e636f6d6d6f6e2e506167654f" . + "6e6550726f6d6f7465644800123f0a0a7461726765745f63706118092001" . + "280b32292e676f6f676c652e6164732e676f6f676c656164732e76302e63" . + "6f6d6d6f6e2e546172676574437061480012520a147461726765745f6f75" . + "7472616e6b5f7368617265180a2001280b32322e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e636f6d6d6f6e2e5461726765744f7574" . + "72616e6b5368617265480012410a0b7461726765745f726f6173180b2001" . + "280b322a2e676f6f676c652e6164732e676f6f676c656164732e76302e63" . + "6f6d6d6f6e2e546172676574526f6173480012430a0c7461726765745f73" . + "70656e64180c2001280b322b2e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e636f6d6d6f6e2e5461726765745370656e64480042080a" . + "06736368656d6542d9010a25636f6d2e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e7265736f7572636573421442696464696e675374" . + "72617465677950726f746f50015a4a676f6f676c652e676f6c616e672e6f" . + "72672f67656e70726f746f2f676f6f676c65617069732f6164732f676f6f" . + "676c656164732f76302f7265736f75726365733b7265736f7572636573a2" . + "0203474141aa0221476f6f676c652e4164732e476f6f676c654164732e56" . + "302e5265736f7572636573ca0221476f6f676c655c4164735c476f6f676c" . + "654164735c56305c5265736f7572636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/Campaign.php b/metadata/Google/Ads/GoogleAds/V0/Resources/Campaign.php new file mode 100644 index 000000000..7a2b3c276 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/Campaign.php @@ -0,0 +1,142 @@ +internalAddGeneratedFile(hex2bin( + "0ae0190a30676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f63616d706169676e2e70726f746f1221676f6f676c" . + "652e6164732e676f6f676c656164732e76302e7265736f75726365731a35" . + "676f6f676c652f6164732f676f6f676c656164732f76302f636f6d6d6f6e" . + "2f637573746f6d5f706172616d657465722e70726f746f1a42676f6f676c" . + "652f6164732f676f6f676c656164732f76302f656e756d732f61645f7365" . + "7276696e675f6f7074696d697a6174696f6e5f7374617475732e70726f74" . + "6f1a40676f6f676c652f6164732f676f6f676c656164732f76302f656e75" . + "6d732f6164766572746973696e675f6368616e6e656c5f7375625f747970" . + "652e70726f746f1a3c676f6f676c652f6164732f676f6f676c656164732f" . + "76302f656e756d732f6164766572746973696e675f6368616e6e656c5f74" . + "7970652e70726f746f1a39676f6f676c652f6164732f676f6f676c656164" . + "732f76302f656e756d732f62696464696e675f73747261746567795f7479" . + "70652e70726f746f1a3b676f6f676c652f6164732f676f6f676c65616473" . + "2f76302f656e756d732f63616d706169676e5f73657276696e675f737461" . + "7475732e70726f746f1a33676f6f676c652f6164732f676f6f676c656164" . + "732f76302f656e756d732f63616d706169676e5f7374617475732e70726f" . + "746f1a1e676f6f676c652f70726f746f6275662f77726170706572732e70" . + "726f746f22e3130a0843616d706169676e12150a0d7265736f757263655f" . + "6e616d6518012001280912270a02696418032001280b321b2e676f6f676c" . + "652e70726f746f6275662e496e74363456616c7565122a0a046e616d6518" . + "042001280b321c2e676f6f676c652e70726f746f6275662e537472696e67" . + "56616c756512500a0673746174757318052001280e32402e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e656e756d732e43616d706169" . + "676e537461747573456e756d2e43616d706169676e53746174757312660a" . + "0e73657276696e675f73746174757318152001280e324e2e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e656e756d732e43616d706169" . + "676e53657276696e67537461747573456e756d2e43616d706169676e5365" . + "7276696e675374617475731282010a1e61645f73657276696e675f6f7074" . + "696d697a6174696f6e5f73746174757318082001280e325a2e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e656e756d732e4164536572" . + "76696e674f7074696d697a6174696f6e537461747573456e756d2e416453" . + "657276696e674f7074696d697a6174696f6e53746174757312720a186164" . + "766572746973696e675f6368616e6e656c5f7479706518092001280e3250" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e656e756d73" . + "2e4164766572746973696e674368616e6e656c54797065456e756d2e4164" . + "766572746973696e674368616e6e656c54797065127c0a1c616476657274" . + "6973696e675f6368616e6e656c5f7375625f74797065180a2001280e3256" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e656e756d73" . + "2e4164766572746973696e674368616e6e656c53756254797065456e756d" . + "2e4164766572746973696e674368616e6e656c53756254797065123b0a15" . + "747261636b696e675f75726c5f74656d706c617465180b2001280b321c2e" . + "676f6f676c652e70726f746f6275662e537472696e6756616c7565124e0a" . + "1575726c5f637573746f6d5f706172616d6574657273180c2003280b322f" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e636f6d6d6f" . + "6e2e437573746f6d506172616d6574657212550a106e6574776f726b5f73" . + "657474696e6773180e2001280b323b2e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e7265736f75726365732e43616d706169676e2e4e" . + "6574776f726b53657474696e677312530a0d686f74656c5f73657474696e" . + "6718202001280b323c2e676f6f676c652e6164732e676f6f676c65616473" . + "2e76302e7265736f75726365732e43616d706169676e2e486f74656c5365" . + "7474696e67496e666f12670a1a64796e616d69635f7365617263685f6164" . + "735f73657474696e6718212001280b32432e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e7265736f75726365732e43616d706169676e" . + "2e44796e616d696353656172636841647353657474696e6712350a0f6361" . + "6d706169676e5f62756467657418062001280b321c2e676f6f676c652e70" . + "726f746f6275662e537472696e6756616c756512690a1562696464696e67" . + "5f73747261746567795f7479706518162001280e324a2e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e656e756d732e42696464696e67" . + "537472617465677954797065456e756d2e42696464696e67537472617465" . + "67795479706512300a0a73746172745f6461746518132001280b321c2e67" . + "6f6f676c652e70726f746f6275662e537472696e6756616c7565122e0a08" . + "656e645f6461746518142001280b321c2e676f6f676c652e70726f746f62" . + "75662e537472696e6756616c756512380a1062696464696e675f73747261" . + "7465677918172001280b321c2e676f6f676c652e70726f746f6275662e53" . + "7472696e6756616c75654800123f0a0a6d616e75616c5f63706318182001" . + "280b32292e676f6f676c652e6164732e676f6f676c656164732e76302e63" . + "6f6d6d6f6e2e4d616e75616c4370634800123f0a0a6d616e75616c5f6370" . + "6d18192001280b32292e676f6f676c652e6164732e676f6f676c65616473" . + "2e76302e636f6d6d6f6e2e4d616e75616c43706d480012530a146d617869" . + "6d697a655f636f6e76657273696f6e73181e2001280b32332e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e636f6d6d6f6e2e4d617869" . + "6d697a65436f6e76657273696f6e734800125c0a196d6178696d697a655f" . + "636f6e76657273696f6e5f76616c7565181f2001280b32372e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e636f6d6d6f6e2e4d617869" . + "6d697a65436f6e76657273696f6e56616c75654800123f0a0a7461726765" . + "745f637061181a2001280b32292e676f6f676c652e6164732e676f6f676c" . + "656164732e76302e636f6d6d6f6e2e546172676574437061480012410a0b" . + "7461726765745f726f6173181d2001280b322a2e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e636f6d6d6f6e2e546172676574526f61" . + "73480012430a0c7461726765745f7370656e64181b2001280b322b2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e636f6d6d6f6e2e54" . + "61726765745370656e6448001a85020a0f4e6574776f726b53657474696e" . + "677312380a147461726765745f676f6f676c655f73656172636818012001" . + "280b321a2e676f6f676c652e70726f746f6275662e426f6f6c56616c7565" . + "12390a157461726765745f7365617263685f6e6574776f726b1802200128" . + "0b321a2e676f6f676c652e70726f746f6275662e426f6f6c56616c756512" . + "3a0a167461726765745f636f6e74656e745f6e6574776f726b1803200128" . + "0b321a2e676f6f676c652e70726f746f6275662e426f6f6c56616c756512" . + "410a1d7461726765745f706172746e65725f7365617263685f6e6574776f" . + "726b18042001280b321a2e676f6f676c652e70726f746f6275662e426f6f" . + "6c56616c75651a480a10486f74656c53657474696e67496e666f12340a0f" . + "686f74656c5f63656e7465725f696418012001280b321b2e676f6f676c65" . + "2e70726f746f6275662e496e74363456616c75651aec010a1744796e616d" . + "696353656172636841647353657474696e6712310a0b646f6d61696e5f6e" . + "616d6518012001280b321c2e676f6f676c652e70726f746f6275662e5374" . + "72696e6756616c756512330a0d6c616e67756167655f636f646518022001" . + "280b321c2e676f6f676c652e70726f746f6275662e537472696e6756616c" . + "7565123a0a167573655f737570706c6965645f75726c735f6f6e6c791803" . + "2001280b321a2e676f6f676c652e70726f746f6275662e426f6f6c56616c" . + "7565122d0a08666565645f69647318042003280b321b2e676f6f676c652e" . + "70726f746f6275662e496e74363456616c7565421b0a1963616d70616967" . + "6e5f62696464696e675f737472617465677942d2010a25636f6d2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e7265736f7572636573" . + "420d43616d706169676e50726f746f50015a4a676f6f676c652e676f6c61" . + "6e672e6f72672f67656e70726f746f2f676f6f676c65617069732f616473" . + "2f676f6f676c656164732f76302f7265736f75726365733b7265736f7572" . + "636573a20203474141aa0221476f6f676c652e4164732e476f6f676c6541" . + "64732e56302e5265736f7572636573ca0221476f6f676c655c4164735c47" . + "6f6f676c654164735c56305c5265736f7572636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/CampaignBudget.php b/metadata/Google/Ads/GoogleAds/V0/Resources/CampaignBudget.php new file mode 100644 index 000000000..493907fff --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/CampaignBudget.php @@ -0,0 +1,56 @@ +internalAddGeneratedFile(hex2bin( + "0ae7060a37676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f63616d706169676e5f6275646765742e70726f746f" . + "1221676f6f676c652e6164732e676f6f676c656164732e76302e7265736f" . + "75726365731a31676f6f676c652f6164732f676f6f676c656164732f7630" . + "2f656e756d732f6275646765745f7374617475732e70726f746f1a1e676f" . + "6f676c652f70726f746f6275662f77726170706572732e70726f746f22d2" . + "030a0e43616d706169676e42756467657412150a0d7265736f757263655f" . + "6e616d6518012001280912270a02696418032001280b321b2e676f6f676c" . + "652e70726f746f6275662e496e74363456616c7565122a0a046e616d6518" . + "042001280b321c2e676f6f676c652e70726f746f6275662e537472696e67" . + "56616c756512320a0d616d6f756e745f6d6963726f7318052001280b321b" . + "2e676f6f676c652e70726f746f6275662e496e74363456616c7565124c0a" . + "0673746174757318062001280e323c2e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e656e756d732e427564676574537461747573456e" . + "756d2e42756467657453746174757312650a0f64656c69766572795f6d65" . + "74686f6418072001280e324c2e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e656e756d732e42756467657444656c69766572794d6574" . + "686f64456e756d2e42756467657444656c69766572794d6574686f641235" . + "0a116578706c696369746c795f73686172656418082001280b321a2e676f" . + "6f676c652e70726f746f6275662e426f6f6c56616c756512340a0f726566" . + "6572656e63655f636f756e7418092001280b321b2e676f6f676c652e7072" . + "6f746f6275662e496e74363456616c756542d8010a25636f6d2e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e7265736f757263657342" . + "1343616d706169676e42756467657450726f746f50015a4a676f6f676c65" . + "2e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069" . + "732f6164732f676f6f676c656164732f76302f7265736f75726365733b72" . + "65736f7572636573a20203474141aa0221476f6f676c652e4164732e476f" . + "6f676c654164732e56302e5265736f7572636573ca0221476f6f676c655c" . + "4164735c476f6f676c654164735c56305c5265736f757263657362067072" . + "6f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/CampaignCriterion.php b/metadata/Google/Ads/GoogleAds/V0/Resources/CampaignCriterion.php new file mode 100644 index 000000000..b80ee0403 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/CampaignCriterion.php @@ -0,0 +1,58 @@ +internalAddGeneratedFile(hex2bin( + "0aa9070a3a676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f63616d706169676e5f637269746572696f6e2e7072" . + "6f746f1221676f6f676c652e6164732e676f6f676c656164732e76302e72" . + "65736f75726365731a32676f6f676c652f6164732f676f6f676c65616473" . + "2f76302f656e756d732f637269746572696f6e5f747970652e70726f746f" . + "1a1e676f6f676c652f70726f746f6275662f77726170706572732e70726f" . + "746f228d040a1143616d706169676e437269746572696f6e12150a0d7265" . + "736f757263655f6e616d65180120012809122e0a0863616d706169676e18" . + "042001280b321c2e676f6f676c652e70726f746f6275662e537472696e67" . + "56616c756512310a0c637269746572696f6e5f696418052001280b321b2e" . + "676f6f676c652e70726f746f6275662e496e74363456616c756512310a0c" . + "6269645f6d6f646966696572180e2001280b321b2e676f6f676c652e7072" . + "6f746f6275662e466c6f617456616c7565122c0a086e6567617469766518" . + "072001280b321a2e676f6f676c652e70726f746f6275662e426f6f6c5661" . + "6c7565124c0a047479706518062001280e323e2e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e656e756d732e437269746572696f6e54" . + "797065456e756d2e437269746572696f6e54797065123e0a076b6579776f" . + "726418082001280b322b2e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e636f6d6d6f6e2e4b6579776f7264496e666f480012400a086c" . + "6f636174696f6e180c2001280b322c2e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e636f6d6d6f6e2e4c6f636174696f6e496e666f48" . + "0012400a08706c6174666f726d180d2001280b322c2e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e636f6d6d6f6e2e506c6174666f72" . + "6d496e666f4800420b0a09637269746572696f6e42db010a25636f6d2e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e7265736f757263" . + "6573421643616d706169676e437269746572696f6e50726f746f50015a4a" . + "676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f" . + "676c65617069732f6164732f676f6f676c656164732f76302f7265736f75" . + "726365733b7265736f7572636573a20203474141aa0221476f6f676c652e" . + "4164732e476f6f676c654164732e56302e5265736f7572636573ca022147" . + "6f6f676c655c4164735c476f6f676c654164735c56305c5265736f757263" . + "6573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/Customer.php b/metadata/Google/Ads/GoogleAds/V0/Resources/Customer.php new file mode 100644 index 000000000..de2813171 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/Customer.php @@ -0,0 +1,48 @@ +internalAddGeneratedFile(hex2bin( + "0acc050a30676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f637573746f6d65722e70726f746f1221676f6f676c" . + "652e6164732e676f6f676c656164732e76302e7265736f75726365732297" . + "030a08437573746f6d657212150a0d7265736f757263655f6e616d651801" . + "2001280912270a02696418032001280b321b2e676f6f676c652e70726f74" . + "6f6275662e496e74363456616c756512360a106465736372697074697665" . + "5f6e616d6518042001280b321c2e676f6f676c652e70726f746f6275662e" . + "537472696e6756616c756512330a0d63757272656e63795f636f64651805" . + "2001280b321c2e676f6f676c652e70726f746f6275662e537472696e6756" . + "616c7565122f0a0974696d655f7a6f6e6518062001280b321c2e676f6f67" . + "6c652e70726f746f6275662e537472696e6756616c7565123b0a15747261" . + "636b696e675f75726c5f74656d706c61746518072001280b321c2e676f6f" . + "676c652e70726f746f6275662e537472696e6756616c756512380a146175" . + "746f5f74616767696e675f656e61626c656418082001280b321a2e676f6f" . + "676c652e70726f746f6275662e426f6f6c56616c756512360a126861735f" . + "706172746e6572735f626164676518092001280b321a2e676f6f676c652e" . + "70726f746f6275662e426f6f6c56616c756542d2010a25636f6d2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e7265736f7572636573" . + "420d437573746f6d657250726f746f50015a4a676f6f676c652e676f6c61" . + "6e672e6f72672f67656e70726f746f2f676f6f676c65617069732f616473" . + "2f676f6f676c656164732f76302f7265736f75726365733b7265736f7572" . + "636573a20203474141aa0221476f6f676c652e4164732e476f6f676c6541" . + "64732e56302e5265736f7572636573ca0221476f6f676c655c4164735c47" . + "6f6f676c654164735c56305c5265736f7572636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/GeoTargetConstant.php b/metadata/Google/Ads/GoogleAds/V0/Resources/GeoTargetConstant.php new file mode 100644 index 000000000..283656c49 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/GeoTargetConstant.php @@ -0,0 +1,43 @@ +internalAddGeneratedFile(hex2bin( + "0aaf040a3b676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f67656f5f7461726765745f636f6e7374616e742e70" . + "726f746f1221676f6f676c652e6164732e676f6f676c656164732e76302e" . + "7265736f757263657322e6010a1147656f546172676574436f6e7374616e" . + "7412150a0d7265736f757263655f6e616d6518012001280912270a026964" . + "18032001280b321b2e676f6f676c652e70726f746f6275662e496e743634" . + "56616c7565122a0a046e616d6518042001280b321c2e676f6f676c652e70" . + "726f746f6275662e537472696e6756616c756512320a0c636f756e747279" . + "5f636f646518052001280b321c2e676f6f676c652e70726f746f6275662e" . + "537472696e6756616c756512310a0b7461726765745f7479706518062001" . + "280b321c2e676f6f676c652e70726f746f6275662e537472696e6756616c" . + "756542db010a25636f6d2e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e7265736f7572636573421647656f546172676574436f6e7374" . + "616e7450726f746f50015a4a676f6f676c652e676f6c616e672e6f72672f" . + "67656e70726f746f2f676f6f676c65617069732f6164732f676f6f676c65" . + "6164732f76302f7265736f75726365733b7265736f7572636573a2020347" . + "4141aa0221476f6f676c652e4164732e476f6f676c654164732e56302e52" . + "65736f7572636573ca0221476f6f676c655c4164735c476f6f676c654164" . + "735c56305c5265736f7572636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/GoogleAdsField.php b/metadata/Google/Ads/GoogleAds/V0/Resources/GoogleAdsField.php new file mode 100644 index 000000000..3ca431ec1 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/GoogleAdsField.php @@ -0,0 +1,67 @@ +internalAddGeneratedFile(hex2bin( + "0ab2090a38676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f676f6f676c655f6164735f6669656c642e70726f74" . + "6f1221676f6f676c652e6164732e676f6f676c656164732e76302e726573" . + "6f75726365731a3e676f6f676c652f6164732f676f6f676c656164732f76" . + "302f656e756d732f676f6f676c655f6164735f6669656c645f646174615f" . + "747970652e70726f746f1a1e676f6f676c652f70726f746f6275662f7772" . + "6170706572732e70726f746f228f060a0e476f6f676c654164734669656c" . + "6412150a0d7265736f757263655f6e616d65180120012809122a0a046e61" . + "6d6518022001280b321c2e676f6f676c652e70726f746f6275662e537472" . + "696e6756616c756512620a0863617465676f727918032001280e32502e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e656e756d732e47" . + "6f6f676c654164734669656c6443617465676f7279456e756d2e476f6f67" . + "6c654164734669656c6443617465676f7279122e0a0a73656c6563746162" . + "6c6518042001280b321a2e676f6f676c652e70726f746f6275662e426f6f" . + "6c56616c7565122e0a0a66696c74657261626c6518052001280b321a2e67" . + "6f6f676c652e70726f746f6275662e426f6f6c56616c7565122c0a08736f" . + "727461626c6518062001280b321a2e676f6f676c652e70726f746f627566" . + "2e426f6f6c56616c756512350a0f73656c65637461626c655f7769746818" . + "072003280b321c2e676f6f676c652e70726f746f6275662e537472696e67" . + "56616c756512390a136174747269627574655f7265736f75726365731808" . + "2003280b321c2e676f6f676c652e70726f746f6275662e537472696e6756" . + "616c7565122d0a076d65747269637318092003280b321c2e676f6f676c65" . + "2e70726f746f6275662e537472696e6756616c7565122e0a087365676d65" . + "6e7473180a2003280b321c2e676f6f676c652e70726f746f6275662e5374" . + "72696e6756616c756512310a0b656e756d5f76616c756573180b2003280b" . + "321c2e676f6f676c652e70726f746f6275662e537472696e6756616c7565" . + "12630a09646174615f74797065180c2001280e32502e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e656e756d732e476f6f676c654164" . + "734669656c644461746154797065456e756d2e476f6f676c654164734669" . + "656c644461746154797065122e0a08747970655f75726c180d2001280b32" . + "1c2e676f6f676c652e70726f746f6275662e537472696e6756616c756512" . + "2f0a0b69735f7265706561746564180e2001280b321a2e676f6f676c652e" . + "70726f746f6275662e426f6f6c56616c756542d8010a25636f6d2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e7265736f7572636573" . + "4213476f6f676c654164734669656c6450726f746f50015a4a676f6f676c" . + "652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c656170" . + "69732f6164732f676f6f676c656164732f76302f7265736f75726365733b" . + "7265736f7572636573a20203474141aa0221476f6f676c652e4164732e47" . + "6f6f676c654164732e56302e5265736f7572636573ca0221476f6f676c65" . + "5c4164735c476f6f676c654164735c56305c5265736f7572636573620670" . + "726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/KeywordView.php b/metadata/Google/Ads/GoogleAds/V0/Resources/KeywordView.php new file mode 100644 index 000000000..6962cbe22 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/KeywordView.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile(hex2bin( + "0adf020a34676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f6b6579776f72645f766965772e70726f746f122167" . + "6f6f676c652e6164732e676f6f676c656164732e76302e7265736f757263" . + "657322240a0b4b6579776f72645669657712150a0d7265736f757263655f" . + "6e616d6518012001280942d5010a25636f6d2e676f6f676c652e6164732e" . + "676f6f676c656164732e76302e7265736f757263657342104b6579776f72" . + "645669657750726f746f50015a4a676f6f676c652e676f6c616e672e6f72" . + "672f67656e70726f746f2f676f6f676c65617069732f6164732f676f6f67" . + "6c656164732f76302f7265736f75726365733b7265736f7572636573a202" . + "03474141aa0221476f6f676c652e4164732e476f6f676c654164732e5630" . + "2e5265736f7572636573ca0221476f6f676c655c4164735c476f6f676c65" . + "4164735c56305c5265736f7572636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Resources/Recommendation.php b/metadata/Google/Ads/GoogleAds/V0/Resources/Recommendation.php new file mode 100644 index 000000000..531602a0b --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Resources/Recommendation.php @@ -0,0 +1,139 @@ +internalAddGeneratedFile(hex2bin( + "0aef190a36676f6f676c652f6164732f676f6f676c656164732f76302f72" . + "65736f75726365732f7265636f6d6d656e646174696f6e2e70726f746f12" . + "21676f6f676c652e6164732e676f6f676c656164732e76302e7265736f75" . + "726365731a2d676f6f676c652f6164732f676f6f676c656164732f76302f" . + "636f6d6d6f6e2f63726974657269612e70726f746f1a37676f6f676c652f" . + "6164732f676f6f676c656164732f76302f656e756d732f7265636f6d6d65" . + "6e646174696f6e5f747970652e70726f746f1a49676f6f676c652f616473" . + "2f676f6f676c656164732f76302f656e756d732f7461726765745f637061" . + "5f6f70745f696e5f7265636f6d6d656e646174696f6e5f676f616c2e7072" . + "6f746f1a1e676f6f676c652f70726f746f6275662f77726170706572732e" . + "70726f746f22db150a0e5265636f6d6d656e646174696f6e12150a0d7265" . + "736f757263655f6e616d6518012001280912560a04747970651802200128" . + "0e32482e676f6f676c652e6164732e676f6f676c656164732e76302e656e" . + "756d732e5265636f6d6d656e646174696f6e54797065456e756d2e526563" . + "6f6d6d656e646174696f6e5479706512560a06696d706163741803200128" . + "0b32462e676f6f676c652e6164732e676f6f676c656164732e76302e7265" . + "736f75726365732e5265636f6d6d656e646174696f6e2e5265636f6d6d65" . + "6e646174696f6e496d7061637412350a0f63616d706169676e5f62756467" . + "657418052001280b321c2e676f6f676c652e70726f746f6275662e537472" . + "696e6756616c7565122e0a0863616d706169676e18062001280b321c2e67" . + "6f6f676c652e70726f746f6275662e537472696e6756616c7565122e0a08" . + "61645f67726f757018072001280b321c2e676f6f676c652e70726f746f62" . + "75662e537472696e6756616c756512780a1e63616d706169676e5f627564" . + "6765745f7265636f6d6d656e646174696f6e18042001280b324e2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e7265736f7572636573" . + "2e5265636f6d6d656e646174696f6e2e43616d706169676e427564676574" . + "5265636f6d6d656e646174696f6e480012690a166b6579776f72645f7265" . + "636f6d6d656e646174696f6e18082001280b32472e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e7265736f75726365732e5265636f6d" . + "6d656e646174696f6e2e4b6579776f72645265636f6d6d656e646174696f" . + "6e480012680a16746578745f61645f7265636f6d6d656e646174696f6e18" . + "092001280b32462e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e7265736f75726365732e5265636f6d6d656e646174696f6e2e546578" . + "7441645265636f6d6d656e646174696f6e4800127a0a207461726765745f" . + "6370615f6f70745f696e5f7265636f6d6d656e646174696f6e180a200128" . + "0b324e2e676f6f676c652e6164732e676f6f676c656164732e76302e7265" . + "736f75726365732e5265636f6d6d656e646174696f6e2e54617267657443" . + "70614f7074496e5265636f6d6d656e646174696f6e48001ad9010a145265" . + "636f6d6d656e646174696f6e496d70616374125d0a0c626173655f6d6574" . + "7269637318012001280b32472e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e7265736f75726365732e5265636f6d6d656e646174696f" . + "6e2e5265636f6d6d656e646174696f6e4d65747269637312620a11706f74" . + "656e7469616c5f6d65747269637318022001280b32472e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e7265736f75726365732e526563" . + "6f6d6d656e646174696f6e2e5265636f6d6d656e646174696f6e4d657472" . + "6963731a90020a155265636f6d6d656e646174696f6e4d65747269637312" . + "310a0b696d7072657373696f6e7318012001280b321c2e676f6f676c652e" . + "70726f746f6275662e446f75626c6556616c7565122c0a06636c69636b73" . + "18022001280b321c2e676f6f676c652e70726f746f6275662e446f75626c" . + "6556616c756512300a0b636f73745f6d6963726f7318032001280b321b2e" . + "676f6f676c652e70726f746f6275662e496e74363456616c756512310a0b" . + "636f6e76657273696f6e7318042001280b321c2e676f6f676c652e70726f" . + "746f6275662e446f75626c6556616c756512310a0b766964656f5f766965" . + "777318052001280b321c2e676f6f676c652e70726f746f6275662e446f75" . + "626c6556616c75651aee030a1c43616d706169676e427564676574526563" . + "6f6d6d656e646174696f6e12410a1c63757272656e745f6275646765745f" . + "616d6f756e745f6d6963726f7318012001280b321b2e676f6f676c652e70" . + "726f746f6275662e496e74363456616c756512450a207265636f6d6d656e" . + "6465645f6275646765745f616d6f756e745f6d6963726f7318022001280b" . + "321b2e676f6f676c652e70726f746f6275662e496e74363456616c756512" . + "89010a0e6275646765745f6f7074696f6e7318032003280b32712e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e7265736f7572636573" . + "2e5265636f6d6d656e646174696f6e2e43616d706169676e427564676574" . + "5265636f6d6d656e646174696f6e2e43616d706169676e42756467657452" . + "65636f6d6d656e646174696f6e4f7074696f6e1ab7010a2243616d706169" . + "676e4275646765745265636f6d6d656e646174696f6e4f7074696f6e1239" . + "0a146275646765745f616d6f756e745f6d6963726f7318012001280b321b" . + "2e676f6f676c652e70726f746f6275662e496e74363456616c756512560a" . + "06696d7061637418022001280b32462e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e7265736f75726365732e5265636f6d6d656e6461" . + "74696f6e2e5265636f6d6d656e646174696f6e496d706163741a96010a15" . + "4b6579776f72645265636f6d6d656e646174696f6e123c0a076b6579776f" . + "726418012001280b322b2e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e636f6d6d6f6e2e4b6579776f7264496e666f123f0a1a726563" . + "6f6d6d656e6465645f6370635f6269645f6d6963726f7318022001280b32" . + "1b2e676f6f676c652e70726f746f6275662e496e74363456616c75651ab2" . + "010a145465787441645265636f6d6d656e646174696f6e122e0a02616418" . + "012001280b32222e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e636f6d6d6f6e2e416412330a0d6372656174696f6e5f646174651802" . + "2001280b321c2e676f6f676c652e70726f746f6275662e537472696e6756" . + "616c756512350a0f6175746f5f6170706c795f6461746518032001280b32" . + "1c2e676f6f676c652e70726f746f6275662e537472696e6756616c75651a" . + "df040a1c5461726765744370614f7074496e5265636f6d6d656e64617469" . + "6f6e1282010a076f7074696f6e7318012003280b32712e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e7265736f75726365732e526563" . + "6f6d6d656e646174696f6e2e5461726765744370614f7074496e5265636f" . + "6d6d656e646174696f6e2e5461726765744370614f7074496e5265636f6d" . + "6d656e646174696f6e4f7074696f6e12420a1d7265636f6d6d656e646564" . + "5f7461726765745f6370615f6d6963726f7318022001280b321b2e676f6f" . + "676c652e70726f746f6275662e496e74363456616c75651af5020a225461" . + "726765744370614f7074496e5265636f6d6d656e646174696f6e4f707469" . + "6f6e12720a04676f616c18012001280e32642e676f6f676c652e6164732e" . + "676f6f676c656164732e76302e656e756d732e5461726765744370614f70" . + "74496e5265636f6d6d656e646174696f6e476f616c456e756d2e54617267" . + "65744370614f7074496e5265636f6d6d656e646174696f6e476f616c1236" . + "0a117461726765745f6370615f6d6963726f7318022001280b321b2e676f" . + "6f676c652e70726f746f6275662e496e74363456616c7565124b0a267265" . + "7175697265645f63616d706169676e5f6275646765745f616d6f756e745f" . + "6d6963726f7318032001280b321b2e676f6f676c652e70726f746f627566" . + "2e496e74363456616c756512560a06696d7061637418042001280b32462e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e7265736f7572" . + "6365732e5265636f6d6d656e646174696f6e2e5265636f6d6d656e646174" . + "696f6e496d7061637442100a0e7265636f6d6d656e646174696f6e42d801" . + "0a25636f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "7265736f757263657342135265636f6d6d656e646174696f6e50726f746f" . + "50015a4a676f6f676c652e676f6c616e672e6f72672f67656e70726f746f" . + "2f676f6f676c65617069732f6164732f676f6f676c656164732f76302f72" . + "65736f75726365733b7265736f7572636573a20203474141aa0221476f6f" . + "676c652e4164732e476f6f676c654164732e56302e5265736f7572636573" . + "ca0221476f6f676c655c4164735c476f6f676c654164735c56305c526573" . + "6f7572636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupAdService.php b/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupAdService.php new file mode 100644 index 000000000..8b31d1cba --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupAdService.php @@ -0,0 +1,71 @@ +internalAddGeneratedFile(hex2bin( + "0aac0a0a3a676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f61645f67726f75705f61645f736572766963652e7072" . + "6f746f1220676f6f676c652e6164732e676f6f676c656164732e76302e73" . + "657276696365731a1c676f6f676c652f6170692f616e6e6f746174696f6e" . + "732e70726f746f1a20676f6f676c652f70726f746f6275662f6669656c64" . + "5f6d61736b2e70726f746f222c0a13476574416447726f75704164526571" . + "7565737412150a0d7265736f757263655f6e616d6518012001280922780a" . + "174d7574617465416447726f75704164735265717565737412130a0b6375" . + "73746f6d65725f696418012001280912480a0a6f7065726174696f6e7318" . + "022003280b32342e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e73657276696365732e416447726f757041644f7065726174696f6e22" . + "e4010a12416447726f757041644f7065726174696f6e122f0a0b75706461" . + "74655f6d61736b18042001280b321a2e676f6f676c652e70726f746f6275" . + "662e4669656c644d61736b123e0a0663726561746518012001280b322c2e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e7265736f7572" . + "6365732e416447726f757041644800123e0a067570646174651802200128" . + "0b322c2e676f6f676c652e6164732e676f6f676c656164732e76302e7265" . + "736f75726365732e416447726f75704164480012100a0672656d6f766518" . + "03200128094800420b0a096f7065726174696f6e22640a184d7574617465" . + "416447726f7570416473526573706f6e736512480a07726573756c747318" . + "022003280b32372e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e73657276696365732e4d7574617465416447726f7570416452657375" . + "6c74222e0a154d7574617465416447726f75704164526573756c7412150a" . + "0d7265736f757263655f6e616d651801200128093286030a10416447726f" . + "757041645365727669636512a9010a0c476574416447726f757041641235" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e7365727669" . + "6365732e476574416447726f75704164526571756573741a2c2e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e7265736f75726365732e" . + "416447726f75704164223482d3e493022e122c2f76302f7b7265736f7572" . + "63655f6e616d653d637573746f6d6572732f2a2f616447726f7570416473" . + "2f2a7d12c5010a104d7574617465416447726f757041647312392e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e73657276696365732e" . + "4d7574617465416447726f7570416473526571756573741a3a2e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e73657276696365732e4d" . + "7574617465416447726f7570416473526573706f6e7365223a82d3e49302" . + "34222f2f76302f637573746f6d6572732f7b637573746f6d65725f69643d" . + "2a7d2f616447726f75704164733a6d75746174653a012a42d5010a24636f" . + "6d2e676f6f676c652e6164732e676f6f676c656164732e76302e73657276" . + "696365734215416447726f757041645365727669636550726f746f50015a" . + "48676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f" . + "6f676c65617069732f6164732f676f6f676c656164732f76302f73657276" . + "696365733b7365727669636573a20203474141aa0220476f6f676c652e41" . + "64732e476f6f676c654164732e56302e5365727669636573ca0220476f6f" . + "676c655c4164735c476f6f676c654164735c56305c536572766963657362" . + "0670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierService.php b/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierService.php new file mode 100644 index 000000000..6b25dadf5 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierService.php @@ -0,0 +1,77 @@ +internalAddGeneratedFile(hex2bin( + "0ae20b0a44676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f61645f67726f75705f6269645f6d6f6469666965725f" . + "736572766963652e70726f746f1220676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e73657276696365731a1c676f6f676c652f6170692f" . + "616e6e6f746174696f6e732e70726f746f1a20676f6f676c652f70726f74" . + "6f6275662f6669656c645f6d61736b2e70726f746f22350a1c4765744164" . + "47726f75704269644d6f6469666965725265717565737412150a0d726573" . + "6f757263655f6e616d65180120012809228a010a204d7574617465416447" . + "726f75704269644d6f646966696572735265717565737412130a0b637573" . + "746f6d65725f696418012001280912510a0a6f7065726174696f6e731802" . + "2003280b323d2e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e73657276696365732e416447726f75704269644d6f6469666965724f70" . + "65726174696f6e22ff010a1b416447726f75704269644d6f646966696572" . + "4f7065726174696f6e122f0a0b7570646174655f6d61736b18042001280b" . + "321a2e676f6f676c652e70726f746f6275662e4669656c644d61736b1247" . + "0a0663726561746518012001280b32352e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e7265736f75726365732e416447726f75704269" . + "644d6f646966696572480012470a0675706461746518022001280b32352e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e7265736f7572" . + "6365732e416447726f75704269644d6f646966696572480012100a067265" . + "6d6f76651803200128094800420b0a096f7065726174696f6e22760a214d" . + "7574617465416447726f75704269644d6f64696669657273526573706f6e" . + "736512510a07726573756c747318022003280b32402e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e73657276696365732e4d75746174" . + "65416447726f75704269644d6f646966696572526573756c7422370a1e4d" . + "7574617465416447726f75704269644d6f646966696572526573756c7412" . + "150a0d7265736f757263655f6e616d6518012001280932d7030a19416447" . + "726f75704269644d6f6469666965725365727669636512cd010a15476574" . + "416447726f75704269644d6f646966696572123e2e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e73657276696365732e476574416447" . + "726f75704269644d6f646966696572526571756573741a352e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e7265736f75726365732e41" . + "6447726f75704269644d6f646966696572223d82d3e493023712352f7630" . + "2f7b7265736f757263655f6e616d653d637573746f6d6572732f2a2f6164" . + "47726f75704269644d6f646966696572732f2a7d12e9010a194d75746174" . + "65416447726f75704269644d6f6469666965727312422e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e73657276696365732e4d757461" . + "7465416447726f75704269644d6f64696669657273526571756573741a43" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e7365727669" . + "6365732e4d7574617465416447726f75704269644d6f6469666965727352" . + "6573706f6e7365224382d3e493023d22382f76302f637573746f6d657273" . + "2f7b637573746f6d65725f69643d2a7d2f616447726f75704269644d6f64" . + "6966696572733a6d75746174653a012a42de010a24636f6d2e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e7365727669636573421e41" . + "6447726f75704269644d6f6469666965725365727669636550726f746f50" . + "015a48676f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f" . + "676f6f676c65617069732f6164732f676f6f676c656164732f76302f7365" . + "7276696365733b7365727669636573a20203474141aa0220476f6f676c65" . + "2e4164732e476f6f676c654164732e56302e5365727669636573ca022047" . + "6f6f676c655c4164735c476f6f676c654164735c56305c53657276696365" . + "73620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionService.php b/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionService.php new file mode 100644 index 000000000..28ce25d77 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionService.php @@ -0,0 +1,75 @@ +internalAddGeneratedFile(hex2bin( + "0aab0b0a41676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f61645f67726f75705f637269746572696f6e5f736572" . + "766963652e70726f746f1220676f6f676c652e6164732e676f6f676c6561" . + "64732e76302e73657276696365731a1c676f6f676c652f6170692f616e6e" . + "6f746174696f6e732e70726f746f1a20676f6f676c652f70726f746f6275" . + "662f6669656c645f6d61736b2e70726f746f22330a1a476574416447726f" . + "7570437269746572696f6e5265717565737412150a0d7265736f75726365" . + "5f6e616d651801200128092284010a1c4d7574617465416447726f757043" . + "726974657269615265717565737412130a0b637573746f6d65725f696418" . + "0120012809124f0a0a6f7065726174696f6e7318022003280b323b2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e7365727669636573" . + "2e416447726f7570437269746572696f6e4f7065726174696f6e22f9010a" . + "19416447726f7570437269746572696f6e4f7065726174696f6e122f0a0b" . + "7570646174655f6d61736b18042001280b321a2e676f6f676c652e70726f" . + "746f6275662e4669656c644d61736b12450a066372656174651801200128" . + "0b32332e676f6f676c652e6164732e676f6f676c656164732e76302e7265" . + "736f75726365732e416447726f7570437269746572696f6e480012450a06" . + "75706461746518022001280b32332e676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e7265736f75726365732e416447726f757043726974" . + "6572696f6e480012100a0672656d6f76651803200128094800420b0a096f" . + "7065726174696f6e22700a1d4d7574617465416447726f75704372697465" . + "726961526573706f6e7365124f0a07726573756c747318022003280b323e" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e7365727669" . + "6365732e4d7574617465416447726f7570437269746572696f6e52657375" . + "6c7422350a1c4d7574617465416447726f7570437269746572696f6e5265" . + "73756c7412150a0d7265736f757263655f6e616d6518012001280932bb03" . + "0a17416447726f7570437269746572696f6e5365727669636512c3010a13" . + "476574416447726f7570437269746572696f6e123c2e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e73657276696365732e4765744164" . + "47726f7570437269746572696f6e526571756573741a332e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e7265736f75726365732e4164" . + "47726f7570437269746572696f6e223982d3e493023312312f76302f7b72" . + "65736f757263655f6e616d653d637573746f6d6572732f2a2f616447726f" . + "757043726974657269612f2a7d12d9010a154d7574617465416447726f75" . + "704372697465726961123e2e676f6f676c652e6164732e676f6f676c6561" . + "64732e76302e73657276696365732e4d7574617465416447726f75704372" . + "697465726961526571756573741a3f2e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e73657276696365732e4d7574617465416447726f" . + "75704372697465726961526573706f6e7365223f82d3e493023922342f76" . + "302f637573746f6d6572732f7b637573746f6d65725f69643d2a7d2f6164" . + "47726f757043726974657269613a6d75746174653a012a42dc010a24636f" . + "6d2e676f6f676c652e6164732e676f6f676c656164732e76302e73657276" . + "69636573421c416447726f7570437269746572696f6e5365727669636550" . + "726f746f50015a48676f6f676c652e676f6c616e672e6f72672f67656e70" . + "726f746f2f676f6f676c65617069732f6164732f676f6f676c656164732f" . + "76302f73657276696365733b7365727669636573a20203474141aa022047" . + "6f6f676c652e4164732e476f6f676c654164732e56302e53657276696365" . + "73ca0220476f6f676c655c4164735c476f6f676c654164735c56305c5365" . + "727669636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupService.php b/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupService.php new file mode 100644 index 000000000..f18295391 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/AdGroupService.php @@ -0,0 +1,69 @@ +internalAddGeneratedFile(hex2bin( + "0a830a0a37676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f61645f67726f75705f736572766963652e70726f746f" . + "1220676f6f676c652e6164732e676f6f676c656164732e76302e73657276" . + "696365731a1c676f6f676c652f6170692f616e6e6f746174696f6e732e70" . + "726f746f1a20676f6f676c652f70726f746f6275662f6669656c645f6d61" . + "736b2e70726f746f222a0a11476574416447726f75705265717565737412" . + "150a0d7265736f757263655f6e616d6518012001280922740a154d757461" . + "7465416447726f7570735265717565737412130a0b637573746f6d65725f" . + "696418012001280912460a0a6f7065726174696f6e7318022003280b3232" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e7365727669" . + "6365732e416447726f75704f7065726174696f6e22de010a10416447726f" . + "75704f7065726174696f6e122f0a0b7570646174655f6d61736b18042001" . + "280b321a2e676f6f676c652e70726f746f6275662e4669656c644d61736b" . + "123c0a0663726561746518012001280b322a2e676f6f676c652e6164732e" . + "676f6f676c656164732e76302e7265736f75726365732e416447726f7570" . + "4800123c0a0675706461746518022001280b322a2e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e7265736f75726365732e416447726f" . + "7570480012100a0672656d6f76651803200128094800420b0a096f706572" . + "6174696f6e22600a164d7574617465416447726f757073526573706f6e73" . + "6512460a07726573756c747318022003280b32352e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e73657276696365732e4d7574617465" . + "416447726f7570526573756c74222c0a134d7574617465416447726f7570" . + "526573756c7412150a0d7265736f757263655f6e616d6518012001280932" . + "f4020a0e416447726f75705365727669636512a1010a0a47657441644772" . + "6f757012332e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "73657276696365732e476574416447726f7570526571756573741a2a2e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e7265736f757263" . + "65732e416447726f7570223282d3e493022c122a2f76302f7b7265736f75" . + "7263655f6e616d653d637573746f6d6572732f2a2f616447726f7570732f" . + "2a7d12bd010a0e4d7574617465416447726f75707312372e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e73657276696365732e4d7574" . + "617465416447726f757073526571756573741a382e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e73657276696365732e4d7574617465" . + "416447726f757073526573706f6e7365223882d3e4930232222d2f76302f" . + "637573746f6d6572732f7b637573746f6d65725f69643d2a7d2f61644772" . + "6f7570733a6d75746174653a012a42d3010a24636f6d2e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e73657276696365734213416447" . + "726f75705365727669636550726f746f50015a48676f6f676c652e676f6c" . + "616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f6164" . + "732f676f6f676c656164732f76302f73657276696365733b736572766963" . + "6573a20203474141aa0220476f6f676c652e4164732e476f6f676c654164" . + "732e56302e5365727669636573ca0220476f6f676c655c4164735c476f6f" . + "676c654164735c56305c5365727669636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/BiddingStrategyService.php b/metadata/Google/Ads/GoogleAds/V0/Services/BiddingStrategyService.php new file mode 100644 index 000000000..1f9198151 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/BiddingStrategyService.php @@ -0,0 +1,75 @@ +internalAddGeneratedFile(hex2bin( + "0aab0b0a3f676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f62696464696e675f73747261746567795f7365727669" . + "63652e70726f746f1220676f6f676c652e6164732e676f6f676c65616473" . + "2e76302e73657276696365731a1c676f6f676c652f6170692f616e6e6f74" . + "6174696f6e732e70726f746f1a20676f6f676c652f70726f746f6275662f" . + "6669656c645f6d61736b2e70726f746f22320a1947657442696464696e67" . + "53747261746567795265717565737412150a0d7265736f757263655f6e61" . + "6d651801200128092285010a1e4d757461746542696464696e6753747261" . + "7465676965735265717565737412130a0b637573746f6d65725f69641801" . + "20012809124e0a0a6f7065726174696f6e7318022003280b323a2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e73657276696365732e" . + "42696464696e6753747261746567794f7065726174696f6e22f6010a1842" . + "696464696e6753747261746567794f7065726174696f6e122f0a0b757064" . + "6174655f6d61736b18042001280b321a2e676f6f676c652e70726f746f62" . + "75662e4669656c644d61736b12440a0663726561746518012001280b3232" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e7265736f75" . + "726365732e42696464696e675374726174656779480012440a0675706461" . + "746518022001280b32322e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e7265736f75726365732e42696464696e675374726174656779" . + "480012100a0672656d6f76651803200128094800420b0a096f7065726174" . + "696f6e22710a1f4d757461746542696464696e6753747261746567696573" . + "526573706f6e7365124e0a07726573756c747318022003280b323d2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e7365727669636573" . + "2e4d757461746542696464696e675374726174656779526573756c742234" . + "0a1b4d757461746542696464696e675374726174656779526573756c7412" . + "150a0d7265736f757263655f6e616d6518012001280932c1030a16426964" . + "64696e6753747261746567795365727669636512c2010a12476574426964" . + "64696e675374726174656779123b2e676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e73657276696365732e47657442696464696e675374" . + "726174656779526571756573741a322e676f6f676c652e6164732e676f6f" . + "676c656164732e76302e7265736f75726365732e42696464696e67537472" . + "6174656779223b82d3e493023512332f76302f7b7265736f757263655f6e" . + "616d653d637573746f6d6572732f2a2f62696464696e6753747261746567" . + "6965732f2a7d12e1010a174d757461746542696464696e67537472617465" . + "6769657312402e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e73657276696365732e4d757461746542696464696e6753747261746567" . + "696573526571756573741a412e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e73657276696365732e4d757461746542696464696e6753" . + "747261746567696573526573706f6e7365224182d3e493023b22362f7630" . + "2f637573746f6d6572732f7b637573746f6d65725f69643d2a7d2f626964" . + "64696e67537472617465676965733a6d75746174653a012a42db010a2463" . + "6f6d2e676f6f676c652e6164732e676f6f676c656164732e76302e736572" . + "7669636573421b42696464696e6753747261746567795365727669636550" . + "726f746f50015a48676f6f676c652e676f6c616e672e6f72672f67656e70" . + "726f746f2f676f6f676c65617069732f6164732f676f6f676c656164732f" . + "76302f73657276696365733b7365727669636573a20203474141aa022047" . + "6f6f676c652e4164732e476f6f676c654164732e56302e53657276696365" . + "73ca0220476f6f676c655c4164735c476f6f676c654164735c56305c5365" . + "727669636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/CampaignBudgetService.php b/metadata/Google/Ads/GoogleAds/V0/Services/CampaignBudgetService.php new file mode 100644 index 000000000..06cebf2db --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/CampaignBudgetService.php @@ -0,0 +1,74 @@ +internalAddGeneratedFile(hex2bin( + "0a900b0a3e676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f63616d706169676e5f6275646765745f736572766963" . + "652e70726f746f1220676f6f676c652e6164732e676f6f676c656164732e" . + "76302e73657276696365731a1c676f6f676c652f6170692f616e6e6f7461" . + "74696f6e732e70726f746f1a20676f6f676c652f70726f746f6275662f66" . + "69656c645f6d61736b2e70726f746f22310a1847657443616d706169676e" . + "4275646765745265717565737412150a0d7265736f757263655f6e616d65" . + "1801200128092282010a1c4d757461746543616d706169676e4275646765" . + "74735265717565737412130a0b637573746f6d65725f6964180120012809" . + "124d0a0a6f7065726174696f6e7318022003280b32392e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e73657276696365732e43616d70" . + "6169676e4275646765744f7065726174696f6e22f3010a1743616d706169" . + "676e4275646765744f7065726174696f6e122f0a0b7570646174655f6d61" . + "736b18042001280b321a2e676f6f676c652e70726f746f6275662e466965" . + "6c644d61736b12430a0663726561746518012001280b32312e676f6f676c" . + "652e6164732e676f6f676c656164732e76302e7265736f75726365732e43" . + "616d706169676e427564676574480012430a067570646174651802200128" . + "0b32312e676f6f676c652e6164732e676f6f676c656164732e76302e7265" . + "736f75726365732e43616d706169676e427564676574480012100a067265" . + "6d6f76651803200128094800420b0a096f7065726174696f6e226e0a1d4d" . + "757461746543616d706169676e42756467657473526573706f6e7365124d" . + "0a07726573756c747318022003280b323c2e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e73657276696365732e4d757461746543616d" . + "706169676e427564676574526573756c7422330a1a4d757461746543616d" . + "706169676e427564676574526573756c7412150a0d7265736f757263655f" . + "6e616d6518012001280932b3030a1543616d706169676e42756467657453" . + "65727669636512bd010a1147657443616d706169676e427564676574123a" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e7365727669" . + "6365732e47657443616d706169676e427564676574526571756573741a31" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e7265736f75" . + "726365732e43616d706169676e427564676574223982d3e493023312312f" . + "76302f7b7265736f757263655f6e616d653d637573746f6d6572732f2a2f" . + "63616d706169676e427564676574732f2a7d12d9010a154d757461746543" . + "616d706169676e42756467657473123e2e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e73657276696365732e4d757461746543616d70" . + "6169676e42756467657473526571756573741a3f2e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e73657276696365732e4d7574617465" . + "43616d706169676e42756467657473526573706f6e7365223f82d3e49302" . + "3922342f76302f637573746f6d6572732f7b637573746f6d65725f69643d" . + "2a7d2f63616d706169676e427564676574733a6d75746174653a012a42da" . + "010a24636f6d2e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e7365727669636573421a43616d706169676e4275646765745365727669" . + "636550726f746f50015a48676f6f676c652e676f6c616e672e6f72672f67" . + "656e70726f746f2f676f6f676c65617069732f6164732f676f6f676c6561" . + "64732f76302f73657276696365733b7365727669636573a20203474141aa" . + "0220476f6f676c652e4164732e476f6f676c654164732e56302e53657276" . + "69636573ca0220476f6f676c655c4164735c476f6f676c654164735c5630" . + "5c5365727669636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/CampaignCriterionService.php b/metadata/Google/Ads/GoogleAds/V0/Services/CampaignCriterionService.php new file mode 100644 index 000000000..a97bd1f35 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/CampaignCriterionService.php @@ -0,0 +1,76 @@ +internalAddGeneratedFile(hex2bin( + "0abe0b0a41676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f63616d706169676e5f637269746572696f6e5f736572" . + "766963652e70726f746f1220676f6f676c652e6164732e676f6f676c6561" . + "64732e76302e73657276696365731a1c676f6f676c652f6170692f616e6e" . + "6f746174696f6e732e70726f746f1a20676f6f676c652f70726f746f6275" . + "662f6669656c645f6d61736b2e70726f746f22340a1b47657443616d7061" . + "69676e437269746572696f6e5265717565737412150a0d7265736f757263" . + "655f6e616d651801200128092286010a1d4d757461746543616d70616967" . + "6e43726974657269615265717565737412130a0b637573746f6d65725f69" . + "6418012001280912500a0a6f7065726174696f6e7318022003280b323c2e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e736572766963" . + "65732e43616d706169676e437269746572696f6e4f7065726174696f6e22" . + "fc010a1a43616d706169676e437269746572696f6e4f7065726174696f6e" . + "122f0a0b7570646174655f6d61736b18042001280b321a2e676f6f676c65" . + "2e70726f746f6275662e4669656c644d61736b12460a0663726561746518" . + "012001280b32342e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e7265736f75726365732e43616d706169676e437269746572696f6e48" . + "0012460a0675706461746518022001280b32342e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e7265736f75726365732e43616d706169" . + "676e437269746572696f6e480012100a0672656d6f766518032001280948" . + "00420b0a096f7065726174696f6e22720a1e4d757461746543616d706169" . + "676e4372697465726961526573706f6e736512500a07726573756c747318" . + "022003280b323f2e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e73657276696365732e4d757461746543616d706169676e4372697465" . + "72696f6e526573756c7422360a1d4d757461746543616d706169676e4372" . + "69746572696f6e526573756c7412150a0d7265736f757263655f6e616d65" . + "18012001280932c4030a1843616d706169676e437269746572696f6e5365" . + "727669636512c7010a1447657443616d706169676e437269746572696f6e" . + "123d2e676f6f676c652e6164732e676f6f676c656164732e76302e736572" . + "76696365732e47657443616d706169676e437269746572696f6e52657175" . + "6573741a342e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "7265736f75726365732e43616d706169676e437269746572696f6e223a82" . + "d3e493023412322f76302f7b7265736f757263655f6e616d653d63757374" . + "6f6d6572732f2a2f63616d706169676e43726974657269612f2a7d12dd01" . + "0a164d757461746543616d706169676e4372697465726961123f2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e73657276696365732e" . + "4d757461746543616d706169676e4372697465726961526571756573741a" . + "402e676f6f676c652e6164732e676f6f676c656164732e76302e73657276" . + "696365732e4d757461746543616d706169676e4372697465726961526573" . + "706f6e7365224082d3e493023a22352f76302f637573746f6d6572732f7b" . + "637573746f6d65725f69643d2a7d2f63616d706169676e43726974657269" . + "613a6d75746174653a012a42dd010a24636f6d2e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e7365727669636573421d43616d706169" . + "676e437269746572696f6e5365727669636550726f746f50015a48676f6f" . + "676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c65" . + "617069732f6164732f676f6f676c656164732f76302f7365727669636573" . + "3b7365727669636573a20203474141aa0220476f6f676c652e4164732e47" . + "6f6f676c654164732e56302e5365727669636573ca0220476f6f676c655c" . + "4164735c476f6f676c654164735c56305c5365727669636573620670726f" . + "746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/CampaignService.php b/metadata/Google/Ads/GoogleAds/V0/Services/CampaignService.php new file mode 100644 index 000000000..8647f350e --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/CampaignService.php @@ -0,0 +1,70 @@ +internalAddGeneratedFile(hex2bin( + "0a960a0a37676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f63616d706169676e5f736572766963652e70726f746f" . + "1220676f6f676c652e6164732e676f6f676c656164732e76302e73657276" . + "696365731a1c676f6f676c652f6170692f616e6e6f746174696f6e732e70" . + "726f746f1a20676f6f676c652f70726f746f6275662f6669656c645f6d61" . + "736b2e70726f746f222b0a1247657443616d706169676e52657175657374" . + "12150a0d7265736f757263655f6e616d6518012001280922760a164d7574" . + "61746543616d706169676e735265717565737412130a0b637573746f6d65" . + "725f696418012001280912470a0a6f7065726174696f6e7318022003280b" . + "32332e676f6f676c652e6164732e676f6f676c656164732e76302e736572" . + "76696365732e43616d706169676e4f7065726174696f6e22e1010a114361" . + "6d706169676e4f7065726174696f6e122f0a0b7570646174655f6d61736b" . + "18042001280b321a2e676f6f676c652e70726f746f6275662e4669656c64" . + "4d61736b123d0a0663726561746518012001280b322b2e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e7265736f75726365732e43616d" . + "706169676e4800123d0a0675706461746518022001280b322b2e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e7265736f75726365732e" . + "43616d706169676e480012100a0672656d6f76651803200128094800420b" . + "0a096f7065726174696f6e22620a174d757461746543616d706169676e73" . + "526573706f6e736512470a07726573756c747318022003280b32362e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e7365727669636573" . + "2e4d757461746543616d706169676e526573756c74222d0a144d75746174" . + "6543616d706169676e526573756c7412150a0d7265736f757263655f6e61" . + "6d6518012001280932fd020a0f43616d706169676e5365727669636512a5" . + "010a0b47657443616d706169676e12342e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e73657276696365732e47657443616d70616967" . + "6e526571756573741a2b2e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e7265736f75726365732e43616d706169676e223382d3e49302" . + "2d122b2f76302f7b7265736f757263655f6e616d653d637573746f6d6572" . + "732f2a2f63616d706169676e732f2a7d12c1010a0f4d757461746543616d" . + "706169676e7312382e676f6f676c652e6164732e676f6f676c656164732e" . + "76302e73657276696365732e4d757461746543616d706169676e73526571" . + "756573741a392e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e73657276696365732e4d757461746543616d706169676e73526573706f" . + "6e7365223982d3e4930233222e2f76302f637573746f6d6572732f7b6375" . + "73746f6d65725f69643d2a7d2f63616d706169676e733a6d75746174653a" . + "012a42d4010a24636f6d2e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e7365727669636573421443616d706169676e53657276696365" . + "50726f746f50015a48676f6f676c652e676f6c616e672e6f72672f67656e" . + "70726f746f2f676f6f676c65617069732f6164732f676f6f676c65616473" . + "2f76302f73657276696365733b7365727669636573a20203474141aa0220" . + "476f6f676c652e4164732e476f6f676c654164732e56302e536572766963" . + "6573ca0220476f6f676c655c4164735c476f6f676c654164735c56305c53" . + "65727669636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/CustomerService.php b/metadata/Google/Ads/GoogleAds/V0/Services/CustomerService.php new file mode 100644 index 000000000..2069bfe48 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/CustomerService.php @@ -0,0 +1,44 @@ +internalAddGeneratedFile(hex2bin( + "0ab5040a37676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f637573746f6d65725f736572766963652e70726f746f" . + "1220676f6f676c652e6164732e676f6f676c656164732e76302e73657276" . + "696365731a1c676f6f676c652f6170692f616e6e6f746174696f6e732e70" . + "726f746f222b0a12476574437573746f6d65725265717565737412150a0d" . + "7265736f757263655f6e616d6518012001280932ad010a0f437573746f6d" . + "6572536572766963651299010a0b476574437573746f6d657212342e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e7365727669636573" . + "2e476574437573746f6d6572526571756573741a2b2e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e7265736f75726365732e43757374" . + "6f6d6572222782d3e4930221121f2f76302f7b7265736f757263655f6e61" . + "6d653d637573746f6d6572732f2a7d42d4010a24636f6d2e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e736572766963657342144375" . + "73746f6d65725365727669636550726f746f50015a48676f6f676c652e67" . + "6f6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f" . + "6164732f676f6f676c656164732f76302f73657276696365733b73657276" . + "69636573a20203474141aa0220476f6f676c652e4164732e476f6f676c65" . + "4164732e56302e5365727669636573ca0220476f6f676c655c4164735c47" . + "6f6f676c654164735c56305c5365727669636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/GeoTargetConstantService.php b/metadata/Google/Ads/GoogleAds/V0/Services/GeoTargetConstantService.php new file mode 100644 index 000000000..ae69d1428 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/GeoTargetConstantService.php @@ -0,0 +1,47 @@ +internalAddGeneratedFile(hex2bin( + "0aff040a42676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f67656f5f7461726765745f636f6e7374616e745f7365" . + "72766963652e70726f746f1220676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e73657276696365731a1c676f6f676c652f6170692f616e" . + "6e6f746174696f6e732e70726f746f22340a1b47657447656f5461726765" . + "74436f6e7374616e745265717565737412150a0d7265736f757263655f6e" . + "616d6518012001280932da010a1847656f546172676574436f6e7374616e" . + "745365727669636512bd010a1447657447656f546172676574436f6e7374" . + "616e74123d2e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "73657276696365732e47657447656f546172676574436f6e7374616e7452" . + "6571756573741a342e676f6f676c652e6164732e676f6f676c656164732e" . + "76302e7265736f75726365732e47656f546172676574436f6e7374616e74" . + "223082d3e493022a12282f76302f7b7265736f757263655f6e616d653d67" . + "656f546172676574436f6e7374616e74732f2a7d42dd010a24636f6d2e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e73657276696365" . + "73421d47656f546172676574436f6e7374616e745365727669636550726f" . + "746f50015a48676f6f676c652e676f6c616e672e6f72672f67656e70726f" . + "746f2f676f6f676c65617069732f6164732f676f6f676c656164732f7630" . + "2f73657276696365733b7365727669636573a20203474141aa0220476f6f" . + "676c652e4164732e476f6f676c654164732e56302e5365727669636573ca" . + "0220476f6f676c655c4164735c476f6f676c654164735c56305c53657276" . + "69636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/GoogleAdsFieldService.php b/metadata/Google/Ads/GoogleAds/V0/Services/GoogleAdsFieldService.php new file mode 100644 index 000000000..3e4d724cf --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/GoogleAdsFieldService.php @@ -0,0 +1,61 @@ +internalAddGeneratedFile(hex2bin( + "0a9b080a3f676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f676f6f676c655f6164735f6669656c645f7365727669" . + "63652e70726f746f1220676f6f676c652e6164732e676f6f676c65616473" . + "2e76302e73657276696365731a1c676f6f676c652f6170692f616e6e6f74" . + "6174696f6e732e70726f746f22310a18476574476f6f676c654164734669" . + "656c645265717565737412150a0d7265736f757263655f6e616d65180120" . + "01280922540a1c536561726368476f6f676c654164734669656c64735265" . + "7175657374120d0a05717565727918012001280912120a0a706167655f74" . + "6f6b656e18022001280912110a09706167655f73697a6518032001280522" . + "99010a1d536561726368476f6f676c654164734669656c6473526573706f" . + "6e736512420a07726573756c747318012003280b32312e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e7265736f75726365732e476f6f" . + "676c654164734669656c6412170a0f6e6578745f706167655f746f6b656e" . + "180220012809121b0a13746f74616c5f726573756c74735f636f756e7418" . + "0320012803328d030a15476f6f676c654164734669656c64536572766963" . + "6512b1010a11476574476f6f676c654164734669656c64123a2e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e73657276696365732e47" . + "6574476f6f676c654164734669656c64526571756573741a312e676f6f67" . + "6c652e6164732e676f6f676c656164732e76302e7265736f75726365732e" . + "476f6f676c654164734669656c64222d82d3e493022712252f76302f7b72" . + "65736f757263655f6e616d653d676f6f676c654164734669656c64732f2a" . + "7d12bf010a15536561726368476f6f676c654164734669656c6473123e2e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e736572766963" . + "65732e536561726368476f6f676c654164734669656c6473526571756573" . + "741a3f2e676f6f676c652e6164732e676f6f676c656164732e76302e7365" . + "7276696365732e536561726368476f6f676c654164734669656c64735265" . + "73706f6e7365222582d3e493021f221a2f76302f676f6f676c6541647346" . + "69656c64733a7365617263683a012a42da010a24636f6d2e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e7365727669636573421a476f" . + "6f676c654164734669656c645365727669636550726f746f50015a48676f" . + "6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f676c" . + "65617069732f6164732f676f6f676c656164732f76302f73657276696365" . + "733b7365727669636573a20203474141aa0220476f6f676c652e4164732e" . + "476f6f676c654164732e56302e5365727669636573ca0220476f6f676c65" . + "5c4164735c476f6f676c654164735c56305c536572766963657362067072" . + "6f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/GoogleAdsService.php b/metadata/Google/Ads/GoogleAds/V0/Services/GoogleAdsService.php new file mode 100644 index 000000000..455f2569f --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/GoogleAdsService.php @@ -0,0 +1,153 @@ +internalAddGeneratedFile(hex2bin( + "0ae0190a39676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f676f6f676c655f6164735f736572766963652e70726f" . + "746f1220676f6f676c652e6164732e676f6f676c656164732e76302e7365" . + "7276696365731a33676f6f676c652f6164732f676f6f676c656164732f76" . + "302f656e756d732f61645f6e6574776f726b5f747970652e70726f746f1a" . + "2f676f6f676c652f6164732f676f6f676c656164732f76302f656e756d73" . + "2f6461795f6f665f7765656b2e70726f746f1a2a676f6f676c652f616473" . + "2f676f6f676c656164732f76302f656e756d732f6465766963652e70726f" . + "746f1a28676f6f676c652f6164732f676f6f676c656164732f76302f656e" . + "756d732f736c6f742e70726f746f1a30676f6f676c652f6164732f676f6f" . + "676c656164732f76302f7265736f75726365732f61645f67726f75702e70" . + "726f746f1a33676f6f676c652f6164732f676f6f676c656164732f76302f" . + "7265736f75726365732f61645f67726f75705f61642e70726f746f1a3d67" . + "6f6f676c652f6164732f676f6f676c656164732f76302f7265736f757263" . + "65732f61645f67726f75705f6269645f6d6f6469666965722e70726f746f" . + "1a3a676f6f676c652f6164732f676f6f676c656164732f76302f7265736f" . + "75726365732f61645f67726f75705f637269746572696f6e2e70726f746f" . + "1a38676f6f676c652f6164732f676f6f676c656164732f76302f7265736f" . + "75726365732f62696464696e675f73747261746567792e70726f746f1a30" . + "676f6f676c652f6164732f676f6f676c656164732f76302f7265736f7572" . + "6365732f63616d706169676e2e70726f746f1a37676f6f676c652f616473" . + "2f676f6f676c656164732f76302f7265736f75726365732f63616d706169" . + "676e5f6275646765742e70726f746f1a3a676f6f676c652f6164732f676f" . + "6f676c656164732f76302f7265736f75726365732f63616d706169676e5f" . + "637269746572696f6e2e70726f746f1a30676f6f676c652f6164732f676f" . + "6f676c656164732f76302f7265736f75726365732f637573746f6d65722e" . + "70726f746f1a3b676f6f676c652f6164732f676f6f676c656164732f7630" . + "2f7265736f75726365732f67656f5f7461726765745f636f6e7374616e74" . + "2e70726f746f1a34676f6f676c652f6164732f676f6f676c656164732f76" . + "302f7265736f75726365732f6b6579776f72645f766965772e70726f746f" . + "1a36676f6f676c652f6164732f676f6f676c656164732f76302f7265736f" . + "75726365732f7265636f6d6d656e646174696f6e2e70726f746f1a1c676f" . + "6f676c652f6170692f616e6e6f746174696f6e732e70726f746f1a20676f" . + "6f676c652f70726f746f6275662f6669656c645f6d61736b2e70726f746f" . + "1a1e676f6f676c652f70726f746f6275662f77726170706572732e70726f" . + "746f22630a16536561726368476f6f676c65416473526571756573741213" . + "0a0b637573746f6d65725f6964180120012809120d0a0571756572791802" . + "2001280912120a0a706167655f746f6b656e18032001280912110a097061" . + "67655f73697a6518042001280522c0010a17536561726368476f6f676c65" . + "416473526573706f6e7365123f0a07726573756c747318012003280b322e" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e7365727669" . + "6365732e476f6f676c65416473526f7712170a0f6e6578745f706167655f" . + "746f6b656e180220012809121b0a13746f74616c5f726573756c74735f63" . + "6f756e74180320012803122e0a0a6669656c645f6d61736b18052001280b" . + "321a2e676f6f676c652e70726f746f6275662e4669656c644d61736b22ec" . + "0b0a0c476f6f676c65416473526f77123c0a0861645f67726f7570180320" . + "01280b322a2e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "7265736f75726365732e416447726f757012410a0b61645f67726f75705f" . + "616418102001280b322c2e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e7265736f75726365732e416447726f7570416412540a156164" . + "5f67726f75705f6269645f6d6f64696669657218182001280b32352e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e7265736f75726365" . + "732e416447726f75704269644d6f646966696572124f0a1261645f67726f" . + "75705f637269746572696f6e18112001280b32332e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e7265736f75726365732e416447726f" . + "7570437269746572696f6e124c0a1062696464696e675f73747261746567" . + "7918122001280b32322e676f6f676c652e6164732e676f6f676c65616473" . + "2e76302e7265736f75726365732e42696464696e67537472617465677912" . + "4a0a0f63616d706169676e5f62756467657418132001280b32312e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e7265736f7572636573" . + "2e43616d706169676e427564676574123d0a0863616d706169676e180220" . + "01280b322b2e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "7265736f75726365732e43616d706169676e12500a1263616d706169676e" . + "5f637269746572696f6e18142001280b32342e676f6f676c652e6164732e" . + "676f6f676c656164732e76302e7265736f75726365732e43616d70616967" . + "6e437269746572696f6e123d0a08637573746f6d657218012001280b322b" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e7265736f75" . + "726365732e437573746f6d657212510a1367656f5f7461726765745f636f" . + "6e7374616e7418172001280b32342e676f6f676c652e6164732e676f6f67" . + "6c656164732e76302e7265736f75726365732e47656f546172676574436f" . + "6e7374616e7412440a0c6b6579776f72645f7669657718152001280b322e" . + "2e676f6f676c652e6164732e676f6f676c656164732e76302e7265736f75" . + "726365732e4b6579776f72645669657712490a0e7265636f6d6d656e6461" . + "74696f6e18162001280b32312e676f6f676c652e6164732e676f6f676c65" . + "6164732e76302e7265736f75726365732e5265636f6d6d656e646174696f" . + "6e12380a076d65747269637318042001280b32272e676f6f676c652e6164" . + "732e676f6f676c656164732e76302e636f6d6d6f6e2e4d65747269637312" . + "570a0f61645f6e6574776f726b5f7479706518052001280e323e2e676f6f" . + "676c652e6164732e676f6f676c656164732e76302e656e756d732e41644e" . + "6574776f726b54797065456e756d2e41644e6574776f726b54797065122a" . + "0a046461746518062001280b321c2e676f6f676c652e70726f746f627566" . + "2e537472696e6756616c7565124b0a0b6461795f6f665f7765656b180720" . + "01280e32362e676f6f676c652e6164732e676f6f676c656164732e76302e" . + "656e756d732e4461794f665765656b456e756d2e4461794f665765656b12" . + "400a0664657669636518082001280e32302e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e656e756d732e446576696365456e756d2e44" . + "657669636512290a04686f757218092001280b321b2e676f6f676c652e70" . + "726f746f6275662e496e74333256616c7565122b0a056d6f6e7468180a20" . + "01280b321c2e676f6f676c652e70726f746f6275662e537472696e675661" . + "6c7565122d0a0771756172746572180c2001280b321c2e676f6f676c652e" . + "70726f746f6275662e537472696e6756616c7565123a0a04736c6f74180d" . + "2001280e322c2e676f6f676c652e6164732e676f6f676c656164732e7630" . + "2e656e756d732e536c6f74456e756d2e536c6f74122a0a047765656b180e" . + "2001280b321c2e676f6f676c652e70726f746f6275662e537472696e6756" . + "616c756512290a0479656172180f2001280b321b2e676f6f676c652e7072" . + "6f746f6275662e496e74333256616c756532cd010a10476f6f676c654164" . + "735365727669636512b8010a0653656172636812382e676f6f676c652e61" . + "64732e676f6f676c656164732e76302e73657276696365732e5365617263" . + "68476f6f676c65416473526571756573741a392e676f6f676c652e616473" . + "2e676f6f676c656164732e76302e73657276696365732e53656172636847" . + "6f6f676c65416473526573706f6e7365223982d3e4930233222e2f76302f" . + "637573746f6d6572732f7b637573746f6d65725f69643d2a7d2f676f6f67" . + "6c654164733a7365617263683a012a42d5010a24636f6d2e676f6f676c65" . + "2e6164732e676f6f676c656164732e76302e73657276696365734215476f" . + "6f676c654164735365727669636550726f746f50015a48676f6f676c652e" . + "676f6c616e672e6f72672f67656e70726f746f2f676f6f676c6561706973" . + "2f6164732f676f6f676c656164732f76302f73657276696365733b736572" . + "7669636573a20203474141aa0220476f6f676c652e4164732e476f6f676c" . + "654164732e56302e5365727669636573ca0220476f6f676c655c4164735c" . + "476f6f676c654164735c56305c5365727669636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/KeywordViewService.php b/metadata/Google/Ads/GoogleAds/V0/Services/KeywordViewService.php new file mode 100644 index 000000000..d00387abc --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/KeywordViewService.php @@ -0,0 +1,46 @@ +internalAddGeneratedFile(hex2bin( + "0ada040a3b676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f6b6579776f72645f766965775f736572766963652e70" . + "726f746f1220676f6f676c652e6164732e676f6f676c656164732e76302e" . + "73657276696365731a1c676f6f676c652f6170692f616e6e6f746174696f" . + "6e732e70726f746f222e0a154765744b6579776f72645669657752657175" . + "65737412150a0d7265736f757263655f6e616d6518012001280932c8010a" . + "124b6579776f7264566965775365727669636512b1010a0e4765744b6579" . + "776f72645669657712372e676f6f676c652e6164732e676f6f676c656164" . + "732e76302e73657276696365732e4765744b6579776f7264566965775265" . + "71756573741a2e2e676f6f676c652e6164732e676f6f676c656164732e76" . + "302e7265736f75726365732e4b6579776f726456696577223682d3e49302" . + "30122e2f76302f7b7265736f757263655f6e616d653d637573746f6d6572" . + "732f2a2f6b6579776f726456696577732f2a7d42d7010a24636f6d2e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e7365727669636573" . + "42174b6579776f7264566965775365727669636550726f746f50015a4867" . + "6f6f676c652e676f6c616e672e6f72672f67656e70726f746f2f676f6f67" . + "6c65617069732f6164732f676f6f676c656164732f76302f736572766963" . + "65733b7365727669636573a20203474141aa0220476f6f676c652e416473" . + "2e476f6f676c654164732e56302e5365727669636573ca0220476f6f676c" . + "655c4164735c476f6f676c654164735c56305c5365727669636573620670" . + "726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/metadata/Google/Ads/GoogleAds/V0/Services/RecommendationService.php b/metadata/Google/Ads/GoogleAds/V0/Services/RecommendationService.php new file mode 100644 index 000000000..cc2958f00 --- /dev/null +++ b/metadata/Google/Ads/GoogleAds/V0/Services/RecommendationService.php @@ -0,0 +1,109 @@ +internalAddGeneratedFile(hex2bin( + "0ada120a3d676f6f676c652f6164732f676f6f676c656164732f76302f73" . + "657276696365732f7265636f6d6d656e646174696f6e5f73657276696365" . + "2e70726f746f1220676f6f676c652e6164732e676f6f676c656164732e76" . + "302e73657276696365731a36676f6f676c652f6164732f676f6f676c6561" . + "64732f76302f656e756d732f6b6579776f72645f6d617463685f74797065" . + "2e70726f746f1a36676f6f676c652f6164732f676f6f676c656164732f76" . + "302f7265736f75726365732f7265636f6d6d656e646174696f6e2e70726f" . + "746f1a1c676f6f676c652f6170692f616e6e6f746174696f6e732e70726f" . + "746f1a1e676f6f676c652f70726f746f6275662f77726170706572732e70" . + "726f746f1a17676f6f676c652f7270632f7374617475732e70726f746f22" . + "310a184765745265636f6d6d656e646174696f6e5265717565737412150a" . + "0d7265736f757263655f6e616d651801200128092285010a1a4170706c79" . + "5265636f6d6d656e646174696f6e5265717565737412130a0b637573746f" . + "6d65725f696418012001280912520a0a6f7065726174696f6e7318022003" . + "280b323e2e676f6f676c652e6164732e676f6f676c656164732e76302e73" . + "657276696365732e4170706c795265636f6d6d656e646174696f6e4f7065" . + "726174696f6e228d080a1c4170706c795265636f6d6d656e646174696f6e" . + "4f7065726174696f6e12150a0d7265736f757263655f6e616d6518012001" . + "280912720a0f63616d706169676e5f62756467657418022001280b32572e" . + "676f6f676c652e6164732e676f6f676c656164732e76302e736572766963" . + "65732e4170706c795265636f6d6d656e646174696f6e4f7065726174696f" . + "6e2e43616d706169676e427564676574506172616d657465727348001262" . + "0a07746578745f616418032001280b324f2e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e73657276696365732e4170706c795265636f" . + "6d6d656e646174696f6e4f7065726174696f6e2e54657874416450617261" . + "6d6574657273480012630a076b6579776f726418042001280b32502e676f" . + "6f676c652e6164732e676f6f676c656164732e76302e7365727669636573" . + "2e4170706c795265636f6d6d656e646174696f6e4f7065726174696f6e2e" . + "4b6579776f7264506172616d6574657273480012740a117461726765745f" . + "6370615f6f70745f696e18052001280b32572e676f6f676c652e6164732e" . + "676f6f676c656164732e76302e73657276696365732e4170706c79526563" . + "6f6d6d656e646174696f6e4f7065726174696f6e2e546172676574437061" . + "4f7074496e506172616d657465727348001a590a1843616d706169676e42" . + "7564676574506172616d6574657273123d0a186e65775f6275646765745f" . + "616d6f756e745f6d6963726f7318012001280b321b2e676f6f676c652e70" . + "726f746f6275662e496e74363456616c75651a420a105465787441645061" . + "72616d6574657273122e0a02616418012001280b32222e676f6f676c652e" . + "6164732e676f6f676c656164732e76302e636f6d6d6f6e2e41641ad2010a" . + "114b6579776f7264506172616d6574657273122e0a0861645f67726f7570" . + "18012001280b321c2e676f6f676c652e70726f746f6275662e537472696e" . + "6756616c756512580a0a6d617463685f7479706518022001280e32442e67" . + "6f6f676c652e6164732e676f6f676c656164732e76302e656e756d732e4b" . + "6579776f72644d6174636854797065456e756d2e4b6579776f72644d6174" . + "63685479706512330a0e6370635f6269645f6d6963726f7318032001280b" . + "321b2e676f6f676c652e70726f746f6275662e496e74363456616c75651a" . + "9a010a185461726765744370614f7074496e506172616d65746572731236" . + "0a117461726765745f6370615f6d6963726f7318012001280b321b2e676f" . + "6f676c652e70726f746f6275662e496e74363456616c756512460a216e65" . + "775f63616d706169676e5f6275646765745f616d6f756e745f6d6963726f" . + "7318022001280b321b2e676f6f676c652e70726f746f6275662e496e7436" . + "3456616c756542120a106170706c795f706172616d6574657273226b0a1b" . + "4170706c795265636f6d6d656e646174696f6e526573706f6e7365124c0a" . + "07726573756c747318012003280b323b2e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e73657276696365732e4170706c795265636f6d" . + "6d656e646174696f6e526573756c7422640a194170706c795265636f6d6d" . + "656e646174696f6e526573756c7412170a0d7265736f757263655f6e616d" . + "65180120012809480012240a0673746174757318022001280b32122e676f" . + "6f676c652e7270632e537461747573480042080a06726573756c7432ac03" . + "0a155265636f6d6d656e646174696f6e5365727669636512bd010a114765" . + "745265636f6d6d656e646174696f6e123a2e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e73657276696365732e4765745265636f6d6d" . + "656e646174696f6e526571756573741a312e676f6f676c652e6164732e67" . + "6f6f676c656164732e76302e7265736f75726365732e5265636f6d6d656e" . + "646174696f6e223982d3e493023312312f76302f7b7265736f757263655f" . + "6e616d653d637573746f6d6572732f2a2f7265636f6d6d656e646174696f" . + "6e732f2a7d12d2010a134170706c795265636f6d6d656e646174696f6e12" . + "3c2e676f6f676c652e6164732e676f6f676c656164732e76302e73657276" . + "696365732e4170706c795265636f6d6d656e646174696f6e526571756573" . + "741a3d2e676f6f676c652e6164732e676f6f676c656164732e76302e7365" . + "7276696365732e4170706c795265636f6d6d656e646174696f6e52657370" . + "6f6e7365223e82d3e493023822332f76302f637573746f6d6572732f7b63" . + "7573746f6d65725f69643d2a7d2f7265636f6d6d656e646174696f6e733a" . + "6170706c793a012a42da010a24636f6d2e676f6f676c652e6164732e676f" . + "6f676c656164732e76302e7365727669636573421a5265636f6d6d656e64" . + "6174696f6e5365727669636550726f746f50015a48676f6f676c652e676f" . + "6c616e672e6f72672f67656e70726f746f2f676f6f676c65617069732f61" . + "64732f676f6f676c656164732f76302f73657276696365733b7365727669" . + "636573a20203474141aa0220476f6f676c652e4164732e476f6f676c6541" . + "64732e56302e5365727669636573ca0220476f6f676c655c4164735c476f" . + "6f676c654164735c56305c5365727669636573620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/phpcs_ruleset.xml b/phpcs_ruleset.xml new file mode 100644 index 000000000..8ba4a2fed --- /dev/null +++ b/phpcs_ruleset.xml @@ -0,0 +1,12 @@ + + + + metadata + src/Google/Ads/GoogleAds/V[0-9]+ + src/Google/Ads/GoogleAds/Util/Testing/Google + src/Google/Ads/GoogleAds/Util/Testing/metadata + tests/Google/Ads/GoogleAds/V[0-9]+ + src + tests + examples + diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 000000000..dfa7d9c45 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,11 @@ + + + + + tests/Google/Ads/GoogleAds + + + + + + \ No newline at end of file diff --git a/src/Google/Ads/GoogleAds/Lib/Configuration.php b/src/Google/Ads/GoogleAds/Lib/Configuration.php new file mode 100644 index 000000000..e5819d86c --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/Configuration.php @@ -0,0 +1,66 @@ +config = $iniFileContents; + } + + /** + * Gets the value for the specified setting name. + * + * @param string $name the setting name + * @param string $section optional, the name of the section containing the + * setting + * @return string|null the value of the setting, or null if it doesn't exist + */ + public function getConfiguration($name, $section = null) + { + $configValue = null; + + if ($section === null) { + if (array_key_exists($name, $this->config)) { + $configValue = $this->config[$name]; + } + } else { + if (array_key_exists($section, $this->config)) { + $sectionSettings = $this->config[$section]; + if (array_key_exists($name, $sectionSettings)) { + $configValue = $sectionSettings[$name]; + } + } + } + + return $configValue; + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/ConfigurationLoader.php b/src/Google/Ads/GoogleAds/Lib/ConfigurationLoader.php new file mode 100644 index 000000000..e932588c4 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/ConfigurationLoader.php @@ -0,0 +1,98 @@ +environmentalVariables = is_null($environmentalVariables) + ? new EnvironmentalVariables() : $environmentalVariables; + } + + /** + * Creates a configuration from a file path to an *.ini file. If the file isn't + * found in the specified path, we will try to find the file in the user's + * home directory. + * + * E.g., If you specified the path "/config/googleads/google_ads_php.ini" and it + * doesn't exist, we will try to find "google_ads_php.ini" in your home directory. + * + * @param string $configIniFilePath the file path to the *.ini file + * @throws InvalidArgumentException if the config file could not be found + * @return Configuration the created configuration + */ + public function fromFile($configIniFilePath) + { + if (!file_exists($configIniFilePath)) { + try { + $home = $this->environmentalVariables->getHome(); + $homeConfigIniFilePath = + $home . DIRECTORY_SEPARATOR . pathinfo($configIniFilePath, PATHINFO_BASENAME); + if (file_exists($homeConfigIniFilePath)) { + $configIniFilePath = $homeConfigIniFilePath; + } else { + throw new InvalidArgumentException( + sprintf( + "Config file not found as specified: '%s' or in the home directory: '%s'.", + $configIniFilePath, + $homeConfigIniFilePath + ) + ); + } + } catch (UnexpectedValueException $e) { + throw new InvalidArgumentException( + sprintf( + "Config file not found as specified: '%s'. Home " + . "directory could not be located so it was not searched.", + $configIniFilePath + ) + ); + } + } + + return new Configuration(parse_ini_file($configIniFilePath, true)); + } + + /** + * Creates a configuration from an *.ini string. + * + * @param string $iniString + * @return Configuration the created configuration + */ + public function fromString($iniString) + { + return new Configuration(parse_ini_string($iniString, true)); + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/ConfigurationTrait.php b/src/Google/Ads/GoogleAds/Lib/ConfigurationTrait.php new file mode 100644 index 000000000..df9c7b218 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/ConfigurationTrait.php @@ -0,0 +1,62 @@ +developerToken; + } + + /** + * Gets the endpoint. + * + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Gets the OAuth2 credential. + * + * @return FetchAuthTokenInterface + */ + public function getOAuth2Credential() + { + return $this->oAuth2Credential; + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/GoogleAdsBuilder.php b/src/Google/Ads/GoogleAds/Lib/GoogleAdsBuilder.php new file mode 100644 index 000000000..61499dcda --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/GoogleAdsBuilder.php @@ -0,0 +1,63 @@ +developerToken = $builder->getDeveloperToken(); + $this->endpoint = $builder->getEndpoint(); + $this->oAuth2Credential = $builder->getOAuth2Credential(); + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/GoogleAdsClientBuilder.php b/src/Google/Ads/GoogleAds/Lib/GoogleAdsClientBuilder.php new file mode 100644 index 000000000..44b066bd1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/GoogleAdsClientBuilder.php @@ -0,0 +1,185 @@ +configurationLoader = new ConfigurationLoader(); + } + + /** + * Reads configuration settings from the specified file path. The file path + * is optional, and if omitted, it will look for the default configuration + * filename in the home directory of the user running PHP. + * + * @param string $path the file path + * @return self this builder populated from the configuration + * @throws InvalidArgumentException if the configuration file could not be + * found + */ + public function fromFile($path = null) + { + if ($path === null) { + $path = self::DEFAULT_CONFIGURATION_FILENAME; + } + return $this->from($this->configurationLoader->fromFile($path)); + } + + /** + * Populates this builder from the specified configuration object. + * + * @param Configuration $configuration the configuration + * @return self this builder populated from the configuration + */ + public function from(Configuration $configuration) + { + $this->developerToken = + $configuration->getConfiguration('developerToken', 'GOOGLE_ADS'); + $this->endpoint = + $configuration->getConfiguration('endpoint', 'GOOGLE_ADS'); + + return $this; + } + + /** + * Includes a developer token. This is required. + * + * @param string $developerToken + * @return self this builder + */ + public function withDeveloperToken($developerToken) + { + $this->developerToken = $developerToken; + return $this; + } + + /** + * Includes the Google Ads API server's base endpoint. This is optional. + * + * @param string|null $endpoint + * @return self this builder + */ + public function withEndpoint($endpoint) + { + $this->endpoint = $endpoint; + return $this; + } + + /** + * Includes the OAuth2 credential to be used for authentication. This is + * required. + * + * @param FetchAuthTokenInterface $oAuth2Credential + * @return self this builder + */ + public function withOAuth2Credential(FetchAuthTokenInterface $oAuth2Credential) + { + $this->oAuth2Credential = $oAuth2Credential; + return $this; + } + + /** + * @see GoogleAdsBuilder::build() + * + * @return GoogleAdsClient the created Google Ads client + */ + public function build() + { + $this->defaultOptionals(); + $this->validate(); + + return new GoogleAdsClient($this); + } + + /** + * @see GoogleAdsBuilder::defaultOptionals() + */ + public function defaultOptionals() + { + // No default optionals for this class. + } + + /** + * @see GoogleAdsBuilder::validate() + */ + public function validate() + { + if (is_null($this->developerToken) || empty(trim($this->developerToken))) { + throw new InvalidArgumentException('A developer token must be set.'); + } + + // Use parse_url instead of filter_var to do less restrict validation. + // This is because we need to allow endpoint in the form of "googleads.googleapis.com", + // but filter_var doesn't allow that. + if (!empty($this->endpoint) && parse_url($this->endpoint) === false) { + throw new InvalidArgumentException('Endpoint must be a valid URL.'); + } + + if ($this->oAuth2Credential === null) { + throw new InvalidArgumentException( + 'OAuth2 authentication credentials must not be null.' + ); + } + } + + /** + * Gets the developer token. + * + * @return string + */ + public function getDeveloperToken() + { + return $this->developerToken; + } + + /** + * Gets the endpoint. + * + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Gets the OAuth2 credential. + * + * @return FetchAuthTokenInterface + */ + public function getOAuth2Credential() + { + return $this->oAuth2Credential; + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/GoogleAdsException.php b/src/Google/Ads/GoogleAds/Lib/GoogleAdsException.php new file mode 100644 index 000000000..c26cdc2e3 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/GoogleAdsException.php @@ -0,0 +1,74 @@ +getMessage(), + $original->getCode(), + $original->getStatus(), + $optionalArgs + ); + $this->googleAdsFailure = $googleAdsFailure; + } + + /** + * @return GoogleAdsFailure the stored Google Ads failure + */ + public function getGoogleAdsFailure() + { + return $this->googleAdsFailure; + } + + /** + * Gets the request ID returned in the RPC trailers. + * Returns null if no request ID has been received. + * + * @return string|null the request ID + */ + public function getRequestId() + { + return $this->getFirstHeaderValue( + self::$REQUEST_ID_HEADER_KEY, + $this->getMetadata() ?: [] + ); + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/GoogleAdsExceptionMiddleware.php b/src/Google/Ads/GoogleAds/Lib/GoogleAdsExceptionMiddleware.php new file mode 100644 index 000000000..9307f15bf --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/GoogleAdsExceptionMiddleware.php @@ -0,0 +1,111 @@ +nextHandler = $nextHandler; + } + + /** + * Throws a `GoogleAdsException` when calls to the Google Ads API server + * fail. + * + * @param Call $call the current request + * @param array $options the optional parameters + * @return \GuzzleHttp\Promise\PromiseInterface the `Promise` interface + * customized to throw `GoogleAdsException` + */ + public function __invoke(Call $call, array $options) + { + $next = $this->nextHandler; + /** @var Promise $promise */ + $promise = $next( + $call, + $options + ); + + return $promise->then( + null, + function ($exception) { + if ($exception instanceof ApiException) { + $metadata = $exception->getMetadata(); + + $binaryHeader = $this->getFirstHeaderValue( + self::$GOOGLE_ADS_FAILURE_BINARY_KEY, + $metadata + ); + if (!is_null($binaryHeader)) { + $googleAdsFailure = new GoogleAdsFailure(); + $googleAdsFailure->mergeFromString($binaryHeader); + throw $this->createGoogleAdsException( + $exception, + $googleAdsFailure + ); + } + + $jsonHeader = $this->getFirstHeaderValue( + self::$GOOGLE_ADS_FAILURE_JSON_KEY, + $metadata + ); + if (!is_null($jsonHeader)) { + $googleAdsFailure = new GoogleAdsFailure(); + $googleAdsFailure->mergeFromJsonString($jsonHeader); + throw $this->createGoogleAdsException( + $exception, + $googleAdsFailure + ); + } + } + throw $exception; + } + ); + } + + private function createGoogleAdsException( + ApiException $exception, + GoogleAdsFailure $googleAdsFailure + ) { + $optionalArgs = [ + 'previous' => $exception->getPrevious(), + 'metadata' => $exception->getMetadata(), + 'basicMessage' => $exception->getBasicMessage() + ]; + return new GoogleAdsException($exception, $googleAdsFailure, $optionalArgs); + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/GoogleAdsGapicClientTrait.php b/src/Google/Ads/GoogleAds/Lib/GoogleAdsGapicClientTrait.php new file mode 100644 index 000000000..ebe10ce7d --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/GoogleAdsGapicClientTrait.php @@ -0,0 +1,56 @@ +developerToken = $options[self::$DEVELOPER_TOKEN_KEY]; + } + } + + /** + * @see GapicClientTrait::modifyUnaryCallable() + */ + protected function modifyUnaryCallable(callable &$callable) + { + if (!is_null($this->developerToken)) { + $callable = new FixedHeaderMiddleware($callable, [ + self::$DEVELOPER_TOKEN_KEY => [$this->developerToken] + ]); + } + $callable = new GoogleAdsExceptionMiddleware($callable); + $callable = new GoogleAdsResponseMetadataCallable($callable); + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/GoogleAdsMetadataTrait.php b/src/Google/Ads/GoogleAds/Lib/GoogleAdsMetadataTrait.php new file mode 100644 index 000000000..eb59ee207 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/GoogleAdsMetadataTrait.php @@ -0,0 +1,48 @@ + 0) { + return $valueArray[0]; + } + } + return null; + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/GoogleAdsResponseMetadata.php b/src/Google/Ads/GoogleAds/Lib/GoogleAdsResponseMetadata.php new file mode 100644 index 000000000..817aacbba --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/GoogleAdsResponseMetadata.php @@ -0,0 +1,63 @@ +metadata = $metadata; + } + + /** + * Gets an associative array of metadata keys and values. + * Keys are strings and values are arrays of string values or binary message data. + * + * @return array an associative array of metadata keys and values. + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Gets the request ID returned in the RPC trailers. + * Returns null if no request ID has been received. + * + * @return string|null the request ID + */ + public function getRequestId() + { + return $this->getFirstHeaderValue( + self::$REQUEST_ID_HEADER_KEY, + $this->getMetadata() ?: [] + ); + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/GoogleAdsResponseMetadataCallable.php b/src/Google/Ads/GoogleAds/Lib/GoogleAdsResponseMetadataCallable.php new file mode 100644 index 000000000..7cff783d4 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/GoogleAdsResponseMetadataCallable.php @@ -0,0 +1,64 @@ +nextHandler = $nextHandler; + } + + /** + * @param Call $call the current request + * @param array $options the optional parameters + * @return array|\GuzzleHttp\Promise\PromiseInterface the two-member array of + * response and metadata if `withResponseMetadata` is specified as an option; + * Or else, the `Promise` interface of the next handler + */ + public function __invoke(Call $call, array $options) + { + if (isset($options['withResponseMetadata']) + && !empty($options['withResponseMetadata'])) { + $next = new ResponseMetadataMiddleware($this->nextHandler); + return $next($call, $options)->then(function ($responseList) { + list($response, $metadata) = $responseList; + return [$response, new GoogleAdsResponseMetadata($metadata)]; + }); + } else { + $next = $this->nextHandler; + return $next($call, $options); + } + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/OAuth2TokenBuilder.php b/src/Google/Ads/GoogleAds/Lib/OAuth2TokenBuilder.php new file mode 100644 index 000000000..28b6d984c --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/OAuth2TokenBuilder.php @@ -0,0 +1,186 @@ +configurationLoader = new ConfigurationLoader(); + } + + /** + * Reads configuration settings from the specified file path. The file path is + * optional, and if omitted, it will look for the default configuration + * filename in the home directory of the user running PHP. + * + * @see GoogleAdsBuilder::DEFAULT_CONFIGURATION_FILENAME + * + * @param string $path the file path + * @return self this builder populated from the configuration + * @throws InvalidArgumentException if the configuration file could not be + * found + */ + public function fromFile($path = null) + { + if ($path === null) { + $path = self::DEFAULT_CONFIGURATION_FILENAME; + } + return $this->from($this->configurationLoader->fromFile($path)); + } + + /** + * @see GoogleAdsBuilder::from() + */ + public function from(Configuration $configuration) + { + $this->clientId = $configuration->getConfiguration('clientId', 'OAUTH2'); + $this->clientSecret = $configuration->getConfiguration('clientSecret', 'OAUTH2'); + $this->refreshToken = $configuration->getConfiguration('refreshToken', 'OAUTH2'); + + return $this; + } + + /** + * Includes an OAuth2 client ID. Required when using installed application or + * web application flow. + * + * @param string $clientId + * @return self this builder + */ + public function withClientId($clientId) + { + $this->clientId = $clientId; + return $this; + } + + /** + * Includes an OAuth2 client secret. Required when using installed application + * or web application flow. + * + * @param string $clientSecret + * @return self this builder + */ + public function withClientSecret($clientSecret) + { + $this->clientSecret = $clientSecret; + return $this; + } + + /** + * Includes an OAuth2 refresh token. Required when using installed application + * or web application flow. + * + * @param string $refreshToken + * @return self this builder + */ + public function withRefreshToken($refreshToken) + { + $this->refreshToken = $refreshToken; + return $this; + } + + /** + * @see GoogleAdsBuilder::build() + * + * @return FetchAuthTokenInterface the created OAuth2 object that can fetch auth tokens + */ + public function build() + { + $this->defaultOptionals(); + $this->validate(); + + return new UserRefreshCredentials( + null, + [ + 'client_id' => $this->clientId, + 'client_secret' => $this->clientSecret, + 'refresh_token' => $this->refreshToken + ] + ); + } + + /** + * @see GoogleAdsBuilder::defaultOptionals() + */ + public function defaultOptionals() + { + // Nothing to default for this builder. + } + + /** + * @see GoogleAdsBuilder::validate() + */ + public function validate() + { + if (is_null($this->clientId) + || is_null($this->clientSecret) + || is_null($this->refreshToken)) { + throw new UnexpectedValueException( + "All of 'clientId', 'clientSecret', and 'refreshToken' must be set when using " + . "installed/web application flow." + ); + } + } + + /** + * Gets the client ID. + * + * @return string|null + */ + public function getClientId() + { + return $this->clientId; + } + + /** + * Gets the client secret. + * + * @return string|null + */ + public function getClientSecret() + { + return $this->clientSecret; + } + + /** + * Gets the refresh token. + * + * @return string|null + */ + public function getRefreshToken() + { + return $this->refreshToken; + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/ServiceClientFactory.php b/src/Google/Ads/GoogleAds/Lib/ServiceClientFactory.php new file mode 100644 index 000000000..16d71d91f --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/ServiceClientFactory.php @@ -0,0 +1,85 @@ + $this->getOAuth2Credential(), + self::$DEVELOPER_TOKEN_KEY => $this->getDeveloperToken() + ]; + if (!empty($this->getEndpoint())) { + $clientOptions += [self::$SERVICE_ADDRESS_KEY => $this->getEndpoint()]; + } + + return $clientOptions; + } + + /** + * @return AdGroupAdServiceClient + */ + public function getAdGroupAdServiceClient() + { + return new AdGroupAdServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return AdGroupBidModifierServiceClient + */ + public function getAdGroupBidModifierServiceClient() + { + return new AdGroupBidModifierServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return AdGroupCriterionServiceClient + */ + public function getAdGroupCriterionServiceClient() + { + return new AdGroupCriterionServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return AdGroupServiceClient + */ + public function getAdGroupServiceClient() + { + return new AdGroupServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return BiddingStrategyServiceClient + */ + public function getBiddingStrategyServiceClient() + { + return new BiddingStrategyServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return CampaignBudgetServiceClient + */ + public function getCampaignBudgetServiceClient() + { + return new CampaignBudgetServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return CampaignCriterionServiceClient + */ + public function getCampaignCriterionServiceClient() + { + return new CampaignCriterionServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return CampaignServiceClient + */ + public function getCampaignServiceClient() + { + return new CampaignServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return CustomerServiceClient + */ + public function getCustomerServiceClient() + { + return new CustomerServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return GeoTargetConstantServiceClient + */ + public function getGeoTargetConstantServiceClient() + { + return new GeoTargetConstantServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return GoogleAdsServiceClient + */ + public function getGoogleAdsServiceClient() + { + return new GoogleAdsServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return GoogleAdsFieldServiceClient + */ + public function getGoogleAdsFieldServiceClient() + { + return new GoogleAdsFieldServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return KeywordViewServiceClient + */ + public function getKeywordViewServiceClient() + { + return new KeywordViewServiceClient($this->getGoogleAdsClientOptions()); + } + + /** + * @return RecommendationServiceClient + */ + public function getRecommendationServiceClient() + { + return new RecommendationServiceClient($this->getGoogleAdsClientOptions()); + } +} diff --git a/src/Google/Ads/GoogleAds/Lib/Testing/ConfigurationLoaderTestProvider.php b/src/Google/Ads/GoogleAds/Lib/Testing/ConfigurationLoaderTestProvider.php new file mode 100644 index 000000000..cc6c81e24 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Lib/Testing/ConfigurationLoaderTestProvider.php @@ -0,0 +1,47 @@ +setBar("new-bar"); + * $fieldMask = FieldMasks::compare($originalFoo, $updatedFoo); + * $client->updateFoo($updatedFoo, $fieldMask); + * ``` + * + * @param Message $original the original protobuf message object. + * @param Message $modified the modified protobuf message object. + * @return FieldMask a FieldMask reflecting the changes between the original and modified + * objects. + */ + public static function compare(Message $original, Message $modified) + { + if (get_class($original) !== get_class($modified)) { + throw new InvalidArgumentException(sprintf( + 'Both input messages must be of the same type, got ' + . 'original: %s, modified: %s', + get_class($original), + get_class($modified) + )); + } + $paths = []; + self::buildPaths($paths, '', $original, $modified); + + return (new FieldMask())->setPaths($paths); + } + + /** + * Computes a FieldMask based on all of the fields of message that have been set. + * + * For a message object `Foo`, FieldMasks::allSetFieldsOf($foo) is equivalent to + * FieldMasks::compare(new Foo(), $foo) + * + * @param Message $message a protobuf message object. + * @return FieldMask a FieldMask reflecting all fields set in $message. + */ + public static function allSetFieldsOf(Message $message) + { + $messageClass = get_class($message); + $defaultMessage = new $messageClass; + + return self::compare($defaultMessage, $message); + } + + /** + * Builds the paths to the fields that are different between original and modified message. + * + * @param array $paths the resulting paths from the computation + * @param string $currentField the current field name + * @param Message $original the original message + * @param Message $modified the modified message + */ + private static function buildPaths( + array &$paths, + $currentField, + Message $original, + Message $modified + ) { + $descriptor = self::getDescriptorForMessage($original); + for ($i = 0; $i < $descriptor->getFieldCount(); $i++) { + $fieldDescriptor = $descriptor->getField($i); + $fieldName = self::getFieldName($currentField, $fieldDescriptor); + + $getter = Serializer::getGetter($fieldDescriptor->getName()); + $originalValue = $original->$getter(); + $modifiedValue = $modified->$getter(); + + if (self::isFieldRepeated($fieldDescriptor)) { + if ($originalValue != $modifiedValue) { + $paths[] = $fieldName; + } + } else { + switch ($fieldDescriptor->getType()) { + case GPBType::MESSAGE: + if ($originalValue != $modifiedValue) { + if (self::isWrapperType($fieldDescriptor->getMessageType())) { + // For wrapper types, just emit the field name. + $paths[] = $fieldName; + } elseif (is_null($originalValue)) { + // If this is a new value, emit the field names for all known + // fields in the message, recursing for nested messages. + self::addNewFields($paths, $fieldName, $modifiedValue); + } elseif (is_null($modifiedValue)) { + // Just emit the deleted field name. + $paths[] = $fieldName; + } else { + // Recursively compare to find different values. + self::buildPaths( + $paths, + $fieldName, + $originalValue, + $modifiedValue + ); + } + } + break; + case GPBType::DOUBLE: + case GPBType::FLOAT: + case GPBType::INT64: + case GPBType::UINT64: + case GPBType::INT32: + case GPBType::FIXED64: + case GPBType::FIXED32: + case GPBType::BOOL: + case GPBType::STRING: + case GPBType::BYTES: + case GPBType::UINT32: + case GPBType::ENUM: + case GPBType::SFIXED32: + case GPBType::SFIXED64: + case GPBType::SINT32: + case GPBType::SINT64: + // Handle all supported types except MESSAGE. + if ($originalValue != $modifiedValue) { + $paths[] = $fieldName; + } + break; + default: + throw new InvalidArgumentException("Unexpected type " + . $fieldDescriptor->getType() . " encountered for field $fieldName"); + } + } + } + } + + /** + * @param string $currentField the current field name + * @param FieldDescriptor $fieldDescriptor the field descriptor to get the field name + * @return string the field name based on the current field name and provided field descriptor + */ + private static function getFieldName($currentField, FieldDescriptor $fieldDescriptor) + { + if (empty($currentField)) { + return $fieldDescriptor->getName(); + } else { + return "$currentField." . $fieldDescriptor->getName(); + } + } + + /** + * @param Message $message the message to get its descriptor + * @return Descriptor the descriptor of the message + */ + private static function getDescriptorForMessage(Message $message) + { + if (is_null(self::$descriptorPool)) { + self::$descriptorPool = DescriptorPool::getGeneratedPool(); + } + return self::$descriptorPool->getDescriptorByClassName(get_class($message)); + } + + /** + * @param FieldDescriptor $fieldDescriptor the field descriptor to check if it's repeated + * @return bool true if the field descriptor is repeated + */ + private static function isFieldRepeated(FieldDescriptor $fieldDescriptor) + { + return $fieldDescriptor->getLabel() === GPBLabel::REPEATED; + } + + /** + * Recursively add field names for a new message. Repeated fields, primitive fields and + * unpopulated single message fields are included just by name; populated single message fields + * are processed recursively, only including leaf nodes. + * + * @param array $paths + * @param $currentField + * @param $message + */ + private static function addNewFields(array &$paths, $currentField, $message) + { + $descriptor = self::getDescriptorForMessage($message); + for ($i = 0; $i < $descriptor->getFieldCount(); $i++) { + $fieldDescriptor = $descriptor->getField($i); + $fieldName = self::getFieldName($currentField, $fieldDescriptor); + // For single message fields, recurse if there's a value; + // otherwise just add the field name. + if (!self::isFieldRepeated($fieldDescriptor) + && $fieldDescriptor->getType() === GPBType::MESSAGE) { + $getter = Serializer::getGetter($fieldDescriptor->getName()); + $messageValue = $message->$getter(); + if (!is_null($messageValue)) { + self::addNewFields($paths, $fieldName, $messageValue); + } else { + $paths[] = $fieldName; + } + } else { + $paths[] = $fieldName; + } + } + } + + /** + * @param Descriptor $descriptor the descriptor to check + * @return bool true if this is a wrapper type + */ + private static function isWrapperType(Descriptor $descriptor) + { + return in_array($descriptor->getClass(), self::$WRAPPER_TYPES); + } +} diff --git a/src/Google/Ads/GoogleAds/Util/ResourceNames.php b/src/Google/Ads/GoogleAds/Util/ResourceNames.php new file mode 100644 index 000000000..7bc25fa78 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Util/ResourceNames.php @@ -0,0 +1,180 @@ +google.ads.googleads.util.testing.Bar + */ +class Bar extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 num = 1; + */ + private $num = 0; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\Util\Testing\Tester::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field int64 num = 1; + * @return int|string + */ + public function getNum() + { + return $this->num; + } + + /** + * Generated from protobuf field int64 num = 1; + * @param int|string $var + * @return $this + */ + public function setNum($var) + { + GPBUtil::checkInt64($var); + $this->num = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/Foo.php b/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/Foo.php new file mode 100644 index 000000000..bf5e7c6b2 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/Foo.php @@ -0,0 +1,101 @@ +google.ads.googleads.util.testing.Foo + */ +class Foo extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 num = 1; + */ + private $num = 0; + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Bar bar = 2; + */ + private $bar = null; + /** + * Generated from protobuf field repeated .google.ads.googleads.util.testing.Bar bars = 3; + */ + private $bars; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\Util\Testing\Tester::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field int64 num = 1; + * @return int|string + */ + public function getNum() + { + return $this->num; + } + + /** + * Generated from protobuf field int64 num = 1; + * @param int|string $var + * @return $this + */ + public function setNum($var) + { + GPBUtil::checkInt64($var); + $this->num = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Bar bar = 2; + * @return \Google\Ads\GoogleAds\Util\Testing\Bar + */ + public function getBar() + { + return $this->bar; + } + + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Bar bar = 2; + * @param \Google\Ads\GoogleAds\Util\Testing\Bar $var + * @return $this + */ + public function setBar($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\Util\Testing\Bar::class); + $this->bar = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .google.ads.googleads.util.testing.Bar bars = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBars() + { + return $this->bars; + } + + /** + * Generated from protobuf field repeated .google.ads.googleads.util.testing.Bar bars = 3; + * @param \Google\Ads\GoogleAds\Util\Testing\Bar[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBars($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\Util\Testing\Bar::class); + $this->bars = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/Resource.php b/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/Resource.php new file mode 100644 index 000000000..f8063975f --- /dev/null +++ b/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/Resource.php @@ -0,0 +1,101 @@ +google.ads.googleads.util.testing.Resource + */ +class Resource extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.protobuf.StringValue wrapper = 1; + */ + private $wrapper = null; + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Foo foo = 2; + */ + private $foo = null; + /** + * Generated from protobuf field repeated .google.ads.googleads.util.testing.Foo foos = 3; + */ + private $foos; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\Util\Testing\Tester::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field .google.protobuf.StringValue wrapper = 1; + * @return \Google\Protobuf\StringValue + */ + public function getWrapper() + { + return $this->wrapper; + } + + /** + * Generated from protobuf field .google.protobuf.StringValue wrapper = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setWrapper($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->wrapper = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Foo foo = 2; + * @return \Google\Ads\GoogleAds\Util\Testing\Foo + */ + public function getFoo() + { + return $this->foo; + } + + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Foo foo = 2; + * @param \Google\Ads\GoogleAds\Util\Testing\Foo $var + * @return $this + */ + public function setFoo($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\Util\Testing\Foo::class); + $this->foo = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .google.ads.googleads.util.testing.Foo foos = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFoos() + { + return $this->foos; + } + + /** + * Generated from protobuf field repeated .google.ads.googleads.util.testing.Foo foos = 3; + * @param \Google\Ads\GoogleAds\Util\Testing\Foo[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFoos($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\Util\Testing\Foo::class); + $this->foos = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/TestCase.php b/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/TestCase.php new file mode 100644 index 000000000..a595b0f5f --- /dev/null +++ b/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/TestCase.php @@ -0,0 +1,127 @@ +google.ads.googleads.util.testing.TestCase + */ +class TestCase extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string description = 1; + */ + private $description = ''; + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Resource original_resource = 2; + */ + private $original_resource = null; + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Resource modified_resource = 3; + */ + private $modified_resource = null; + /** + * Generated from protobuf field .google.protobuf.FieldMask expected_mask = 4; + */ + private $expected_mask = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\Util\Testing\Tester::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Generated from protobuf field string description = 1; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Resource original_resource = 2; + * @return \Google\Ads\GoogleAds\Util\Testing\Resource + */ + public function getOriginalResource() + { + return $this->original_resource; + } + + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Resource original_resource = 2; + * @param \Google\Ads\GoogleAds\Util\Testing\Resource $var + * @return $this + */ + public function setOriginalResource($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\Util\Testing\Resource::class); + $this->original_resource = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Resource modified_resource = 3; + * @return \Google\Ads\GoogleAds\Util\Testing\Resource + */ + public function getModifiedResource() + { + return $this->modified_resource; + } + + /** + * Generated from protobuf field .google.ads.googleads.util.testing.Resource modified_resource = 3; + * @param \Google\Ads\GoogleAds\Util\Testing\Resource $var + * @return $this + */ + public function setModifiedResource($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\Util\Testing\Resource::class); + $this->modified_resource = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.protobuf.FieldMask expected_mask = 4; + * @return \Google\Protobuf\FieldMask + */ + public function getExpectedMask() + { + return $this->expected_mask; + } + + /** + * Generated from protobuf field .google.protobuf.FieldMask expected_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setExpectedMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->expected_mask = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/TestSuite.php b/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/TestSuite.php new file mode 100644 index 000000000..ccb73f241 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Util/Testing/Google/Ads/GoogleAds/Util/Testing/TestSuite.php @@ -0,0 +1,49 @@ +google.ads.googleads.util.testing.TestSuite + */ +class TestSuite extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .google.ads.googleads.util.testing.TestCase test_cases = 1; + */ + private $test_cases; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\Util\Testing\Tester::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field repeated .google.ads.googleads.util.testing.TestCase test_cases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTestCases() + { + return $this->test_cases; + } + + /** + * Generated from protobuf field repeated .google.ads.googleads.util.testing.TestCase test_cases = 1; + * @param \Google\Ads\GoogleAds\Util\Testing\TestCase[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTestCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\Util\Testing\TestCase::class); + $this->test_cases = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/Util/Testing/metadata/Google/Ads/GoogleAds/Util/Testing/Tester.php b/src/Google/Ads/GoogleAds/Util/Testing/metadata/Google/Ads/GoogleAds/Util/Testing/Tester.php new file mode 100644 index 000000000..a4aeae631 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Util/Testing/metadata/Google/Ads/GoogleAds/Util/Testing/Tester.php @@ -0,0 +1,54 @@ +internalAddGeneratedFile(hex2bin( + "0ac9060a2e476f6f676c652f4164732f476f6f676c654164732f5574696c" . + "2f54657374696e672f7465737465722e70726f746f1221676f6f676c652e" . + "6164732e676f6f676c656164732e7574696c2e74657374696e671a20676f" . + "6f676c652f70726f746f6275662f6669656c645f6d61736b2e70726f746f" . + "224c0a09546573745375697465123f0a0a746573745f6361736573180120" . + "03280b322b2e676f6f676c652e6164732e676f6f676c656164732e757469" . + "6c2e74657374696e672e546573744361736522e2010a0854657374436173" . + "6512130a0b6465736372697074696f6e18012001280912460a116f726967" . + "696e616c5f7265736f7572636518022001280b322b2e676f6f676c652e61" . + "64732e676f6f676c656164732e7574696c2e74657374696e672e5265736f" . + "7572636512460a116d6f6469666965645f7265736f757263651803200128" . + "0b322b2e676f6f676c652e6164732e676f6f676c656164732e7574696c2e" . + "74657374696e672e5265736f7572636512310a0d65787065637465645f6d" . + "61736b18042001280b321a2e676f6f676c652e70726f746f6275662e4669" . + "656c644d61736b22a4010a085265736f75726365122d0a07777261707065" . + "7218012001280b321c2e676f6f676c652e70726f746f6275662e53747269" . + "6e6756616c756512330a03666f6f18022001280b32262e676f6f676c652e" . + "6164732e676f6f676c656164732e7574696c2e74657374696e672e466f6f" . + "12340a04666f6f7318032003280b32262e676f6f676c652e6164732e676f" . + "6f676c656164732e7574696c2e74657374696e672e466f6f227d0a03466f" . + "6f120b0a036e756d18012001280312330a0362617218022001280b32262e" . + "676f6f676c652e6164732e676f6f676c656164732e7574696c2e74657374" . + "696e672e42617212340a046261727318032003280b32262e676f6f676c65" . + "2e6164732e676f6f676c656164732e7574696c2e74657374696e672e4261" . + "7222120a03426172120b0a036e756d180120012803425d0a25636f6d2e67" . + "6f6f676c652e6164732e676f6f676c656164732e7574696c2e7465737469" . + "6e67420e54657374537569746550726f746f5001ca0221476f6f676c655c" . + "4164735c476f6f676c654164735c5574696c5c54657374696e6762067072" . + "6f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/src/Google/Ads/GoogleAds/Util/Testing/proto/Google/Ads/GoogleAds/Util/Testing/tester.proto b/src/Google/Ads/GoogleAds/Util/Testing/proto/Google/Ads/GoogleAds/Util/Testing/tester.proto new file mode 100644 index 000000000..cb5678966 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Util/Testing/proto/Google/Ads/GoogleAds/Util/Testing/tester.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; + +package google.ads.googleads.util.testing; + +import "google/protobuf/wrappers.proto"; +import "google/protobuf/field_mask.proto"; + +option java_multiple_files = true; +option java_outer_classname = "TestSuiteProto"; +option java_package = "com.google.ads.googleads.util.testing"; +option php_namespace = "Google\\Ads\\GoogleAds\\Util\\Testing"; + +message TestSuite { + repeated TestCase test_cases = 1; +} + +message TestCase { + string description = 1; + Resource original_resource = 2; + Resource modified_resource = 3; + google.protobuf.FieldMask expected_mask = 4; +} + +message Resource { + google.protobuf.StringValue wrapper = 1; + Foo foo = 2; + repeated Foo foos = 3; +} + +message Foo { + int64 num = 1; + Bar bar = 2; + repeated Bar bars = 3; +} + +message Bar { + int64 num = 1; +} diff --git a/src/Google/Ads/GoogleAds/Util/Testing/proto/README.md b/src/Google/Ads/GoogleAds/Util/Testing/proto/README.md new file mode 100644 index 000000000..b2c6e6ef7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Util/Testing/proto/README.md @@ -0,0 +1,11 @@ +## Conformance Test Protobuf Definition + +This directory contains the `tester.proto` file, which defines the message +types used for running conformance tests for the FieldMasks class. It also +contains `generate.sh`, which is used to execute the protobuf compiler +(`protoc`) to generate PHP classes for the messages defined in `tester.proto` +To run this script, you need to install `protoc` via +[these instructions](https://github.com/google/protobuf#protocol-compiler-installation). + +The `generate.sh` script should be invoked whenever a change is made to the +`tester.proto` file, and the generated PHP classes need to be updated. diff --git a/src/Google/Ads/GoogleAds/Util/Testing/proto/generate.sh b/src/Google/Ads/GoogleAds/Util/Testing/proto/generate.sh new file mode 100755 index 000000000..5ea0f5950 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Util/Testing/proto/generate.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Run this script whenever changes are made to tester.proto to regenerate the +# PHP protobuf message classes. + +protoc --php_out ../ Google/Ads/GoogleAds/Util/Testing/tester.proto +cp -r ../GPBMetadata/* ../metadata/ +rm -r ../GPBMetadata diff --git a/src/Google/Ads/GoogleAds/Util/Testing/testdata/test_cases.json b/src/Google/Ads/GoogleAds/Util/Testing/testdata/test_cases.json new file mode 100644 index 000000000..69afd9d97 --- /dev/null +++ b/src/Google/Ads/GoogleAds/Util/Testing/testdata/test_cases.json @@ -0,0 +1,100 @@ +{ + "test_cases": [{ + "description": "Modify scalar in a wrapper proto", + "original_resource": { + "wrapper": "a" + }, + "modified_resource": { + "wrapper": "b" + }, + "expected_mask": "wrapper" + }, { + "description": "Create wrapper proto", + "original_resource": { + }, + "modified_resource": { + "wrapper": "a" + }, + "expected_mask": "wrapper" + }, { + "description": "Modify element in a repeated field", + "original_resource": { + "foos": [{ + "num": 1 + }, { + "num": 2 + }] + }, + "modified_resource": { + "foos": [{ + "num": 1 + }, { + "num": 3 + }] + }, + "expected_mask": "foos" + }, { + "description": "Modify element in a nested repeated field", + "original_resource": { + "foos": [{ + "bars": [{ + "num": 1 + }] + }] + }, + "modified_resource": { + "foos": [{ + "bars": [{ + "num": 2 + }] + }] + }, + "expected_mask": "foos" + }, { + "description": "Create submessage", + "original_resource": { + }, + "modified_resource": { + "foo": { + "num": 1 + } + }, + "expected_mask": "foo.num,foo.bar,foo.bars" + }, { + "description": "Modify submessage", + "original_resource": { + "foo": { + } + }, + "modified_resource": { + "foo": { + "num": 1 + } + }, + "expected_mask": "foo.num" + }, { + "description": "Clear submessage", + "original_resource": { + "foo": { + } + }, + "modified_resource": { + }, + "expected_mask": "foo" + }, { + "description": "No change", + "original_resource": { + "wrapper": "a", + "foos": [{ + "num": 1 + }] + }, + "modified_resource": { + "wrapper": "a", + "foos": [{ + "num": 1 + }] + }, + "expected_mask": {} + } +]} diff --git a/src/Google/Ads/GoogleAds/V0/Common/Ad.php b/src/Google/Ads/GoogleAds/V0/Common/Ad.php new file mode 100644 index 000000000..6e633a8d1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/Ad.php @@ -0,0 +1,460 @@ +google.ads.googleads.v0.common.Ad + */ +class Ad extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the ad. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 1; + */ + private $id = null; + /** + * The list of possible final URLs after all cross-domain redirects for the + * ad. + * + * Generated from protobuf field repeated .google.protobuf.StringValue final_urls = 2; + */ + private $final_urls; + /** + * The list of possible final mobile URLs after all cross-domain redirects + * for the ad. + * + * Generated from protobuf field repeated .google.protobuf.StringValue final_mobile_urls = 16; + */ + private $final_mobile_urls; + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 12; + */ + private $tracking_url_template = null; + /** + * The list of mappings that can be used to substitute custom parameter tags + * in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 10; + */ + private $url_custom_parameters; + /** + * The URL that appears in the ad description for some ad formats. + * + * Generated from protobuf field .google.protobuf.StringValue display_url = 4; + */ + private $display_url = null; + /** + * The type of ad. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdTypeEnum.AdType type = 5; + */ + private $type = 0; + protected $ad_data; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Ad::initOnce(); + parent::__construct(); + } + + /** + * The ID of the ad. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the ad. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->id = $var; + + return $this; + } + + /** + * The list of possible final URLs after all cross-domain redirects for the + * ad. + * + * Generated from protobuf field repeated .google.protobuf.StringValue final_urls = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFinalUrls() + { + return $this->final_urls; + } + + /** + * The list of possible final URLs after all cross-domain redirects for the + * ad. + * + * Generated from protobuf field repeated .google.protobuf.StringValue final_urls = 2; + * @param \Google\Protobuf\StringValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFinalUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\StringValue::class); + $this->final_urls = $arr; + + return $this; + } + + /** + * The list of possible final mobile URLs after all cross-domain redirects + * for the ad. + * + * Generated from protobuf field repeated .google.protobuf.StringValue final_mobile_urls = 16; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFinalMobileUrls() + { + return $this->final_mobile_urls; + } + + /** + * The list of possible final mobile URLs after all cross-domain redirects + * for the ad. + * + * Generated from protobuf field repeated .google.protobuf.StringValue final_mobile_urls = 16; + * @param \Google\Protobuf\StringValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFinalMobileUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\StringValue::class); + $this->final_mobile_urls = $arr; + + return $this; + } + + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 12; + * @return \Google\Protobuf\StringValue + */ + public function getTrackingUrlTemplate() + { + return $this->tracking_url_template; + } + + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 12; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setTrackingUrlTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->tracking_url_template = $var; + + return $this; + } + + /** + * The list of mappings that can be used to substitute custom parameter tags + * in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUrlCustomParameters() + { + return $this->url_custom_parameters; + } + + /** + * The list of mappings that can be used to substitute custom parameter tags + * in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 10; + * @param \Google\Ads\GoogleAds\V0\Common\CustomParameter[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUrlCustomParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Common\CustomParameter::class); + $this->url_custom_parameters = $arr; + + return $this; + } + + /** + * The URL that appears in the ad description for some ad formats. + * + * Generated from protobuf field .google.protobuf.StringValue display_url = 4; + * @return \Google\Protobuf\StringValue + */ + public function getDisplayUrl() + { + return $this->display_url; + } + + /** + * The URL that appears in the ad description for some ad formats. + * + * Generated from protobuf field .google.protobuf.StringValue display_url = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDisplayUrl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->display_url = $var; + + return $this; + } + + /** + * The type of ad. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdTypeEnum.AdType type = 5; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of ad. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdTypeEnum.AdType type = 5; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\AdTypeEnum_AdType::class); + $this->type = $var; + + return $this; + } + + /** + * Details pertaining to a text ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TextAdInfo text_ad = 6; + * @return \Google\Ads\GoogleAds\V0\Common\TextAdInfo + */ + public function getTextAd() + { + return $this->readOneof(6); + } + + /** + * Details pertaining to a text ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TextAdInfo text_ad = 6; + * @param \Google\Ads\GoogleAds\V0\Common\TextAdInfo $var + * @return $this + */ + public function setTextAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\TextAdInfo::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Details pertaining to an expanded text ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ExpandedTextAdInfo expanded_text_ad = 7; + * @return \Google\Ads\GoogleAds\V0\Common\ExpandedTextAdInfo + */ + public function getExpandedTextAd() + { + return $this->readOneof(7); + } + + /** + * Details pertaining to an expanded text ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ExpandedTextAdInfo expanded_text_ad = 7; + * @param \Google\Ads\GoogleAds\V0\Common\ExpandedTextAdInfo $var + * @return $this + */ + public function setExpandedTextAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\ExpandedTextAdInfo::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Details pertaining to a Dynamic Search Ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.DynamicSearchAdInfo dynamic_search_ad = 8; + * @return \Google\Ads\GoogleAds\V0\Common\DynamicSearchAdInfo + */ + public function getDynamicSearchAd() + { + return $this->readOneof(8); + } + + /** + * Details pertaining to a Dynamic Search Ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.DynamicSearchAdInfo dynamic_search_ad = 8; + * @param \Google\Ads\GoogleAds\V0\Common\DynamicSearchAdInfo $var + * @return $this + */ + public function setDynamicSearchAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\DynamicSearchAdInfo::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Details pertaining to a responsive display ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ResponsiveDisplayAdInfo responsive_display_ad = 9; + * @return \Google\Ads\GoogleAds\V0\Common\ResponsiveDisplayAdInfo + */ + public function getResponsiveDisplayAd() + { + return $this->readOneof(9); + } + + /** + * Details pertaining to a responsive display ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ResponsiveDisplayAdInfo responsive_display_ad = 9; + * @param \Google\Ads\GoogleAds\V0\Common\ResponsiveDisplayAdInfo $var + * @return $this + */ + public function setResponsiveDisplayAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\ResponsiveDisplayAdInfo::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Details pertaining to a call-only ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.CallOnlyAdInfo call_only_ad = 13; + * @return \Google\Ads\GoogleAds\V0\Common\CallOnlyAdInfo + */ + public function getCallOnlyAd() + { + return $this->readOneof(13); + } + + /** + * Details pertaining to a call-only ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.CallOnlyAdInfo call_only_ad = 13; + * @param \Google\Ads\GoogleAds\V0\Common\CallOnlyAdInfo $var + * @return $this + */ + public function setCallOnlyAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\CallOnlyAdInfo::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Details pertaining to an Expanded Dynamic Search Ad. + * This type of ad has its headline, final URLs, and display URL + * auto-generated at serving time according to domain name specific + * information provided by `dynamic_search_ads_setting` linked at the + * campaign level. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ExpandedDynamicSearchAdInfo expanded_dynamic_search_ad = 14; + * @return \Google\Ads\GoogleAds\V0\Common\ExpandedDynamicSearchAdInfo + */ + public function getExpandedDynamicSearchAd() + { + return $this->readOneof(14); + } + + /** + * Details pertaining to an Expanded Dynamic Search Ad. + * This type of ad has its headline, final URLs, and display URL + * auto-generated at serving time according to domain name specific + * information provided by `dynamic_search_ads_setting` linked at the + * campaign level. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ExpandedDynamicSearchAdInfo expanded_dynamic_search_ad = 14; + * @param \Google\Ads\GoogleAds\V0\Common\ExpandedDynamicSearchAdInfo $var + * @return $this + */ + public function setExpandedDynamicSearchAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\ExpandedDynamicSearchAdInfo::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Details pertaining to a hotel ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelAdInfo hotel_ad = 15; + * @return \Google\Ads\GoogleAds\V0\Common\HotelAdInfo + */ + public function getHotelAd() + { + return $this->readOneof(15); + } + + /** + * Details pertaining to a hotel ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelAdInfo hotel_ad = 15; + * @param \Google\Ads\GoogleAds\V0\Common\HotelAdInfo $var + * @return $this + */ + public function setHotelAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\HotelAdInfo::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * @return string + */ + public function getAdData() + { + return $this->whichOneof("ad_data"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/CallOnlyAdInfo.php b/src/Google/Ads/GoogleAds/V0/Common/CallOnlyAdInfo.php new file mode 100644 index 000000000..d50e419e1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/CallOnlyAdInfo.php @@ -0,0 +1,293 @@ +google.ads.googleads.v0.common.CallOnlyAdInfo + */ +class CallOnlyAdInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The country code in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue country_code = 1; + */ + private $country_code = null; + /** + * The phone number in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue phone_number = 2; + */ + private $phone_number = null; + /** + * The business name in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue business_name = 3; + */ + private $business_name = null; + /** + * The first line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description1 = 4; + */ + private $description1 = null; + /** + * The second line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description2 = 5; + */ + private $description2 = null; + /** + * Whether to enable call tracking for the creative. Enabling call + * tracking also enables call conversions. + * + * Generated from protobuf field .google.protobuf.BoolValue call_tracked = 6; + */ + private $call_tracked = null; + /** + * Whether to disable call conversion for the creative. + * If set to `true`, disables call conversions even when `call_tracked` is + * `true`. + * If `call_tracked` is `false`, this field is ignored. + * + * Generated from protobuf field .google.protobuf.BoolValue disable_call_conversion = 7; + */ + private $disable_call_conversion = null; + /** + * The URL to be used for phone number verification. + * + * Generated from protobuf field .google.protobuf.StringValue phone_number_verification_url = 8; + */ + private $phone_number_verification_url = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Ad::initOnce(); + parent::__construct(); + } + + /** + * The country code in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue country_code = 1; + * @return \Google\Protobuf\StringValue + */ + public function getCountryCode() + { + return $this->country_code; + } + + /** + * The country code in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue country_code = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCountryCode($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->country_code = $var; + + return $this; + } + + /** + * The phone number in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue phone_number = 2; + * @return \Google\Protobuf\StringValue + */ + public function getPhoneNumber() + { + return $this->phone_number; + } + + /** + * The phone number in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue phone_number = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setPhoneNumber($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->phone_number = $var; + + return $this; + } + + /** + * The business name in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue business_name = 3; + * @return \Google\Protobuf\StringValue + */ + public function getBusinessName() + { + return $this->business_name; + } + + /** + * The business name in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue business_name = 3; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setBusinessName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->business_name = $var; + + return $this; + } + + /** + * The first line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description1 = 4; + * @return \Google\Protobuf\StringValue + */ + public function getDescription1() + { + return $this->description1; + } + + /** + * The first line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description1 = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription1($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description1 = $var; + + return $this; + } + + /** + * The second line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description2 = 5; + * @return \Google\Protobuf\StringValue + */ + public function getDescription2() + { + return $this->description2; + } + + /** + * The second line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description2 = 5; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription2($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description2 = $var; + + return $this; + } + + /** + * Whether to enable call tracking for the creative. Enabling call + * tracking also enables call conversions. + * + * Generated from protobuf field .google.protobuf.BoolValue call_tracked = 6; + * @return \Google\Protobuf\BoolValue + */ + public function getCallTracked() + { + return $this->call_tracked; + } + + /** + * Whether to enable call tracking for the creative. Enabling call + * tracking also enables call conversions. + * + * Generated from protobuf field .google.protobuf.BoolValue call_tracked = 6; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setCallTracked($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->call_tracked = $var; + + return $this; + } + + /** + * Whether to disable call conversion for the creative. + * If set to `true`, disables call conversions even when `call_tracked` is + * `true`. + * If `call_tracked` is `false`, this field is ignored. + * + * Generated from protobuf field .google.protobuf.BoolValue disable_call_conversion = 7; + * @return \Google\Protobuf\BoolValue + */ + public function getDisableCallConversion() + { + return $this->disable_call_conversion; + } + + /** + * Whether to disable call conversion for the creative. + * If set to `true`, disables call conversions even when `call_tracked` is + * `true`. + * If `call_tracked` is `false`, this field is ignored. + * + * Generated from protobuf field .google.protobuf.BoolValue disable_call_conversion = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDisableCallConversion($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->disable_call_conversion = $var; + + return $this; + } + + /** + * The URL to be used for phone number verification. + * + * Generated from protobuf field .google.protobuf.StringValue phone_number_verification_url = 8; + * @return \Google\Protobuf\StringValue + */ + public function getPhoneNumberVerificationUrl() + { + return $this->phone_number_verification_url; + } + + /** + * The URL to be used for phone number verification. + * + * Generated from protobuf field .google.protobuf.StringValue phone_number_verification_url = 8; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setPhoneNumberVerificationUrl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->phone_number_verification_url = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/CustomParameter.php b/src/Google/Ads/GoogleAds/V0/Common/CustomParameter.php new file mode 100644 index 000000000..c0d046388 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/CustomParameter.php @@ -0,0 +1,90 @@ +google.ads.googleads.v0.common.CustomParameter + */ +class CustomParameter extends \Google\Protobuf\Internal\Message +{ + /** + * The key matching the parameter tag name. + * + * Generated from protobuf field .google.protobuf.StringValue key = 1; + */ + private $key = null; + /** + * The value to be substituted. + * + * Generated from protobuf field .google.protobuf.StringValue value = 2; + */ + private $value = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\CustomParameter::initOnce(); + parent::__construct(); + } + + /** + * The key matching the parameter tag name. + * + * Generated from protobuf field .google.protobuf.StringValue key = 1; + * @return \Google\Protobuf\StringValue + */ + public function getKey() + { + return $this->key; + } + + /** + * The key matching the parameter tag name. + * + * Generated from protobuf field .google.protobuf.StringValue key = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->key = $var; + + return $this; + } + + /** + * The value to be substituted. + * + * Generated from protobuf field .google.protobuf.StringValue value = 2; + * @return \Google\Protobuf\StringValue + */ + public function getValue() + { + return $this->value; + } + + /** + * The value to be substituted. + * + * Generated from protobuf field .google.protobuf.StringValue value = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/DynamicSearchAdInfo.php b/src/Google/Ads/GoogleAds/V0/Common/DynamicSearchAdInfo.php new file mode 100644 index 000000000..1338d1593 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/DynamicSearchAdInfo.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.common.DynamicSearchAdInfo + */ +class DynamicSearchAdInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The first line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description1 = 1; + */ + private $description1 = null; + /** + * The second line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description2 = 2; + */ + private $description2 = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Ad::initOnce(); + parent::__construct(); + } + + /** + * The first line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description1 = 1; + * @return \Google\Protobuf\StringValue + */ + public function getDescription1() + { + return $this->description1; + } + + /** + * The first line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description1 = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription1($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description1 = $var; + + return $this; + } + + /** + * The second line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description2 = 2; + * @return \Google\Protobuf\StringValue + */ + public function getDescription2() + { + return $this->description2; + } + + /** + * The second line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description2 = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription2($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description2 = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/EnhancedCpc.php b/src/Google/Ads/GoogleAds/V0/Common/EnhancedCpc.php new file mode 100644 index 000000000..da388fb70 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/EnhancedCpc.php @@ -0,0 +1,27 @@ +google.ads.googleads.v0.common.EnhancedCpc + */ +class EnhancedCpc extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Bidding::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/ExpandedDynamicSearchAdInfo.php b/src/Google/Ads/GoogleAds/V0/Common/ExpandedDynamicSearchAdInfo.php new file mode 100644 index 000000000..d4816c085 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/ExpandedDynamicSearchAdInfo.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.common.ExpandedDynamicSearchAdInfo + */ +class ExpandedDynamicSearchAdInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The description of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue description = 1; + */ + private $description = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Ad::initOnce(); + parent::__construct(); + } + + /** + * The description of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue description = 1; + * @return \Google\Protobuf\StringValue + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue description = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/ExpandedTextAdInfo.php b/src/Google/Ads/GoogleAds/V0/Common/ExpandedTextAdInfo.php new file mode 100644 index 000000000..5aa14aa0b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/ExpandedTextAdInfo.php @@ -0,0 +1,185 @@ +google.ads.googleads.v0.common.ExpandedTextAdInfo + */ +class ExpandedTextAdInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The first part of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue headline_part1 = 1; + */ + private $headline_part1 = null; + /** + * The second part of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue headline_part2 = 2; + */ + private $headline_part2 = null; + /** + * The description of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3; + */ + private $description = null; + /** + * The text that can appear alongside the ad's displayed URL. + * + * Generated from protobuf field .google.protobuf.StringValue path1 = 4; + */ + private $path1 = null; + /** + * Additional text that can appear alongside the ad's displayed URL. + * + * Generated from protobuf field .google.protobuf.StringValue path2 = 5; + */ + private $path2 = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Ad::initOnce(); + parent::__construct(); + } + + /** + * The first part of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue headline_part1 = 1; + * @return \Google\Protobuf\StringValue + */ + public function getHeadlinePart1() + { + return $this->headline_part1; + } + + /** + * The first part of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue headline_part1 = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setHeadlinePart1($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->headline_part1 = $var; + + return $this; + } + + /** + * The second part of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue headline_part2 = 2; + * @return \Google\Protobuf\StringValue + */ + public function getHeadlinePart2() + { + return $this->headline_part2; + } + + /** + * The second part of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue headline_part2 = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setHeadlinePart2($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->headline_part2 = $var; + + return $this; + } + + /** + * The description of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3; + * @return \Google\Protobuf\StringValue + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description = $var; + + return $this; + } + + /** + * The text that can appear alongside the ad's displayed URL. + * + * Generated from protobuf field .google.protobuf.StringValue path1 = 4; + * @return \Google\Protobuf\StringValue + */ + public function getPath1() + { + return $this->path1; + } + + /** + * The text that can appear alongside the ad's displayed URL. + * + * Generated from protobuf field .google.protobuf.StringValue path1 = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setPath1($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->path1 = $var; + + return $this; + } + + /** + * Additional text that can appear alongside the ad's displayed URL. + * + * Generated from protobuf field .google.protobuf.StringValue path2 = 5; + * @return \Google\Protobuf\StringValue + */ + public function getPath2() + { + return $this->path2; + } + + /** + * Additional text that can appear alongside the ad's displayed URL. + * + * Generated from protobuf field .google.protobuf.StringValue path2 = 5; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setPath2($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->path2 = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/HotelAdInfo.php b/src/Google/Ads/GoogleAds/V0/Common/HotelAdInfo.php new file mode 100644 index 000000000..2be65fb31 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/HotelAdInfo.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.common.HotelAdInfo + */ +class HotelAdInfo extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Ad::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/HotelAdvanceBookingWindowInfo.php b/src/Google/Ads/GoogleAds/V0/Common/HotelAdvanceBookingWindowInfo.php new file mode 100644 index 000000000..1253d38f7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/HotelAdvanceBookingWindowInfo.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.common.HotelAdvanceBookingWindowInfo + */ +class HotelAdvanceBookingWindowInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Low end of the number of days prior to the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value min_days = 1; + */ + private $min_days = null; + /** + * High end of the number of days prior to the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value max_days = 2; + */ + private $max_days = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * Low end of the number of days prior to the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value min_days = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getMinDays() + { + return $this->min_days; + } + + /** + * Low end of the number of days prior to the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value min_days = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMinDays($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->min_days = $var; + + return $this; + } + + /** + * High end of the number of days prior to the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value max_days = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getMaxDays() + { + return $this->max_days; + } + + /** + * High end of the number of days prior to the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value max_days = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMaxDays($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->max_days = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/HotelCheckInDayInfo.php b/src/Google/Ads/GoogleAds/V0/Common/HotelCheckInDayInfo.php new file mode 100644 index 000000000..43d9ee9fe --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/HotelCheckInDayInfo.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.common.HotelCheckInDayInfo + */ +class HotelCheckInDayInfo extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/HotelCityInfo.php b/src/Google/Ads/GoogleAds/V0/Common/HotelCityInfo.php new file mode 100644 index 000000000..04076ac26 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/HotelCityInfo.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.common.HotelCityInfo + */ +class HotelCityInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The Geo Target Constant resource name. + * + * Generated from protobuf field .google.protobuf.StringValue city_criterion = 1; + */ + private $city_criterion = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * The Geo Target Constant resource name. + * + * Generated from protobuf field .google.protobuf.StringValue city_criterion = 1; + * @return \Google\Protobuf\StringValue + */ + public function getCityCriterion() + { + return $this->city_criterion; + } + + /** + * The Geo Target Constant resource name. + * + * Generated from protobuf field .google.protobuf.StringValue city_criterion = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCityCriterion($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->city_criterion = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/HotelClassInfo.php b/src/Google/Ads/GoogleAds/V0/Common/HotelClassInfo.php new file mode 100644 index 000000000..e8cc420d1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/HotelClassInfo.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.common.HotelClassInfo + */ +class HotelClassInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Long value of the hotel class. + * + * Generated from protobuf field .google.protobuf.Int64Value value = 1; + */ + private $value = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * Long value of the hotel class. + * + * Generated from protobuf field .google.protobuf.Int64Value value = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getValue() + { + return $this->value; + } + + /** + * Long value of the hotel class. + * + * Generated from protobuf field .google.protobuf.Int64Value value = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/HotelCountryRegionInfo.php b/src/Google/Ads/GoogleAds/V0/Common/HotelCountryRegionInfo.php new file mode 100644 index 000000000..5983e74b2 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/HotelCountryRegionInfo.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.common.HotelCountryRegionInfo + */ +class HotelCountryRegionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The Geo Target Constant resource name. + * + * Generated from protobuf field .google.protobuf.StringValue country_region_criterion = 1; + */ + private $country_region_criterion = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * The Geo Target Constant resource name. + * + * Generated from protobuf field .google.protobuf.StringValue country_region_criterion = 1; + * @return \Google\Protobuf\StringValue + */ + public function getCountryRegionCriterion() + { + return $this->country_region_criterion; + } + + /** + * The Geo Target Constant resource name. + * + * Generated from protobuf field .google.protobuf.StringValue country_region_criterion = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCountryRegionCriterion($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->country_region_criterion = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/HotelDateSelectionTypeInfo.php b/src/Google/Ads/GoogleAds/V0/Common/HotelDateSelectionTypeInfo.php new file mode 100644 index 000000000..a7236cbf0 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/HotelDateSelectionTypeInfo.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.common.HotelDateSelectionTypeInfo + */ +class HotelDateSelectionTypeInfo extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/HotelIdInfo.php b/src/Google/Ads/GoogleAds/V0/Common/HotelIdInfo.php new file mode 100644 index 000000000..4395661f5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/HotelIdInfo.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.common.HotelIdInfo + */ +class HotelIdInfo extends \Google\Protobuf\Internal\Message +{ + /** + * String value of the hotel ID. + * + * Generated from protobuf field .google.protobuf.StringValue value = 1; + */ + private $value = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * String value of the hotel ID. + * + * Generated from protobuf field .google.protobuf.StringValue value = 1; + * @return \Google\Protobuf\StringValue + */ + public function getValue() + { + return $this->value; + } + + /** + * String value of the hotel ID. + * + * Generated from protobuf field .google.protobuf.StringValue value = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/HotelLengthOfStayInfo.php b/src/Google/Ads/GoogleAds/V0/Common/HotelLengthOfStayInfo.php new file mode 100644 index 000000000..f6efcf112 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/HotelLengthOfStayInfo.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.common.HotelLengthOfStayInfo + */ +class HotelLengthOfStayInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Low end of the number of nights in the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value min_nights = 1; + */ + private $min_nights = null; + /** + * High end of the number of nights in the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value max_nights = 2; + */ + private $max_nights = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * Low end of the number of nights in the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value min_nights = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getMinNights() + { + return $this->min_nights; + } + + /** + * Low end of the number of nights in the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value min_nights = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMinNights($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->min_nights = $var; + + return $this; + } + + /** + * High end of the number of nights in the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value max_nights = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getMaxNights() + { + return $this->max_nights; + } + + /** + * High end of the number of nights in the stay. + * + * Generated from protobuf field .google.protobuf.Int64Value max_nights = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMaxNights($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->max_nights = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/HotelStateInfo.php b/src/Google/Ads/GoogleAds/V0/Common/HotelStateInfo.php new file mode 100644 index 000000000..80f15ba71 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/HotelStateInfo.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.common.HotelStateInfo + */ +class HotelStateInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The Geo Target Constant resource name. + * + * Generated from protobuf field .google.protobuf.StringValue state_criterion = 1; + */ + private $state_criterion = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * The Geo Target Constant resource name. + * + * Generated from protobuf field .google.protobuf.StringValue state_criterion = 1; + * @return \Google\Protobuf\StringValue + */ + public function getStateCriterion() + { + return $this->state_criterion; + } + + /** + * The Geo Target Constant resource name. + * + * Generated from protobuf field .google.protobuf.StringValue state_criterion = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setStateCriterion($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->state_criterion = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/KeywordInfo.php b/src/Google/Ads/GoogleAds/V0/Common/KeywordInfo.php new file mode 100644 index 000000000..b2f93599c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/KeywordInfo.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.common.KeywordInfo + */ +class KeywordInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The text of the keyword (at most 80 characters and 10 words). + * + * Generated from protobuf field .google.protobuf.StringValue text = 1; + */ + private $text = null; + /** + * The match type of the keyword. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2; + */ + private $match_type = 0; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * The text of the keyword (at most 80 characters and 10 words). + * + * Generated from protobuf field .google.protobuf.StringValue text = 1; + * @return \Google\Protobuf\StringValue + */ + public function getText() + { + return $this->text; + } + + /** + * The text of the keyword (at most 80 characters and 10 words). + * + * Generated from protobuf field .google.protobuf.StringValue text = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->text = $var; + + return $this; + } + + /** + * The match type of the keyword. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2; + * @return int + */ + public function getMatchType() + { + return $this->match_type; + } + + /** + * The match type of the keyword. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2; + * @param int $var + * @return $this + */ + public function setMatchType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\KeywordMatchTypeEnum_KeywordMatchType::class); + $this->match_type = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/ListingBrandInfo.php b/src/Google/Ads/GoogleAds/V0/Common/ListingBrandInfo.php new file mode 100644 index 000000000..143350e47 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/ListingBrandInfo.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.common.ListingBrandInfo + */ +class ListingBrandInfo extends \Google\Protobuf\Internal\Message +{ + /** + * String value of the listing brand. + * + * Generated from protobuf field .google.protobuf.StringValue value = 1; + */ + private $value = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * String value of the listing brand. + * + * Generated from protobuf field .google.protobuf.StringValue value = 1; + * @return \Google\Protobuf\StringValue + */ + public function getValue() + { + return $this->value; + } + + /** + * String value of the listing brand. + * + * Generated from protobuf field .google.protobuf.StringValue value = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/ListingCustomAttributeInfo.php b/src/Google/Ads/GoogleAds/V0/Common/ListingCustomAttributeInfo.php new file mode 100644 index 000000000..81a7b166d --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/ListingCustomAttributeInfo.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.common.ListingCustomAttributeInfo + */ +class ListingCustomAttributeInfo extends \Google\Protobuf\Internal\Message +{ + /** + * String value of the listing custom attribute. + * + * Generated from protobuf field .google.protobuf.StringValue value = 1; + */ + private $value = null; + /** + * Indicates the index of the custom attribute. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.ListingCustomAttributeIndexEnum.ListingCustomAttributeIndex index = 2; + */ + private $index = 0; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * String value of the listing custom attribute. + * + * Generated from protobuf field .google.protobuf.StringValue value = 1; + * @return \Google\Protobuf\StringValue + */ + public function getValue() + { + return $this->value; + } + + /** + * String value of the listing custom attribute. + * + * Generated from protobuf field .google.protobuf.StringValue value = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->value = $var; + + return $this; + } + + /** + * Indicates the index of the custom attribute. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.ListingCustomAttributeIndexEnum.ListingCustomAttributeIndex index = 2; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * Indicates the index of the custom attribute. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.ListingCustomAttributeIndexEnum.ListingCustomAttributeIndex index = 2; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\ListingCustomAttributeIndexEnum_ListingCustomAttributeIndex::class); + $this->index = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/ListingDimensionInfo.php b/src/Google/Ads/GoogleAds/V0/Common/ListingDimensionInfo.php new file mode 100644 index 000000000..3b2a289fe --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/ListingDimensionInfo.php @@ -0,0 +1,216 @@ +google.ads.googleads.v0.common.ListingDimensionInfo + */ +class ListingDimensionInfo extends \Google\Protobuf\Internal\Message +{ + protected $dimension; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * Brand of the listing. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ListingBrandInfo listing_brand = 1; + * @return \Google\Ads\GoogleAds\V0\Common\ListingBrandInfo + */ + public function getListingBrand() + { + return $this->readOneof(1); + } + + /** + * Brand of the listing. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ListingBrandInfo listing_brand = 1; + * @param \Google\Ads\GoogleAds\V0\Common\ListingBrandInfo $var + * @return $this + */ + public function setListingBrand($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\ListingBrandInfo::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Advertiser-specific hotel ID. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelIdInfo hotel_id = 2; + * @return \Google\Ads\GoogleAds\V0\Common\HotelIdInfo + */ + public function getHotelId() + { + return $this->readOneof(2); + } + + /** + * Advertiser-specific hotel ID. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelIdInfo hotel_id = 2; + * @param \Google\Ads\GoogleAds\V0\Common\HotelIdInfo $var + * @return $this + */ + public function setHotelId($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\HotelIdInfo::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Class of the hotel as a number of stars 1 to 5. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelClassInfo hotel_class = 3; + * @return \Google\Ads\GoogleAds\V0\Common\HotelClassInfo + */ + public function getHotelClass() + { + return $this->readOneof(3); + } + + /** + * Class of the hotel as a number of stars 1 to 5. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelClassInfo hotel_class = 3; + * @param \Google\Ads\GoogleAds\V0\Common\HotelClassInfo $var + * @return $this + */ + public function setHotelClass($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\HotelClassInfo::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Country or Region the hotel is located in. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelCountryRegionInfo hotel_country_region = 4; + * @return \Google\Ads\GoogleAds\V0\Common\HotelCountryRegionInfo + */ + public function getHotelCountryRegion() + { + return $this->readOneof(4); + } + + /** + * Country or Region the hotel is located in. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelCountryRegionInfo hotel_country_region = 4; + * @param \Google\Ads\GoogleAds\V0\Common\HotelCountryRegionInfo $var + * @return $this + */ + public function setHotelCountryRegion($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\HotelCountryRegionInfo::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * State the hotel is located in. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelStateInfo hotel_state = 5; + * @return \Google\Ads\GoogleAds\V0\Common\HotelStateInfo + */ + public function getHotelState() + { + return $this->readOneof(5); + } + + /** + * State the hotel is located in. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelStateInfo hotel_state = 5; + * @param \Google\Ads\GoogleAds\V0\Common\HotelStateInfo $var + * @return $this + */ + public function setHotelState($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\HotelStateInfo::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * City the hotel is located in. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelCityInfo hotel_city = 6; + * @return \Google\Ads\GoogleAds\V0\Common\HotelCityInfo + */ + public function getHotelCity() + { + return $this->readOneof(6); + } + + /** + * City the hotel is located in. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelCityInfo hotel_city = 6; + * @param \Google\Ads\GoogleAds\V0\Common\HotelCityInfo $var + * @return $this + */ + public function setHotelCity($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\HotelCityInfo::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Listing custom attribute. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ListingCustomAttributeInfo listing_custom_attribute = 7; + * @return \Google\Ads\GoogleAds\V0\Common\ListingCustomAttributeInfo + */ + public function getListingCustomAttribute() + { + return $this->readOneof(7); + } + + /** + * Listing custom attribute. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ListingCustomAttributeInfo listing_custom_attribute = 7; + * @param \Google\Ads\GoogleAds\V0\Common\ListingCustomAttributeInfo $var + * @return $this + */ + public function setListingCustomAttribute($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\ListingCustomAttributeInfo::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getDimension() + { + return $this->whichOneof("dimension"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/ListingGroupInfo.php b/src/Google/Ads/GoogleAds/V0/Common/ListingGroupInfo.php new file mode 100644 index 000000000..6f19de40f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/ListingGroupInfo.php @@ -0,0 +1,124 @@ +google.ads.googleads.v0.common.ListingGroupInfo + */ +class ListingGroupInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the listing group. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.ListingGroupTypeEnum.ListingGroupType type = 1; + */ + private $type = 0; + /** + * Dimension value with which this listing group is refining its parent. + * Undefined for the root group. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ListingDimensionInfo case_value = 2; + */ + private $case_value = null; + /** + * ID of the parent listing group subdivision. Undefined for the root group. + * + * Generated from protobuf field .google.protobuf.Int64Value parent_criterion_id = 3; + */ + private $parent_criterion_id = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + + /** + * Type of the listing group. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.ListingGroupTypeEnum.ListingGroupType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of the listing group. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.ListingGroupTypeEnum.ListingGroupType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\ListingGroupTypeEnum_ListingGroupType::class); + $this->type = $var; + + return $this; + } + + /** + * Dimension value with which this listing group is refining its parent. + * Undefined for the root group. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ListingDimensionInfo case_value = 2; + * @return \Google\Ads\GoogleAds\V0\Common\ListingDimensionInfo + */ + public function getCaseValue() + { + return $this->case_value; + } + + /** + * Dimension value with which this listing group is refining its parent. + * Undefined for the root group. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ListingDimensionInfo case_value = 2; + * @param \Google\Ads\GoogleAds\V0\Common\ListingDimensionInfo $var + * @return $this + */ + public function setCaseValue($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\ListingDimensionInfo::class); + $this->case_value = $var; + + return $this; + } + + /** + * ID of the parent listing group subdivision. Undefined for the root group. + * + * Generated from protobuf field .google.protobuf.Int64Value parent_criterion_id = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getParentCriterionId() + { + return $this->parent_criterion_id; + } + + /** + * ID of the parent listing group subdivision. Undefined for the root group. + * + * Generated from protobuf field .google.protobuf.Int64Value parent_criterion_id = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setParentCriterionId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->parent_criterion_id = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/LocationInfo.php b/src/Google/Ads/GoogleAds/V0/Common/LocationInfo.php new file mode 100644 index 000000000..1ddfc479c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/LocationInfo.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.common.LocationInfo + */ +class LocationInfo extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/ManualCpc.php b/src/Google/Ads/GoogleAds/V0/Common/ManualCpc.php new file mode 100644 index 000000000..e2c54d77d --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/ManualCpc.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.common.ManualCpc + */ +class ManualCpc extends \Google\Protobuf\Internal\Message +{ + /** + * Whether bids are to be enhanced based on conversion optimizer data. + * + * Generated from protobuf field .google.protobuf.BoolValue enhanced_cpc_enabled = 1; + */ + private $enhanced_cpc_enabled = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Bidding::initOnce(); + parent::__construct(); + } + + /** + * Whether bids are to be enhanced based on conversion optimizer data. + * + * Generated from protobuf field .google.protobuf.BoolValue enhanced_cpc_enabled = 1; + * @return \Google\Protobuf\BoolValue + */ + public function getEnhancedCpcEnabled() + { + return $this->enhanced_cpc_enabled; + } + + /** + * Whether bids are to be enhanced based on conversion optimizer data. + * + * Generated from protobuf field .google.protobuf.BoolValue enhanced_cpc_enabled = 1; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnhancedCpcEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enhanced_cpc_enabled = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/ManualCpm.php b/src/Google/Ads/GoogleAds/V0/Common/ManualCpm.php new file mode 100644 index 000000000..a64be6928 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/ManualCpm.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.common.ManualCpm + */ +class ManualCpm extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Bidding::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/MaximizeConversionValue.php b/src/Google/Ads/GoogleAds/V0/Common/MaximizeConversionValue.php new file mode 100644 index 000000000..fb4789e69 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/MaximizeConversionValue.php @@ -0,0 +1,70 @@ +google.ads.googleads.v0.common.MaximizeConversionValue + */ +class MaximizeConversionValue extends \Google\Protobuf\Internal\Message +{ + /** + * The target return on ad spend (ROAS) option. If set, the bid strategy will + * maximize revenue while averaging the target return on ad spend. If the + * target ROAS is high, the bid strategy may not be able to spend the full + * budget. If the target ROAS is not set, the bid strategy will aim to + * achieve the highest possible ROAS for the budget. + * + * Generated from protobuf field .google.protobuf.DoubleValue target_roas = 1; + */ + private $target_roas = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Bidding::initOnce(); + parent::__construct(); + } + + /** + * The target return on ad spend (ROAS) option. If set, the bid strategy will + * maximize revenue while averaging the target return on ad spend. If the + * target ROAS is high, the bid strategy may not be able to spend the full + * budget. If the target ROAS is not set, the bid strategy will aim to + * achieve the highest possible ROAS for the budget. + * + * Generated from protobuf field .google.protobuf.DoubleValue target_roas = 1; + * @return \Google\Protobuf\DoubleValue + */ + public function getTargetRoas() + { + return $this->target_roas; + } + + /** + * The target return on ad spend (ROAS) option. If set, the bid strategy will + * maximize revenue while averaging the target return on ad spend. If the + * target ROAS is high, the bid strategy may not be able to spend the full + * budget. If the target ROAS is not set, the bid strategy will aim to + * achieve the highest possible ROAS for the budget. + * + * Generated from protobuf field .google.protobuf.DoubleValue target_roas = 1; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setTargetRoas($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->target_roas = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/MaximizeConversions.php b/src/Google/Ads/GoogleAds/V0/Common/MaximizeConversions.php new file mode 100644 index 000000000..7e2859dc2 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/MaximizeConversions.php @@ -0,0 +1,26 @@ +google.ads.googleads.v0.common.MaximizeConversions + */ +class MaximizeConversions extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Bidding::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/Metrics.php b/src/Google/Ads/GoogleAds/V0/Common/Metrics.php new file mode 100644 index 000000000..71ca7f259 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/Metrics.php @@ -0,0 +1,1551 @@ +google.ads.googleads.v0.common.Metrics + */ +class Metrics extends \Google\Protobuf\Internal\Message +{ + /** + * All conversions divided by the number of ad interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversion_rate = 5; + */ + private $all_conversion_rate = null; + /** + * The total value of all conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversion_value = 6; + */ + private $all_conversion_value = null; + /** + * The total number of conversions. This includes "Conversions" plus + * conversions that have their "Include in Conversions" setting unchecked. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversions = 7; + */ + private $all_conversions = null; + /** + * The value of all conversions divided by the total cost of ad interactions + * (such as clicks for text ads or views for video ads). + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversions_value_per_cost = 62; + */ + private $all_conversions_value_per_cost = null; + /** + * The value of all conversions divided by the total number of interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversions_value_per_interaction = 61; + */ + private $all_conversions_value_per_interaction = null; + /** + * The average amount you pay per interaction. This amount is the total cost + * of your ads divided by the total number of interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue average_cost = 8; + */ + private $average_cost = null; + /** + * The total cost of all clicks divided by the total number of clicks + * received. + * + * Generated from protobuf field .google.protobuf.DoubleValue average_cpc = 9; + */ + private $average_cpc = null; + /** + * Average cost-per-thousand impressions (CPM). + * + * Generated from protobuf field .google.protobuf.DoubleValue average_cpm = 10; + */ + private $average_cpm = null; + /** + * Your ad's position relative to those of other advertisers. + * + * Generated from protobuf field .google.protobuf.DoubleValue average_position = 13; + */ + private $average_position = null; + /** + * Percentage of clicks where the user only visited a single page on your + * site. Imported from Google Analytics. + * + * Generated from protobuf field .google.protobuf.DoubleValue bounce_rate = 15; + */ + private $bounce_rate = null; + /** + * The number of clicks. + * + * Generated from protobuf field .google.protobuf.Int64Value clicks = 19; + */ + private $clicks = null; + /** + * The estimated percent of times that your ad was eligible to show + * on the Display Network but didn't because your budget was too low. + * Note: Content budget lost impression share is reported in the range of 0 + * to 0.9. Any value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue content_budget_lost_impression_share = 20; + */ + private $content_budget_lost_impression_share = null; + /** + * The impressions you've received on the Display Network divided + * by the estimated number of impressions you were eligible to receive. + * Note: Content impression share is reported in the range of 0.1 to 1. Any + * value below 0.1 is reported as 0.0999. + * + * Generated from protobuf field .google.protobuf.DoubleValue content_impression_share = 21; + */ + private $content_impression_share = null; + /** + * The estimated percentage of impressions on the Display Network + * that your ads didn't receive due to poor Ad Rank. + * Note: Content rank lost impression share is reported in the range of 0 + * to 0.9. Any value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue content_rank_lost_impression_share = 22; + */ + private $content_rank_lost_impression_share = null; + /** + * Conversions divided by the number of ad interactions (such as clicks for + * text ads or views for video ads). + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_rate = 23; + */ + private $conversion_rate = null; + /** + * The total value of conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_value = 24; + */ + private $conversion_value = null; + /** + * The value of conversions divided by the cost of ad interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_value_per_cost = 64; + */ + private $conversion_value_per_cost = null; + /** + * The value of conversions divided by the number of ad interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_value_per_interaction = 63; + */ + private $conversion_value_per_interaction = null; + /** + * The number of conversions. This only includes conversion actions which have + * "Include in Conversions" checked. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversions = 25; + */ + private $conversions = null; + /** + * The sum of your cost-per-click (CPC) and cost-per-thousand impressions + * (CPM) costs during this period. + * + * Generated from protobuf field .google.protobuf.Int64Value cost_micros = 26; + */ + private $cost_micros = null; + /** + * The cost of ad interactions divided by all conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue cost_per_all_conversion = 27; + */ + private $cost_per_all_conversion = null; + /** + * The cost of ad interactions divided by conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue cost_per_conversion = 28; + */ + private $cost_per_conversion = null; + /** + * Conversions from when a customer clicks on an AdWords ad on one device, + * then converts on a different device or browser. + * Cross-device conversions are already included in all_conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue cross_device_conversions = 29; + */ + private $cross_device_conversions = null; + /** + * The number of clicks your ad receives (Clicks) divided by the number + * of times your ad is shown (Impressions). + * + * Generated from protobuf field .google.protobuf.DoubleValue ctr = 30; + */ + private $ctr = null; + /** + * How often people engage with your ad after it's shown to them. This is the + * number of ad expansions divided by the number of times your ad is shown. + * + * Generated from protobuf field .google.protobuf.DoubleValue engagement_rate = 31; + */ + private $engagement_rate = null; + /** + * The number of engagements. + * An engagement occurs when a viewer expands your Lightbox ad. Also, in the + * future, other ad types may support engagement metrics. + * + * Generated from protobuf field .google.protobuf.Int64Value engagements = 32; + */ + private $engagements = null; + /** + * Count of how often your ad has appeared on a search results page or + * website on the Google Network. + * + * Generated from protobuf field .google.protobuf.Int64Value impressions = 37; + */ + private $impressions = null; + /** + * How often people interact with your ad after it is shown to them. + * This is the number of interactions divided by the number of times your ad + * is shown. + * + * Generated from protobuf field .google.protobuf.DoubleValue interaction_rate = 38; + */ + private $interaction_rate = null; + /** + * The number of interactions. + * An interaction is the main user action associated with an ad format-clicks + * for text and shopping ads, views for video ads, and so on. + * + * Generated from protobuf field .google.protobuf.Int64Value interactions = 39; + */ + private $interactions = null; + /** + * The percentage of clicks filtered out of your total number of clicks + * (filtered + non-filtered clicks) during the reporting period. + * + * Generated from protobuf field .google.protobuf.DoubleValue invalid_click_rate = 40; + */ + private $invalid_click_rate = null; + /** + * Number of clicks Google considers illegitimate and doesn't charge you for. + * + * Generated from protobuf field .google.protobuf.Int64Value invalid_clicks = 41; + */ + private $invalid_clicks = null; + /** + * Percentage of first-time sessions (from people who had never visited your + * site before). Imported from Google Analytics. + * + * Generated from protobuf field .google.protobuf.DoubleValue percent_new_visitors = 42; + */ + private $percent_new_visitors = null; + /** + * Number of offline phone calls. + * + * Generated from protobuf field .google.protobuf.Int64Value phone_calls = 43; + */ + private $phone_calls = null; + /** + * Number of offline phone impressions. + * + * Generated from protobuf field .google.protobuf.Int64Value phone_impressions = 44; + */ + private $phone_impressions = null; + /** + * Number of phone calls received (phone_calls) divided by the number of + * times your phone number is shown (phone_impressions). + * + * Generated from protobuf field .google.protobuf.DoubleValue phone_through_rate = 45; + */ + private $phone_through_rate = null; + /** + * Your clickthrough rate (Ctr) divided by the average clickthrough rate of + * all advertisers on the websites that show your ads. Measures how your ads + * perform on Display Network sites compared to other ads on the same sites. + * + * Generated from protobuf field .google.protobuf.DoubleValue relative_ctr = 46; + */ + private $relative_ctr = null; + /** + * The estimated percent of times that your ad was eligible to show on the + * Search Network but didn't because your budget was too low. Note: Search + * budget lost impression share is reported in the range of 0 to 0.9. Any + * value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_budget_lost_impression_share = 47; + */ + private $search_budget_lost_impression_share = null; + /** + * The impressions you've received divided by the estimated number of + * impressions you were eligible to receive on the Search Network for search + * terms that matched your keywords exactly (or were close variants of your + * keyword), regardless of your keyword match types. Note: Search exact match + * impression share is reported in the range of 0.1 to 1. Any value below 0.1 + * is reported as 0.0999. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_exact_match_impression_share = 49; + */ + private $search_exact_match_impression_share = null; + /** + * The impressions you've received on the Search Network divided + * by the estimated number of impressions you were eligible to receive. + * Note: Search impression share is reported in the range of 0.1 to 1. Any + * value below 0.1 is reported as 0.0999. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_impression_share = 50; + */ + private $search_impression_share = null; + /** + * The estimated percentage of impressions on the Search Network + * that your ads didn't receive due to poor Ad Rank. + * Note: Search rank lost impression share is reported in the range of 0 to + * 0.9. Any value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_rank_lost_impression_share = 51; + */ + private $search_rank_lost_impression_share = null; + /** + * The value of all conversions divided by the number of all conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue value_per_all_conversions = 52; + */ + private $value_per_all_conversions = null; + /** + * The value of conversions divided by the number of conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue value_per_conversion = 53; + */ + private $value_per_conversion = null; + /** + * The total number of view-through conversions. + * These happen when a customer sees an image or rich media ad, then later + * completes a conversion on your site without interacting with (e.g., + * clicking on) another ad. + * + * Generated from protobuf field .google.protobuf.Int64Value view_through_conversions = 60; + */ + private $view_through_conversions = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Metrics::initOnce(); + parent::__construct(); + } + + /** + * All conversions divided by the number of ad interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversion_rate = 5; + * @return \Google\Protobuf\DoubleValue + */ + public function getAllConversionRate() + { + return $this->all_conversion_rate; + } + + /** + * All conversions divided by the number of ad interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversion_rate = 5; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAllConversionRate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->all_conversion_rate = $var; + + return $this; + } + + /** + * The total value of all conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversion_value = 6; + * @return \Google\Protobuf\DoubleValue + */ + public function getAllConversionValue() + { + return $this->all_conversion_value; + } + + /** + * The total value of all conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversion_value = 6; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAllConversionValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->all_conversion_value = $var; + + return $this; + } + + /** + * The total number of conversions. This includes "Conversions" plus + * conversions that have their "Include in Conversions" setting unchecked. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversions = 7; + * @return \Google\Protobuf\DoubleValue + */ + public function getAllConversions() + { + return $this->all_conversions; + } + + /** + * The total number of conversions. This includes "Conversions" plus + * conversions that have their "Include in Conversions" setting unchecked. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversions = 7; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAllConversions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->all_conversions = $var; + + return $this; + } + + /** + * The value of all conversions divided by the total cost of ad interactions + * (such as clicks for text ads or views for video ads). + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversions_value_per_cost = 62; + * @return \Google\Protobuf\DoubleValue + */ + public function getAllConversionsValuePerCost() + { + return $this->all_conversions_value_per_cost; + } + + /** + * The value of all conversions divided by the total cost of ad interactions + * (such as clicks for text ads or views for video ads). + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversions_value_per_cost = 62; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAllConversionsValuePerCost($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->all_conversions_value_per_cost = $var; + + return $this; + } + + /** + * The value of all conversions divided by the total number of interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversions_value_per_interaction = 61; + * @return \Google\Protobuf\DoubleValue + */ + public function getAllConversionsValuePerInteraction() + { + return $this->all_conversions_value_per_interaction; + } + + /** + * The value of all conversions divided by the total number of interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue all_conversions_value_per_interaction = 61; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAllConversionsValuePerInteraction($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->all_conversions_value_per_interaction = $var; + + return $this; + } + + /** + * The average amount you pay per interaction. This amount is the total cost + * of your ads divided by the total number of interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue average_cost = 8; + * @return \Google\Protobuf\DoubleValue + */ + public function getAverageCost() + { + return $this->average_cost; + } + + /** + * The average amount you pay per interaction. This amount is the total cost + * of your ads divided by the total number of interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue average_cost = 8; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAverageCost($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->average_cost = $var; + + return $this; + } + + /** + * The total cost of all clicks divided by the total number of clicks + * received. + * + * Generated from protobuf field .google.protobuf.DoubleValue average_cpc = 9; + * @return \Google\Protobuf\DoubleValue + */ + public function getAverageCpc() + { + return $this->average_cpc; + } + + /** + * The total cost of all clicks divided by the total number of clicks + * received. + * + * Generated from protobuf field .google.protobuf.DoubleValue average_cpc = 9; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAverageCpc($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->average_cpc = $var; + + return $this; + } + + /** + * Average cost-per-thousand impressions (CPM). + * + * Generated from protobuf field .google.protobuf.DoubleValue average_cpm = 10; + * @return \Google\Protobuf\DoubleValue + */ + public function getAverageCpm() + { + return $this->average_cpm; + } + + /** + * Average cost-per-thousand impressions (CPM). + * + * Generated from protobuf field .google.protobuf.DoubleValue average_cpm = 10; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAverageCpm($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->average_cpm = $var; + + return $this; + } + + /** + * Your ad's position relative to those of other advertisers. + * + * Generated from protobuf field .google.protobuf.DoubleValue average_position = 13; + * @return \Google\Protobuf\DoubleValue + */ + public function getAveragePosition() + { + return $this->average_position; + } + + /** + * Your ad's position relative to those of other advertisers. + * + * Generated from protobuf field .google.protobuf.DoubleValue average_position = 13; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAveragePosition($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->average_position = $var; + + return $this; + } + + /** + * Percentage of clicks where the user only visited a single page on your + * site. Imported from Google Analytics. + * + * Generated from protobuf field .google.protobuf.DoubleValue bounce_rate = 15; + * @return \Google\Protobuf\DoubleValue + */ + public function getBounceRate() + { + return $this->bounce_rate; + } + + /** + * Percentage of clicks where the user only visited a single page on your + * site. Imported from Google Analytics. + * + * Generated from protobuf field .google.protobuf.DoubleValue bounce_rate = 15; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setBounceRate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->bounce_rate = $var; + + return $this; + } + + /** + * The number of clicks. + * + * Generated from protobuf field .google.protobuf.Int64Value clicks = 19; + * @return \Google\Protobuf\Int64Value + */ + public function getClicks() + { + return $this->clicks; + } + + /** + * The number of clicks. + * + * Generated from protobuf field .google.protobuf.Int64Value clicks = 19; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setClicks($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->clicks = $var; + + return $this; + } + + /** + * The estimated percent of times that your ad was eligible to show + * on the Display Network but didn't because your budget was too low. + * Note: Content budget lost impression share is reported in the range of 0 + * to 0.9. Any value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue content_budget_lost_impression_share = 20; + * @return \Google\Protobuf\DoubleValue + */ + public function getContentBudgetLostImpressionShare() + { + return $this->content_budget_lost_impression_share; + } + + /** + * The estimated percent of times that your ad was eligible to show + * on the Display Network but didn't because your budget was too low. + * Note: Content budget lost impression share is reported in the range of 0 + * to 0.9. Any value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue content_budget_lost_impression_share = 20; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setContentBudgetLostImpressionShare($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->content_budget_lost_impression_share = $var; + + return $this; + } + + /** + * The impressions you've received on the Display Network divided + * by the estimated number of impressions you were eligible to receive. + * Note: Content impression share is reported in the range of 0.1 to 1. Any + * value below 0.1 is reported as 0.0999. + * + * Generated from protobuf field .google.protobuf.DoubleValue content_impression_share = 21; + * @return \Google\Protobuf\DoubleValue + */ + public function getContentImpressionShare() + { + return $this->content_impression_share; + } + + /** + * The impressions you've received on the Display Network divided + * by the estimated number of impressions you were eligible to receive. + * Note: Content impression share is reported in the range of 0.1 to 1. Any + * value below 0.1 is reported as 0.0999. + * + * Generated from protobuf field .google.protobuf.DoubleValue content_impression_share = 21; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setContentImpressionShare($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->content_impression_share = $var; + + return $this; + } + + /** + * The estimated percentage of impressions on the Display Network + * that your ads didn't receive due to poor Ad Rank. + * Note: Content rank lost impression share is reported in the range of 0 + * to 0.9. Any value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue content_rank_lost_impression_share = 22; + * @return \Google\Protobuf\DoubleValue + */ + public function getContentRankLostImpressionShare() + { + return $this->content_rank_lost_impression_share; + } + + /** + * The estimated percentage of impressions on the Display Network + * that your ads didn't receive due to poor Ad Rank. + * Note: Content rank lost impression share is reported in the range of 0 + * to 0.9. Any value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue content_rank_lost_impression_share = 22; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setContentRankLostImpressionShare($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->content_rank_lost_impression_share = $var; + + return $this; + } + + /** + * Conversions divided by the number of ad interactions (such as clicks for + * text ads or views for video ads). + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_rate = 23; + * @return \Google\Protobuf\DoubleValue + */ + public function getConversionRate() + { + return $this->conversion_rate; + } + + /** + * Conversions divided by the number of ad interactions (such as clicks for + * text ads or views for video ads). + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_rate = 23; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setConversionRate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->conversion_rate = $var; + + return $this; + } + + /** + * The total value of conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_value = 24; + * @return \Google\Protobuf\DoubleValue + */ + public function getConversionValue() + { + return $this->conversion_value; + } + + /** + * The total value of conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_value = 24; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setConversionValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->conversion_value = $var; + + return $this; + } + + /** + * The value of conversions divided by the cost of ad interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_value_per_cost = 64; + * @return \Google\Protobuf\DoubleValue + */ + public function getConversionValuePerCost() + { + return $this->conversion_value_per_cost; + } + + /** + * The value of conversions divided by the cost of ad interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_value_per_cost = 64; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setConversionValuePerCost($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->conversion_value_per_cost = $var; + + return $this; + } + + /** + * The value of conversions divided by the number of ad interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_value_per_interaction = 63; + * @return \Google\Protobuf\DoubleValue + */ + public function getConversionValuePerInteraction() + { + return $this->conversion_value_per_interaction; + } + + /** + * The value of conversions divided by the number of ad interactions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversion_value_per_interaction = 63; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setConversionValuePerInteraction($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->conversion_value_per_interaction = $var; + + return $this; + } + + /** + * The number of conversions. This only includes conversion actions which have + * "Include in Conversions" checked. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversions = 25; + * @return \Google\Protobuf\DoubleValue + */ + public function getConversions() + { + return $this->conversions; + } + + /** + * The number of conversions. This only includes conversion actions which have + * "Include in Conversions" checked. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversions = 25; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setConversions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->conversions = $var; + + return $this; + } + + /** + * The sum of your cost-per-click (CPC) and cost-per-thousand impressions + * (CPM) costs during this period. + * + * Generated from protobuf field .google.protobuf.Int64Value cost_micros = 26; + * @return \Google\Protobuf\Int64Value + */ + public function getCostMicros() + { + return $this->cost_micros; + } + + /** + * The sum of your cost-per-click (CPC) and cost-per-thousand impressions + * (CPM) costs during this period. + * + * Generated from protobuf field .google.protobuf.Int64Value cost_micros = 26; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCostMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cost_micros = $var; + + return $this; + } + + /** + * The cost of ad interactions divided by all conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue cost_per_all_conversion = 27; + * @return \Google\Protobuf\DoubleValue + */ + public function getCostPerAllConversion() + { + return $this->cost_per_all_conversion; + } + + /** + * The cost of ad interactions divided by all conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue cost_per_all_conversion = 27; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setCostPerAllConversion($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->cost_per_all_conversion = $var; + + return $this; + } + + /** + * The cost of ad interactions divided by conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue cost_per_conversion = 28; + * @return \Google\Protobuf\DoubleValue + */ + public function getCostPerConversion() + { + return $this->cost_per_conversion; + } + + /** + * The cost of ad interactions divided by conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue cost_per_conversion = 28; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setCostPerConversion($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->cost_per_conversion = $var; + + return $this; + } + + /** + * Conversions from when a customer clicks on an AdWords ad on one device, + * then converts on a different device or browser. + * Cross-device conversions are already included in all_conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue cross_device_conversions = 29; + * @return \Google\Protobuf\DoubleValue + */ + public function getCrossDeviceConversions() + { + return $this->cross_device_conversions; + } + + /** + * Conversions from when a customer clicks on an AdWords ad on one device, + * then converts on a different device or browser. + * Cross-device conversions are already included in all_conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue cross_device_conversions = 29; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setCrossDeviceConversions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->cross_device_conversions = $var; + + return $this; + } + + /** + * The number of clicks your ad receives (Clicks) divided by the number + * of times your ad is shown (Impressions). + * + * Generated from protobuf field .google.protobuf.DoubleValue ctr = 30; + * @return \Google\Protobuf\DoubleValue + */ + public function getCtr() + { + return $this->ctr; + } + + /** + * The number of clicks your ad receives (Clicks) divided by the number + * of times your ad is shown (Impressions). + * + * Generated from protobuf field .google.protobuf.DoubleValue ctr = 30; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setCtr($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->ctr = $var; + + return $this; + } + + /** + * How often people engage with your ad after it's shown to them. This is the + * number of ad expansions divided by the number of times your ad is shown. + * + * Generated from protobuf field .google.protobuf.DoubleValue engagement_rate = 31; + * @return \Google\Protobuf\DoubleValue + */ + public function getEngagementRate() + { + return $this->engagement_rate; + } + + /** + * How often people engage with your ad after it's shown to them. This is the + * number of ad expansions divided by the number of times your ad is shown. + * + * Generated from protobuf field .google.protobuf.DoubleValue engagement_rate = 31; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setEngagementRate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->engagement_rate = $var; + + return $this; + } + + /** + * The number of engagements. + * An engagement occurs when a viewer expands your Lightbox ad. Also, in the + * future, other ad types may support engagement metrics. + * + * Generated from protobuf field .google.protobuf.Int64Value engagements = 32; + * @return \Google\Protobuf\Int64Value + */ + public function getEngagements() + { + return $this->engagements; + } + + /** + * The number of engagements. + * An engagement occurs when a viewer expands your Lightbox ad. Also, in the + * future, other ad types may support engagement metrics. + * + * Generated from protobuf field .google.protobuf.Int64Value engagements = 32; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setEngagements($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->engagements = $var; + + return $this; + } + + /** + * Count of how often your ad has appeared on a search results page or + * website on the Google Network. + * + * Generated from protobuf field .google.protobuf.Int64Value impressions = 37; + * @return \Google\Protobuf\Int64Value + */ + public function getImpressions() + { + return $this->impressions; + } + + /** + * Count of how often your ad has appeared on a search results page or + * website on the Google Network. + * + * Generated from protobuf field .google.protobuf.Int64Value impressions = 37; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setImpressions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->impressions = $var; + + return $this; + } + + /** + * How often people interact with your ad after it is shown to them. + * This is the number of interactions divided by the number of times your ad + * is shown. + * + * Generated from protobuf field .google.protobuf.DoubleValue interaction_rate = 38; + * @return \Google\Protobuf\DoubleValue + */ + public function getInteractionRate() + { + return $this->interaction_rate; + } + + /** + * How often people interact with your ad after it is shown to them. + * This is the number of interactions divided by the number of times your ad + * is shown. + * + * Generated from protobuf field .google.protobuf.DoubleValue interaction_rate = 38; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setInteractionRate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->interaction_rate = $var; + + return $this; + } + + /** + * The number of interactions. + * An interaction is the main user action associated with an ad format-clicks + * for text and shopping ads, views for video ads, and so on. + * + * Generated from protobuf field .google.protobuf.Int64Value interactions = 39; + * @return \Google\Protobuf\Int64Value + */ + public function getInteractions() + { + return $this->interactions; + } + + /** + * The number of interactions. + * An interaction is the main user action associated with an ad format-clicks + * for text and shopping ads, views for video ads, and so on. + * + * Generated from protobuf field .google.protobuf.Int64Value interactions = 39; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setInteractions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->interactions = $var; + + return $this; + } + + /** + * The percentage of clicks filtered out of your total number of clicks + * (filtered + non-filtered clicks) during the reporting period. + * + * Generated from protobuf field .google.protobuf.DoubleValue invalid_click_rate = 40; + * @return \Google\Protobuf\DoubleValue + */ + public function getInvalidClickRate() + { + return $this->invalid_click_rate; + } + + /** + * The percentage of clicks filtered out of your total number of clicks + * (filtered + non-filtered clicks) during the reporting period. + * + * Generated from protobuf field .google.protobuf.DoubleValue invalid_click_rate = 40; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setInvalidClickRate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->invalid_click_rate = $var; + + return $this; + } + + /** + * Number of clicks Google considers illegitimate and doesn't charge you for. + * + * Generated from protobuf field .google.protobuf.Int64Value invalid_clicks = 41; + * @return \Google\Protobuf\Int64Value + */ + public function getInvalidClicks() + { + return $this->invalid_clicks; + } + + /** + * Number of clicks Google considers illegitimate and doesn't charge you for. + * + * Generated from protobuf field .google.protobuf.Int64Value invalid_clicks = 41; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setInvalidClicks($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->invalid_clicks = $var; + + return $this; + } + + /** + * Percentage of first-time sessions (from people who had never visited your + * site before). Imported from Google Analytics. + * + * Generated from protobuf field .google.protobuf.DoubleValue percent_new_visitors = 42; + * @return \Google\Protobuf\DoubleValue + */ + public function getPercentNewVisitors() + { + return $this->percent_new_visitors; + } + + /** + * Percentage of first-time sessions (from people who had never visited your + * site before). Imported from Google Analytics. + * + * Generated from protobuf field .google.protobuf.DoubleValue percent_new_visitors = 42; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setPercentNewVisitors($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->percent_new_visitors = $var; + + return $this; + } + + /** + * Number of offline phone calls. + * + * Generated from protobuf field .google.protobuf.Int64Value phone_calls = 43; + * @return \Google\Protobuf\Int64Value + */ + public function getPhoneCalls() + { + return $this->phone_calls; + } + + /** + * Number of offline phone calls. + * + * Generated from protobuf field .google.protobuf.Int64Value phone_calls = 43; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPhoneCalls($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->phone_calls = $var; + + return $this; + } + + /** + * Number of offline phone impressions. + * + * Generated from protobuf field .google.protobuf.Int64Value phone_impressions = 44; + * @return \Google\Protobuf\Int64Value + */ + public function getPhoneImpressions() + { + return $this->phone_impressions; + } + + /** + * Number of offline phone impressions. + * + * Generated from protobuf field .google.protobuf.Int64Value phone_impressions = 44; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setPhoneImpressions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->phone_impressions = $var; + + return $this; + } + + /** + * Number of phone calls received (phone_calls) divided by the number of + * times your phone number is shown (phone_impressions). + * + * Generated from protobuf field .google.protobuf.DoubleValue phone_through_rate = 45; + * @return \Google\Protobuf\DoubleValue + */ + public function getPhoneThroughRate() + { + return $this->phone_through_rate; + } + + /** + * Number of phone calls received (phone_calls) divided by the number of + * times your phone number is shown (phone_impressions). + * + * Generated from protobuf field .google.protobuf.DoubleValue phone_through_rate = 45; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setPhoneThroughRate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->phone_through_rate = $var; + + return $this; + } + + /** + * Your clickthrough rate (Ctr) divided by the average clickthrough rate of + * all advertisers on the websites that show your ads. Measures how your ads + * perform on Display Network sites compared to other ads on the same sites. + * + * Generated from protobuf field .google.protobuf.DoubleValue relative_ctr = 46; + * @return \Google\Protobuf\DoubleValue + */ + public function getRelativeCtr() + { + return $this->relative_ctr; + } + + /** + * Your clickthrough rate (Ctr) divided by the average clickthrough rate of + * all advertisers on the websites that show your ads. Measures how your ads + * perform on Display Network sites compared to other ads on the same sites. + * + * Generated from protobuf field .google.protobuf.DoubleValue relative_ctr = 46; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setRelativeCtr($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->relative_ctr = $var; + + return $this; + } + + /** + * The estimated percent of times that your ad was eligible to show on the + * Search Network but didn't because your budget was too low. Note: Search + * budget lost impression share is reported in the range of 0 to 0.9. Any + * value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_budget_lost_impression_share = 47; + * @return \Google\Protobuf\DoubleValue + */ + public function getSearchBudgetLostImpressionShare() + { + return $this->search_budget_lost_impression_share; + } + + /** + * The estimated percent of times that your ad was eligible to show on the + * Search Network but didn't because your budget was too low. Note: Search + * budget lost impression share is reported in the range of 0 to 0.9. Any + * value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_budget_lost_impression_share = 47; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setSearchBudgetLostImpressionShare($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->search_budget_lost_impression_share = $var; + + return $this; + } + + /** + * The impressions you've received divided by the estimated number of + * impressions you were eligible to receive on the Search Network for search + * terms that matched your keywords exactly (or were close variants of your + * keyword), regardless of your keyword match types. Note: Search exact match + * impression share is reported in the range of 0.1 to 1. Any value below 0.1 + * is reported as 0.0999. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_exact_match_impression_share = 49; + * @return \Google\Protobuf\DoubleValue + */ + public function getSearchExactMatchImpressionShare() + { + return $this->search_exact_match_impression_share; + } + + /** + * The impressions you've received divided by the estimated number of + * impressions you were eligible to receive on the Search Network for search + * terms that matched your keywords exactly (or were close variants of your + * keyword), regardless of your keyword match types. Note: Search exact match + * impression share is reported in the range of 0.1 to 1. Any value below 0.1 + * is reported as 0.0999. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_exact_match_impression_share = 49; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setSearchExactMatchImpressionShare($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->search_exact_match_impression_share = $var; + + return $this; + } + + /** + * The impressions you've received on the Search Network divided + * by the estimated number of impressions you were eligible to receive. + * Note: Search impression share is reported in the range of 0.1 to 1. Any + * value below 0.1 is reported as 0.0999. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_impression_share = 50; + * @return \Google\Protobuf\DoubleValue + */ + public function getSearchImpressionShare() + { + return $this->search_impression_share; + } + + /** + * The impressions you've received on the Search Network divided + * by the estimated number of impressions you were eligible to receive. + * Note: Search impression share is reported in the range of 0.1 to 1. Any + * value below 0.1 is reported as 0.0999. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_impression_share = 50; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setSearchImpressionShare($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->search_impression_share = $var; + + return $this; + } + + /** + * The estimated percentage of impressions on the Search Network + * that your ads didn't receive due to poor Ad Rank. + * Note: Search rank lost impression share is reported in the range of 0 to + * 0.9. Any value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_rank_lost_impression_share = 51; + * @return \Google\Protobuf\DoubleValue + */ + public function getSearchRankLostImpressionShare() + { + return $this->search_rank_lost_impression_share; + } + + /** + * The estimated percentage of impressions on the Search Network + * that your ads didn't receive due to poor Ad Rank. + * Note: Search rank lost impression share is reported in the range of 0 to + * 0.9. Any value above 0.9 is reported as 0.9001. + * + * Generated from protobuf field .google.protobuf.DoubleValue search_rank_lost_impression_share = 51; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setSearchRankLostImpressionShare($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->search_rank_lost_impression_share = $var; + + return $this; + } + + /** + * The value of all conversions divided by the number of all conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue value_per_all_conversions = 52; + * @return \Google\Protobuf\DoubleValue + */ + public function getValuePerAllConversions() + { + return $this->value_per_all_conversions; + } + + /** + * The value of all conversions divided by the number of all conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue value_per_all_conversions = 52; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setValuePerAllConversions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->value_per_all_conversions = $var; + + return $this; + } + + /** + * The value of conversions divided by the number of conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue value_per_conversion = 53; + * @return \Google\Protobuf\DoubleValue + */ + public function getValuePerConversion() + { + return $this->value_per_conversion; + } + + /** + * The value of conversions divided by the number of conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue value_per_conversion = 53; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setValuePerConversion($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->value_per_conversion = $var; + + return $this; + } + + /** + * The total number of view-through conversions. + * These happen when a customer sees an image or rich media ad, then later + * completes a conversion on your site without interacting with (e.g., + * clicking on) another ad. + * + * Generated from protobuf field .google.protobuf.Int64Value view_through_conversions = 60; + * @return \Google\Protobuf\Int64Value + */ + public function getViewThroughConversions() + { + return $this->view_through_conversions; + } + + /** + * The total number of view-through conversions. + * These happen when a customer sees an image or rich media ad, then later + * completes a conversion on your site without interacting with (e.g., + * clicking on) another ad. + * + * Generated from protobuf field .google.protobuf.Int64Value view_through_conversions = 60; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setViewThroughConversions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->view_through_conversions = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/PageOnePromoted.php b/src/Google/Ads/GoogleAds/V0/Common/PageOnePromoted.php new file mode 100644 index 000000000..bbd5e1a85 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/PageOnePromoted.php @@ -0,0 +1,245 @@ +google.ads.googleads.v0.common.PageOnePromoted + */ +class PageOnePromoted extends \Google\Protobuf\Internal\Message +{ + /** + * The strategy goal of where impressions are desired to be shown on + * search result pages. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.PageOnePromotedStrategyGoalEnum.PageOnePromotedStrategyGoal strategy_goal = 1; + */ + private $strategy_goal = 0; + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + */ + private $cpc_bid_ceiling_micros = null; + /** + * Bid multiplier to be applied to the relevant bid estimate (depending on + * the `strategy_goal`) in determining a keyword's new CPC bid. + * + * Generated from protobuf field .google.protobuf.DoubleValue bid_modifier = 3; + */ + private $bid_modifier = null; + /** + * Whether the strategy should always follow bid estimate changes, or only + * increase. + * If false, always sets a keyword's new bid to the current bid estimate. + * If true, only updates a keyword's bid if the current bid estimate is + * greater than the current bid. + * + * Generated from protobuf field .google.protobuf.BoolValue only_raise_cpc_bids = 4; + */ + private $only_raise_cpc_bids = null; + /** + * Whether the strategy is allowed to raise bids when the throttling + * rate of the budget it is serving out of rises above a threshold. + * + * Generated from protobuf field .google.protobuf.BoolValue raise_cpc_bid_when_budget_constrained = 5; + */ + private $raise_cpc_bid_when_budget_constrained = null; + /** + * Whether the strategy is allowed to raise bids on keywords with + * lower-range quality scores. + * + * Generated from protobuf field .google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 6; + */ + private $raise_cpc_bid_when_quality_score_is_low = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Bidding::initOnce(); + parent::__construct(); + } + + /** + * The strategy goal of where impressions are desired to be shown on + * search result pages. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.PageOnePromotedStrategyGoalEnum.PageOnePromotedStrategyGoal strategy_goal = 1; + * @return int + */ + public function getStrategyGoal() + { + return $this->strategy_goal; + } + + /** + * The strategy goal of where impressions are desired to be shown on + * search result pages. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.PageOnePromotedStrategyGoalEnum.PageOnePromotedStrategyGoal strategy_goal = 1; + * @param int $var + * @return $this + */ + public function setStrategyGoal($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\PageOnePromotedStrategyGoalEnum_PageOnePromotedStrategyGoal::class); + $this->strategy_goal = $var; + + return $this; + } + + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getCpcBidCeilingMicros() + { + return $this->cpc_bid_ceiling_micros; + } + + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpcBidCeilingMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpc_bid_ceiling_micros = $var; + + return $this; + } + + /** + * Bid multiplier to be applied to the relevant bid estimate (depending on + * the `strategy_goal`) in determining a keyword's new CPC bid. + * + * Generated from protobuf field .google.protobuf.DoubleValue bid_modifier = 3; + * @return \Google\Protobuf\DoubleValue + */ + public function getBidModifier() + { + return $this->bid_modifier; + } + + /** + * Bid multiplier to be applied to the relevant bid estimate (depending on + * the `strategy_goal`) in determining a keyword's new CPC bid. + * + * Generated from protobuf field .google.protobuf.DoubleValue bid_modifier = 3; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setBidModifier($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->bid_modifier = $var; + + return $this; + } + + /** + * Whether the strategy should always follow bid estimate changes, or only + * increase. + * If false, always sets a keyword's new bid to the current bid estimate. + * If true, only updates a keyword's bid if the current bid estimate is + * greater than the current bid. + * + * Generated from protobuf field .google.protobuf.BoolValue only_raise_cpc_bids = 4; + * @return \Google\Protobuf\BoolValue + */ + public function getOnlyRaiseCpcBids() + { + return $this->only_raise_cpc_bids; + } + + /** + * Whether the strategy should always follow bid estimate changes, or only + * increase. + * If false, always sets a keyword's new bid to the current bid estimate. + * If true, only updates a keyword's bid if the current bid estimate is + * greater than the current bid. + * + * Generated from protobuf field .google.protobuf.BoolValue only_raise_cpc_bids = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setOnlyRaiseCpcBids($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->only_raise_cpc_bids = $var; + + return $this; + } + + /** + * Whether the strategy is allowed to raise bids when the throttling + * rate of the budget it is serving out of rises above a threshold. + * + * Generated from protobuf field .google.protobuf.BoolValue raise_cpc_bid_when_budget_constrained = 5; + * @return \Google\Protobuf\BoolValue + */ + public function getRaiseCpcBidWhenBudgetConstrained() + { + return $this->raise_cpc_bid_when_budget_constrained; + } + + /** + * Whether the strategy is allowed to raise bids when the throttling + * rate of the budget it is serving out of rises above a threshold. + * + * Generated from protobuf field .google.protobuf.BoolValue raise_cpc_bid_when_budget_constrained = 5; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRaiseCpcBidWhenBudgetConstrained($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->raise_cpc_bid_when_budget_constrained = $var; + + return $this; + } + + /** + * Whether the strategy is allowed to raise bids on keywords with + * lower-range quality scores. + * + * Generated from protobuf field .google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 6; + * @return \Google\Protobuf\BoolValue + */ + public function getRaiseCpcBidWhenQualityScoreIsLow() + { + return $this->raise_cpc_bid_when_quality_score_is_low; + } + + /** + * Whether the strategy is allowed to raise bids on keywords with + * lower-range quality scores. + * + * Generated from protobuf field .google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 6; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRaiseCpcBidWhenQualityScoreIsLow($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->raise_cpc_bid_when_quality_score_is_low = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/PlatformInfo.php b/src/Google/Ads/GoogleAds/V0/Common/PlatformInfo.php new file mode 100644 index 000000000..75c7c921e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/PlatformInfo.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.common.PlatformInfo + */ +class PlatformInfo extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Criteria::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/PolicyViolationKey.php b/src/Google/Ads/GoogleAds/V0/Common/PolicyViolationKey.php new file mode 100644 index 000000000..83d86135b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/PolicyViolationKey.php @@ -0,0 +1,102 @@ +google.ads.googleads.v0.common.PolicyViolationKey + */ +class PolicyViolationKey extends \Google\Protobuf\Internal\Message +{ + /** + * Unique ID of the violated policy. + * + * Generated from protobuf field .google.protobuf.StringValue policy_name = 1; + */ + private $policy_name = null; + /** + * The text that violates the policy if specified. + * Otherwise, refers to the policy in general + * (e.g., when requesting to be exempt from the whole policy). + * If not specified for criterion exemptions, the whole policy is implied. + * Must be specified for ad exemptions. + * + * Generated from protobuf field .google.protobuf.StringValue violating_text = 2; + */ + private $violating_text = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Policy::initOnce(); + parent::__construct(); + } + + /** + * Unique ID of the violated policy. + * + * Generated from protobuf field .google.protobuf.StringValue policy_name = 1; + * @return \Google\Protobuf\StringValue + */ + public function getPolicyName() + { + return $this->policy_name; + } + + /** + * Unique ID of the violated policy. + * + * Generated from protobuf field .google.protobuf.StringValue policy_name = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setPolicyName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->policy_name = $var; + + return $this; + } + + /** + * The text that violates the policy if specified. + * Otherwise, refers to the policy in general + * (e.g., when requesting to be exempt from the whole policy). + * If not specified for criterion exemptions, the whole policy is implied. + * Must be specified for ad exemptions. + * + * Generated from protobuf field .google.protobuf.StringValue violating_text = 2; + * @return \Google\Protobuf\StringValue + */ + public function getViolatingText() + { + return $this->violating_text; + } + + /** + * The text that violates the policy if specified. + * Otherwise, refers to the policy in general + * (e.g., when requesting to be exempt from the whole policy). + * If not specified for criterion exemptions, the whole policy is implied. + * Must be specified for ad exemptions. + * + * Generated from protobuf field .google.protobuf.StringValue violating_text = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setViolatingText($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->violating_text = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/ResponsiveDisplayAdInfo.php b/src/Google/Ads/GoogleAds/V0/Common/ResponsiveDisplayAdInfo.php new file mode 100644 index 000000000..a84feef15 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/ResponsiveDisplayAdInfo.php @@ -0,0 +1,153 @@ +google.ads.googleads.v0.common.ResponsiveDisplayAdInfo + */ +class ResponsiveDisplayAdInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The short version of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue short_headline = 1; + */ + private $short_headline = null; + /** + * The long version of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue long_headline = 2; + */ + private $long_headline = null; + /** + * The description of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3; + */ + private $description = null; + /** + * The business name in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue business_name = 4; + */ + private $business_name = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Ad::initOnce(); + parent::__construct(); + } + + /** + * The short version of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue short_headline = 1; + * @return \Google\Protobuf\StringValue + */ + public function getShortHeadline() + { + return $this->short_headline; + } + + /** + * The short version of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue short_headline = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setShortHeadline($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->short_headline = $var; + + return $this; + } + + /** + * The long version of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue long_headline = 2; + * @return \Google\Protobuf\StringValue + */ + public function getLongHeadline() + { + return $this->long_headline; + } + + /** + * The long version of the ad's headline. + * + * Generated from protobuf field .google.protobuf.StringValue long_headline = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setLongHeadline($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->long_headline = $var; + + return $this; + } + + /** + * The description of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3; + * @return \Google\Protobuf\StringValue + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue description = 3; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description = $var; + + return $this; + } + + /** + * The business name in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue business_name = 4; + * @return \Google\Protobuf\StringValue + */ + public function getBusinessName() + { + return $this->business_name; + } + + /** + * The business name in the ad. + * + * Generated from protobuf field .google.protobuf.StringValue business_name = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setBusinessName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->business_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/TargetCpa.php b/src/Google/Ads/GoogleAds/V0/Common/TargetCpa.php new file mode 100644 index 000000000..0a2ac8832 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/TargetCpa.php @@ -0,0 +1,134 @@ +google.ads.googleads.v0.common.TargetCpa + */ +class TargetCpa extends \Google\Protobuf\Internal\Message +{ + /** + * Average CPA target. + * This target should be greater than or equal to minimum billable unit based + * on the currency for the account. + * + * Generated from protobuf field .google.protobuf.Int64Value target_cpa_micros = 1; + */ + private $target_cpa_micros = null; + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + */ + private $cpc_bid_ceiling_micros = null; + /** + * Minimum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_floor_micros = 3; + */ + private $cpc_bid_floor_micros = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Bidding::initOnce(); + parent::__construct(); + } + + /** + * Average CPA target. + * This target should be greater than or equal to minimum billable unit based + * on the currency for the account. + * + * Generated from protobuf field .google.protobuf.Int64Value target_cpa_micros = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getTargetCpaMicros() + { + return $this->target_cpa_micros; + } + + /** + * Average CPA target. + * This target should be greater than or equal to minimum billable unit based + * on the currency for the account. + * + * Generated from protobuf field .google.protobuf.Int64Value target_cpa_micros = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setTargetCpaMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->target_cpa_micros = $var; + + return $this; + } + + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getCpcBidCeilingMicros() + { + return $this->cpc_bid_ceiling_micros; + } + + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpcBidCeilingMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpc_bid_ceiling_micros = $var; + + return $this; + } + + /** + * Minimum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_floor_micros = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getCpcBidFloorMicros() + { + return $this->cpc_bid_floor_micros; + } + + /** + * Minimum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_floor_micros = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpcBidFloorMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpc_bid_floor_micros = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/TargetOutrankShare.php b/src/Google/Ads/GoogleAds/V0/Common/TargetOutrankShare.php new file mode 100644 index 000000000..d4a829b40 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/TargetOutrankShare.php @@ -0,0 +1,219 @@ +google.ads.googleads.v0.common.TargetOutrankShare + */ +class TargetOutrankShare extends \Google\Protobuf\Internal\Message +{ + /** + * The target fraction of auctions where the advertiser should outrank the + * competitor. + * The advertiser outranks the competitor in an auction if either the + * advertiser appears above the competitor in the search results, or appears + * in the search results when the competitor does not. + * Value must be between 1 and 1000000, inclusive. + * + * Generated from protobuf field .google.protobuf.Int32Value target_outrank_share_micros = 1; + */ + private $target_outrank_share_micros = null; + /** + * Competitor's visible domain URL. + * + * Generated from protobuf field .google.protobuf.StringValue competitor_domain = 2; + */ + private $competitor_domain = null; + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 3; + */ + private $cpc_bid_ceiling_micros = null; + /** + * Whether the strategy should always follow bid estimate changes, + * or only increase. + * If false, always set a keyword's new bid to the current bid estimate. + * If true, only updates a keyword's bid if the current bid estimate is + * greater than the current bid. + * + * Generated from protobuf field .google.protobuf.BoolValue only_raise_cpc_bids = 4; + */ + private $only_raise_cpc_bids = null; + /** + * Whether the strategy is allowed to raise bids on keywords with + * lower-range quality scores. + * + * Generated from protobuf field .google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 5; + */ + private $raise_cpc_bid_when_quality_score_is_low = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Bidding::initOnce(); + parent::__construct(); + } + + /** + * The target fraction of auctions where the advertiser should outrank the + * competitor. + * The advertiser outranks the competitor in an auction if either the + * advertiser appears above the competitor in the search results, or appears + * in the search results when the competitor does not. + * Value must be between 1 and 1000000, inclusive. + * + * Generated from protobuf field .google.protobuf.Int32Value target_outrank_share_micros = 1; + * @return \Google\Protobuf\Int32Value + */ + public function getTargetOutrankShareMicros() + { + return $this->target_outrank_share_micros; + } + + /** + * The target fraction of auctions where the advertiser should outrank the + * competitor. + * The advertiser outranks the competitor in an auction if either the + * advertiser appears above the competitor in the search results, or appears + * in the search results when the competitor does not. + * Value must be between 1 and 1000000, inclusive. + * + * Generated from protobuf field .google.protobuf.Int32Value target_outrank_share_micros = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setTargetOutrankShareMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->target_outrank_share_micros = $var; + + return $this; + } + + /** + * Competitor's visible domain URL. + * + * Generated from protobuf field .google.protobuf.StringValue competitor_domain = 2; + * @return \Google\Protobuf\StringValue + */ + public function getCompetitorDomain() + { + return $this->competitor_domain; + } + + /** + * Competitor's visible domain URL. + * + * Generated from protobuf field .google.protobuf.StringValue competitor_domain = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCompetitorDomain($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->competitor_domain = $var; + + return $this; + } + + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getCpcBidCeilingMicros() + { + return $this->cpc_bid_ceiling_micros; + } + + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpcBidCeilingMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpc_bid_ceiling_micros = $var; + + return $this; + } + + /** + * Whether the strategy should always follow bid estimate changes, + * or only increase. + * If false, always set a keyword's new bid to the current bid estimate. + * If true, only updates a keyword's bid if the current bid estimate is + * greater than the current bid. + * + * Generated from protobuf field .google.protobuf.BoolValue only_raise_cpc_bids = 4; + * @return \Google\Protobuf\BoolValue + */ + public function getOnlyRaiseCpcBids() + { + return $this->only_raise_cpc_bids; + } + + /** + * Whether the strategy should always follow bid estimate changes, + * or only increase. + * If false, always set a keyword's new bid to the current bid estimate. + * If true, only updates a keyword's bid if the current bid estimate is + * greater than the current bid. + * + * Generated from protobuf field .google.protobuf.BoolValue only_raise_cpc_bids = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setOnlyRaiseCpcBids($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->only_raise_cpc_bids = $var; + + return $this; + } + + /** + * Whether the strategy is allowed to raise bids on keywords with + * lower-range quality scores. + * + * Generated from protobuf field .google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 5; + * @return \Google\Protobuf\BoolValue + */ + public function getRaiseCpcBidWhenQualityScoreIsLow() + { + return $this->raise_cpc_bid_when_quality_score_is_low; + } + + /** + * Whether the strategy is allowed to raise bids on keywords with + * lower-range quality scores. + * + * Generated from protobuf field .google.protobuf.BoolValue raise_cpc_bid_when_quality_score_is_low = 5; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRaiseCpcBidWhenQualityScoreIsLow($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->raise_cpc_bid_when_quality_score_is_low = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/TargetRoas.php b/src/Google/Ads/GoogleAds/V0/Common/TargetRoas.php new file mode 100644 index 000000000..9310d218b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/TargetRoas.php @@ -0,0 +1,131 @@ +google.ads.googleads.v0.common.TargetRoas + */ +class TargetRoas extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired revenue (based on conversion data) per unit of spend. + * Value must be between 0.01 and 1000.0, inclusive. + * + * Generated from protobuf field .google.protobuf.DoubleValue target_roas = 1; + */ + private $target_roas = null; + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + */ + private $cpc_bid_ceiling_micros = null; + /** + * Minimum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_floor_micros = 3; + */ + private $cpc_bid_floor_micros = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Bidding::initOnce(); + parent::__construct(); + } + + /** + * Required. The desired revenue (based on conversion data) per unit of spend. + * Value must be between 0.01 and 1000.0, inclusive. + * + * Generated from protobuf field .google.protobuf.DoubleValue target_roas = 1; + * @return \Google\Protobuf\DoubleValue + */ + public function getTargetRoas() + { + return $this->target_roas; + } + + /** + * Required. The desired revenue (based on conversion data) per unit of spend. + * Value must be between 0.01 and 1000.0, inclusive. + * + * Generated from protobuf field .google.protobuf.DoubleValue target_roas = 1; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setTargetRoas($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->target_roas = $var; + + return $this; + } + + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getCpcBidCeilingMicros() + { + return $this->cpc_bid_ceiling_micros; + } + + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpcBidCeilingMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpc_bid_ceiling_micros = $var; + + return $this; + } + + /** + * Minimum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_floor_micros = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getCpcBidFloorMicros() + { + return $this->cpc_bid_floor_micros; + } + + /** + * Minimum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_floor_micros = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpcBidFloorMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpc_bid_floor_micros = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/TargetSpend.php b/src/Google/Ads/GoogleAds/V0/Common/TargetSpend.php new file mode 100644 index 000000000..e53182b0d --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/TargetSpend.php @@ -0,0 +1,102 @@ +google.ads.googleads.v0.common.TargetSpend + */ +class TargetSpend extends \Google\Protobuf\Internal\Message +{ + /** + * The spend target under which to maximize clicks. + * A TargetSpend bidder will attempt to spend the smaller of this value + * or the natural throttling spend amount. + * If not specified, the budget is used as the spend target. + * + * Generated from protobuf field .google.protobuf.Int64Value target_spend_micros = 1; + */ + private $target_spend_micros = null; + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + */ + private $cpc_bid_ceiling_micros = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Bidding::initOnce(); + parent::__construct(); + } + + /** + * The spend target under which to maximize clicks. + * A TargetSpend bidder will attempt to spend the smaller of this value + * or the natural throttling spend amount. + * If not specified, the budget is used as the spend target. + * + * Generated from protobuf field .google.protobuf.Int64Value target_spend_micros = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getTargetSpendMicros() + { + return $this->target_spend_micros; + } + + /** + * The spend target under which to maximize clicks. + * A TargetSpend bidder will attempt to spend the smaller of this value + * or the natural throttling spend amount. + * If not specified, the budget is used as the spend target. + * + * Generated from protobuf field .google.protobuf.Int64Value target_spend_micros = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setTargetSpendMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->target_spend_micros = $var; + + return $this; + } + + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getCpcBidCeilingMicros() + { + return $this->cpc_bid_ceiling_micros; + } + + /** + * Maximum bid limit that can be set by the bid strategy. + * The limit applies to all keywords managed by the strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_ceiling_micros = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpcBidCeilingMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpc_bid_ceiling_micros = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/TextAdInfo.php b/src/Google/Ads/GoogleAds/V0/Common/TextAdInfo.php new file mode 100644 index 000000000..5cc025590 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/TextAdInfo.php @@ -0,0 +1,121 @@ +google.ads.googleads.v0.common.TextAdInfo + */ +class TextAdInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The headline of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue headline = 1; + */ + private $headline = null; + /** + * The first line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description1 = 2; + */ + private $description1 = null; + /** + * The second line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description2 = 3; + */ + private $description2 = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Ad::initOnce(); + parent::__construct(); + } + + /** + * The headline of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue headline = 1; + * @return \Google\Protobuf\StringValue + */ + public function getHeadline() + { + return $this->headline; + } + + /** + * The headline of the ad. + * + * Generated from protobuf field .google.protobuf.StringValue headline = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setHeadline($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->headline = $var; + + return $this; + } + + /** + * The first line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description1 = 2; + * @return \Google\Protobuf\StringValue + */ + public function getDescription1() + { + return $this->description1; + } + + /** + * The first line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description1 = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription1($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description1 = $var; + + return $this; + } + + /** + * The second line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description2 = 3; + * @return \Google\Protobuf\StringValue + */ + public function getDescription2() + { + return $this->description2; + } + + /** + * The second line of the ad's description. + * + * Generated from protobuf field .google.protobuf.StringValue description2 = 3; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescription2($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->description2 = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Common/Value.php b/src/Google/Ads/GoogleAds/V0/Common/Value.php new file mode 100644 index 000000000..96b612cf1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Common/Value.php @@ -0,0 +1,164 @@ +google.ads.googleads.v0.common.Value + */ +class Value extends \Google\Protobuf\Internal\Message +{ + protected $value; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Common\Value::initOnce(); + parent::__construct(); + } + + /** + * A boolean. + * + * Generated from protobuf field bool boolean_value = 1; + * @return bool + */ + public function getBooleanValue() + { + return $this->readOneof(1); + } + + /** + * A boolean. + * + * Generated from protobuf field bool boolean_value = 1; + * @param bool $var + * @return $this + */ + public function setBooleanValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * An int64. + * + * Generated from protobuf field int64 int64_value = 2; + * @return int|string + */ + public function getInt64Value() + { + return $this->readOneof(2); + } + + /** + * An int64. + * + * Generated from protobuf field int64 int64_value = 2; + * @param int|string $var + * @return $this + */ + public function setInt64Value($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A float. + * + * Generated from protobuf field float float_value = 3; + * @return float + */ + public function getFloatValue() + { + return $this->readOneof(3); + } + + /** + * A float. + * + * Generated from protobuf field float float_value = 3; + * @param float $var + * @return $this + */ + public function setFloatValue($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A double. + * + * Generated from protobuf field double double_value = 4; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(4); + } + + /** + * A double. + * + * Generated from protobuf field double double_value = 4; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A string. + * + * Generated from protobuf field string string_value = 5; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(5); + } + + /** + * A string. + * + * Generated from protobuf field string string_value = 5; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdGroupAdStatusEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupAdStatusEnum.php new file mode 100644 index 000000000..7231856d7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupAdStatusEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.AdGroupAdStatusEnum + */ +class AdGroupAdStatusEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\AdGroupAdStatus::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdGroupAdStatusEnum_AdGroupAdStatus.php b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupAdStatusEnum_AdGroupAdStatus.php new file mode 100644 index 000000000..c311408d1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupAdStatusEnum_AdGroupAdStatus.php @@ -0,0 +1,46 @@ +Google\Ads\Googleads\V0\Enums\AdGroupAdStatusEnum\AdGroupAdStatus + */ +class AdGroupAdStatusEnum_AdGroupAdStatus +{ + /** + * No value has been specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received value is not known in this version. + * This is a response-only value. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The ad group ad is enabled. + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + /** + * The ad group ad is paused. + * + * Generated from protobuf enum PAUSED = 3; + */ + const PAUSED = 3; + /** + * The ad group ad is removed. + * + * Generated from protobuf enum REMOVED = 4; + */ + const REMOVED = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdGroupCriterionStatusEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupCriterionStatusEnum.php new file mode 100644 index 000000000..8b9f868e1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupCriterionStatusEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.AdGroupCriterionStatusEnum + */ +class AdGroupCriterionStatusEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\AdGroupCriterionStatus::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdGroupCriterionStatusEnum_AdGroupCriterionStatus.php b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupCriterionStatusEnum_AdGroupCriterionStatus.php new file mode 100644 index 000000000..d3d87eb86 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupCriterionStatusEnum_AdGroupCriterionStatus.php @@ -0,0 +1,46 @@ +Google\Ads\Googleads\V0\Enums\AdGroupCriterionStatusEnum\AdGroupCriterionStatus + */ +class AdGroupCriterionStatusEnum_AdGroupCriterionStatus +{ + /** + * No value has been specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received value is not known in this version. + * This is a response-only value. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The ad group criterion is enabled. + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + /** + * The ad group criterion is paused. + * + * Generated from protobuf enum PAUSED = 3; + */ + const PAUSED = 3; + /** + * The ad group criterion is removed. + * + * Generated from protobuf enum REMOVED = 4; + */ + const REMOVED = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdGroupStatusEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupStatusEnum.php new file mode 100644 index 000000000..f74aea481 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupStatusEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.AdGroupStatusEnum + */ +class AdGroupStatusEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\AdGroupStatus::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdGroupStatusEnum_AdGroupStatus.php b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupStatusEnum_AdGroupStatus.php new file mode 100644 index 000000000..b23232342 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupStatusEnum_AdGroupStatus.php @@ -0,0 +1,46 @@ +Google\Ads\Googleads\V0\Enums\AdGroupStatusEnum\AdGroupStatus + */ +class AdGroupStatusEnum_AdGroupStatus +{ + /** + * The status has not been specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received value is not known in this version. + * This is a response-only value. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The ad group is enabled. + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + /** + * The ad group is paused. + * + * Generated from protobuf enum PAUSED = 3; + */ + const PAUSED = 3; + /** + * The ad group is removed. + * + * Generated from protobuf enum REMOVED = 4; + */ + const REMOVED = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdGroupTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupTypeEnum.php new file mode 100644 index 000000000..fd4a7f3de --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupTypeEnum.php @@ -0,0 +1,27 @@ +google.ads.googleads.v0.enums.AdGroupTypeEnum + */ +class AdGroupTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\AdGroupType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdGroupTypeEnum_AdGroupType.php b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupTypeEnum_AdGroupType.php new file mode 100644 index 000000000..10bd6dc63 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdGroupTypeEnum_AdGroupType.php @@ -0,0 +1,40 @@ +Google\Ads\Googleads\V0\Enums\AdGroupTypeEnum\AdGroupType + */ +class AdGroupTypeEnum_AdGroupType +{ + /** + * The type has not been specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received value is not known in this version. + * This is a response-only value. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The default ad group type for Search campaigns. + * + * Generated from protobuf enum SEARCH_STANDARD = 2; + */ + const SEARCH_STANDARD = 2; + /** + * The default ad group type for Hotel campaigns. + * + * Generated from protobuf enum HOTEL_ADS = 6; + */ + const HOTEL_ADS = 6; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdNetworkTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/AdNetworkTypeEnum.php new file mode 100644 index 000000000..620c83c90 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdNetworkTypeEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.AdNetworkTypeEnum + */ +class AdNetworkTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\AdNetworkType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdNetworkTypeEnum_AdNetworkType.php b/src/Google/Ads/GoogleAds/V0/Enums/AdNetworkTypeEnum_AdNetworkType.php new file mode 100644 index 000000000..6e2c9db57 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdNetworkTypeEnum_AdNetworkType.php @@ -0,0 +1,57 @@ +Google\Ads\Googleads\V0\Enums\AdNetworkTypeEnum\AdNetworkType + */ +class AdNetworkTypeEnum_AdNetworkType +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The value is unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Google search. + * + * Generated from protobuf enum SEARCH = 2; + */ + const SEARCH = 2; + /** + * Search partners. + * + * Generated from protobuf enum SEARCH_PARTNERS = 3; + */ + const SEARCH_PARTNERS = 3; + /** + * Display Network. + * + * Generated from protobuf enum CONTENT = 4; + */ + const CONTENT = 4; + /** + * YouTube Search. + * + * Generated from protobuf enum YOUTUBE_SEARCH = 5; + */ + const YOUTUBE_SEARCH = 5; + /** + * YouTube Videos + * + * Generated from protobuf enum YOUTUBE_WATCH = 6; + */ + const YOUTUBE_WATCH = 6; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdServingOptimizationStatusEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/AdServingOptimizationStatusEnum.php new file mode 100644 index 000000000..a90f480a6 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdServingOptimizationStatusEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.AdServingOptimizationStatusEnum + */ +class AdServingOptimizationStatusEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\AdServingOptimizationStatus::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdServingOptimizationStatusEnum_AdServingOptimizationStatus.php b/src/Google/Ads/GoogleAds/V0/Enums/AdServingOptimizationStatusEnum_AdServingOptimizationStatus.php new file mode 100644 index 000000000..5c06c54eb --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdServingOptimizationStatusEnum_AdServingOptimizationStatus.php @@ -0,0 +1,61 @@ +Google\Ads\Googleads\V0\Enums\AdServingOptimizationStatusEnum\AdServingOptimizationStatus + */ +class AdServingOptimizationStatusEnum_AdServingOptimizationStatus +{ + /** + * No value has been specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received value is not known in this version. + * This is a response-only value. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Ad serving is optimized based on CTR for the campaign. + * + * Generated from protobuf enum OPTIMIZE = 2; + */ + const OPTIMIZE = 2; + /** + * Ad serving is optimized based on CTR * Conversion for the campaign. If + * the campaign is not in the conversion optimizer bidding strategy, it will + * default to OPTIMIZED. + * + * Generated from protobuf enum CONVERSION_OPTIMIZE = 3; + */ + const CONVERSION_OPTIMIZE = 3; + /** + * Ads are rotated evenly for 90 days, then optimized for clicks. + * + * Generated from protobuf enum ROTATE = 4; + */ + const ROTATE = 4; + /** + * Show lower performing ads more evenly with higher performing ads, and do + * not optimize. + * + * Generated from protobuf enum ROTATE_INDEFINITELY = 5; + */ + const ROTATE_INDEFINITELY = 5; + /** + * Ad serving optimization status is not available. + * + * Generated from protobuf enum UNAVAILABLE = 6; + */ + const UNAVAILABLE = 6; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/AdTypeEnum.php new file mode 100644 index 000000000..fac619f1e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdTypeEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.AdTypeEnum + */ +class AdTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\AdType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdTypeEnum_AdType.php b/src/Google/Ads/GoogleAds/V0/Enums/AdTypeEnum_AdType.php new file mode 100644 index 000000000..3a7993836 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdTypeEnum_AdType.php @@ -0,0 +1,70 @@ +Google\Ads\Googleads\V0\Enums\AdTypeEnum\AdType + */ +class AdTypeEnum_AdType +{ + /** + * No value has been specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received value is not known in this version. + * This is a response-only value. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The ad is a text ad. + * + * Generated from protobuf enum TEXT_AD = 2; + */ + const TEXT_AD = 2; + /** + * The ad is an expanded text ad. + * + * Generated from protobuf enum EXPANDED_TEXT_AD = 3; + */ + const EXPANDED_TEXT_AD = 3; + /** + * The ad is a dynamic search ad. + * + * Generated from protobuf enum DYNAMIC_SEARCH_AD = 4; + */ + const DYNAMIC_SEARCH_AD = 4; + /** + * The ad is a responsive display ad. + * + * Generated from protobuf enum RESPONSIVE_DISPLAY_AD = 5; + */ + const RESPONSIVE_DISPLAY_AD = 5; + /** + * The ad is a call only ad. + * + * Generated from protobuf enum CALL_ONLY_AD = 6; + */ + const CALL_ONLY_AD = 6; + /** + * The ad is an expanded dynamic search ad. + * + * Generated from protobuf enum EXPANDED_DYNAMIC_SEARCH_AD = 7; + */ + const EXPANDED_DYNAMIC_SEARCH_AD = 7; + /** + * The ad is a hotel ad. + * + * Generated from protobuf enum HOTEL_AD = 8; + */ + const HOTEL_AD = 8; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelSubTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelSubTypeEnum.php new file mode 100644 index 000000000..d1dc77434 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelSubTypeEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.AdvertisingChannelSubTypeEnum + */ +class AdvertisingChannelSubTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\AdvertisingChannelSubType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelSubTypeEnum_AdvertisingChannelSubType.php b/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelSubTypeEnum_AdvertisingChannelSubType.php new file mode 100644 index 000000000..ac80f6338 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelSubTypeEnum_AdvertisingChannelSubType.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Enums\AdvertisingChannelSubTypeEnum\AdvertisingChannelSubType + */ +class AdvertisingChannelSubTypeEnum_AdvertisingChannelSubType +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used as a return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Mobile app campaigns for Search. + * + * Generated from protobuf enum SEARCH_MOBILE_APP = 2; + */ + const SEARCH_MOBILE_APP = 2; + /** + * AdWords express campaigns for search. + * + * Generated from protobuf enum SEARCH_EXPRESS = 4; + */ + const SEARCH_EXPRESS = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelTypeEnum.php new file mode 100644 index 000000000..4634354b1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelTypeEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.AdvertisingChannelTypeEnum + */ +class AdvertisingChannelTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\AdvertisingChannelType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelTypeEnum_AdvertisingChannelType.php b/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelTypeEnum_AdvertisingChannelType.php new file mode 100644 index 000000000..15ca537f6 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/AdvertisingChannelTypeEnum_AdvertisingChannelType.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Enums\AdvertisingChannelTypeEnum\AdvertisingChannelType + */ +class AdvertisingChannelTypeEnum_AdvertisingChannelType +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Search Network. Includes display bundled, and Search+ campaigns. + * + * Generated from protobuf enum SEARCH = 2; + */ + const SEARCH = 2; + /** + * Hotel Ads campaigns. + * + * Generated from protobuf enum HOTEL = 5; + */ + const HOTEL = 5; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/BiddingSourceEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/BiddingSourceEnum.php new file mode 100644 index 000000000..77c4f9bfd --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/BiddingSourceEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.BiddingSourceEnum + */ +class BiddingSourceEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\BiddingSource::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/BiddingSourceEnum_BiddingSource.php b/src/Google/Ads/GoogleAds/V0/Enums/BiddingSourceEnum_BiddingSource.php new file mode 100644 index 000000000..c34a8ea5a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/BiddingSourceEnum_BiddingSource.php @@ -0,0 +1,45 @@ +Google\Ads\Googleads\V0\Enums\BiddingSourceEnum\BiddingSource + */ +class BiddingSourceEnum_BiddingSource +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Bidding entity is defined on the ad group. + * + * Generated from protobuf enum ADGROUP = 2; + */ + const ADGROUP = 2; + /** + * Bidding entity is defined on the ad group criterion. + * + * Generated from protobuf enum CRITERION = 3; + */ + const CRITERION = 3; + /** + * Effective bidding entity is inherited from campaign bidding strategy. + * + * Generated from protobuf enum CAMPAIGN_BIDDING_STRATEGY = 5; + */ + const CAMPAIGN_BIDDING_STRATEGY = 5; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/BiddingStrategyTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/BiddingStrategyTypeEnum.php new file mode 100644 index 000000000..1d3a23cc2 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/BiddingStrategyTypeEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.BiddingStrategyTypeEnum + */ +class BiddingStrategyTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\BiddingStrategyType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/BiddingStrategyTypeEnum_BiddingStrategyType.php b/src/Google/Ads/GoogleAds/V0/Enums/BiddingStrategyTypeEnum_BiddingStrategyType.php new file mode 100644 index 000000000..918d41594 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/BiddingStrategyTypeEnum_BiddingStrategyType.php @@ -0,0 +1,100 @@ +Google\Ads\Googleads\V0\Enums\BiddingStrategyTypeEnum\BiddingStrategyType + */ +class BiddingStrategyTypeEnum_BiddingStrategyType +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Enhanced CPC is a bidding strategy that raises bids for clicks + * that seem more likely to lead to a conversion and lowers + * them for clicks where they seem less likely. + * + * Generated from protobuf enum ENHANCED_CPC = 2; + */ + const ENHANCED_CPC = 2; + /** + * Manual click based bidding where user pays per click. + * + * Generated from protobuf enum MANUAL_CPC = 3; + */ + const MANUAL_CPC = 3; + /** + * Manual impression based bidding + * where user pays per thousand impressions. + * + * Generated from protobuf enum MANUAL_CPM = 4; + */ + const MANUAL_CPM = 4; + /** + * A bidding strategy that automatically maximizes number of conversions + * given a daily budget. + * + * Generated from protobuf enum MAXIMIZE_CONVERSIONS = 10; + */ + const MAXIMIZE_CONVERSIONS = 10; + /** + * An automated bidding strategy that automatically sets bids to maximize + * revenue while spending your budget. + * + * Generated from protobuf enum MAXIMIZE_CONVERSION_VALUE = 11; + */ + const MAXIMIZE_CONVERSION_VALUE = 11; + /** + * Page-One Promoted bidding scheme, which sets max cpc bids to + * target impressions on page one or page one promoted slots on google.com. + * + * Generated from protobuf enum PAGE_ONE_PROMOTED = 5; + */ + const PAGE_ONE_PROMOTED = 5; + /** + * Target CPA is an automated bid strategy that sets bids + * to help get as many conversions as possible + * at the target cost-per-acquisition (CPA) you set. + * + * Generated from protobuf enum TARGET_CPA = 6; + */ + const TARGET_CPA = 6; + /** + * Target Outrank Share is an automated bidding strategy that sets bids + * based on the target fraction of auctions where the advertiser + * should outrank a specific competitor. + * + * Generated from protobuf enum TARGET_OUTRANK_SHARE = 7; + */ + const TARGET_OUTRANK_SHARE = 7; + /** + * Target ROAS is an automated bidding strategy + * that helps you maximize revenue while averaging + * a specific target Return On Average Spend (ROAS). + * + * Generated from protobuf enum TARGET_ROAS = 8; + */ + const TARGET_ROAS = 8; + /** + * Target Spend is an automated bid strategy that sets your bids + * to help get as many clicks as possible within your budget. + * + * Generated from protobuf enum TARGET_SPEND = 9; + */ + const TARGET_SPEND = 9; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/BudgetDeliveryMethodEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/BudgetDeliveryMethodEnum.php new file mode 100644 index 000000000..83d97e1e0 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/BudgetDeliveryMethodEnum.php @@ -0,0 +1,26 @@ +google.ads.googleads.v0.enums.BudgetDeliveryMethodEnum + */ +class BudgetDeliveryMethodEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\BudgetDeliveryMethod::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/BudgetDeliveryMethodEnum_BudgetDeliveryMethod.php b/src/Google/Ads/GoogleAds/V0/Enums/BudgetDeliveryMethodEnum_BudgetDeliveryMethod.php new file mode 100644 index 000000000..905281828 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/BudgetDeliveryMethodEnum_BudgetDeliveryMethod.php @@ -0,0 +1,41 @@ +Google\Ads\Googleads\V0\Enums\BudgetDeliveryMethodEnum\BudgetDeliveryMethod + */ +class BudgetDeliveryMethodEnum_BudgetDeliveryMethod +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The budget server will throttle serving evenly across + * the entire time period. + * + * Generated from protobuf enum STANDARD = 2; + */ + const STANDARD = 2; + /** + * The budget server will not throttle serving, + * and ads will serve as fast as possible. + * + * Generated from protobuf enum ACCELERATED = 3; + */ + const ACCELERATED = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/BudgetStatusEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/BudgetStatusEnum.php new file mode 100644 index 000000000..8b32e41b1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/BudgetStatusEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.BudgetStatusEnum + */ +class BudgetStatusEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\BudgetStatus::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/BudgetStatusEnum_BudgetStatus.php b/src/Google/Ads/GoogleAds/V0/Enums/BudgetStatusEnum_BudgetStatus.php new file mode 100644 index 000000000..b5c019ca6 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/BudgetStatusEnum_BudgetStatus.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Enums\BudgetStatusEnum\BudgetStatus + */ +class BudgetStatusEnum_BudgetStatus +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Budget is enabled. + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + /** + * Budget is removed. + * + * Generated from protobuf enum REMOVED = 3; + */ + const REMOVED = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/CampaignServingStatusEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/CampaignServingStatusEnum.php new file mode 100644 index 000000000..cc5ea35e7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/CampaignServingStatusEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.CampaignServingStatusEnum + */ +class CampaignServingStatusEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\CampaignServingStatus::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/CampaignServingStatusEnum_CampaignServingStatus.php b/src/Google/Ads/GoogleAds/V0/Enums/CampaignServingStatusEnum_CampaignServingStatus.php new file mode 100644 index 000000000..2bcf41dfb --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/CampaignServingStatusEnum_CampaignServingStatus.php @@ -0,0 +1,58 @@ +Google\Ads\Googleads\V0\Enums\CampaignServingStatusEnum\CampaignServingStatus + */ +class CampaignServingStatusEnum_CampaignServingStatus +{ + /** + * No value has been specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received value is not known in this version. + * This is a response-only value. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Serving. + * + * Generated from protobuf enum SERVING = 2; + */ + const SERVING = 2; + /** + * None. + * + * Generated from protobuf enum NONE = 3; + */ + const NONE = 3; + /** + * Ended. + * + * Generated from protobuf enum ENDED = 4; + */ + const ENDED = 4; + /** + * Pending. + * + * Generated from protobuf enum PENDING = 5; + */ + const PENDING = 5; + /** + * Suspended. + * + * Generated from protobuf enum SUSPENDED = 6; + */ + const SUSPENDED = 6; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/CampaignStatusEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/CampaignStatusEnum.php new file mode 100644 index 000000000..1bfd8b009 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/CampaignStatusEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.CampaignStatusEnum + */ +class CampaignStatusEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\CampaignStatus::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/CampaignStatusEnum_CampaignStatus.php b/src/Google/Ads/GoogleAds/V0/Enums/CampaignStatusEnum_CampaignStatus.php new file mode 100644 index 000000000..a5ac3cc0c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/CampaignStatusEnum_CampaignStatus.php @@ -0,0 +1,45 @@ +Google\Ads\Googleads\V0\Enums\CampaignStatusEnum\CampaignStatus + */ +class CampaignStatusEnum_CampaignStatus +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Campaign is currently serving ads depending on budget information. + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + /** + * Campaign has been paused by the user. + * + * Generated from protobuf enum PAUSED = 3; + */ + const PAUSED = 3; + /** + * Campaign has been removed. + * + * Generated from protobuf enum REMOVED = 4; + */ + const REMOVED = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/CriterionTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/CriterionTypeEnum.php new file mode 100644 index 000000000..f0a07011d --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/CriterionTypeEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.CriterionTypeEnum + */ +class CriterionTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\CriterionType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/CriterionTypeEnum_CriterionType.php b/src/Google/Ads/GoogleAds/V0/Enums/CriterionTypeEnum_CriterionType.php new file mode 100644 index 000000000..cb55750cf --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/CriterionTypeEnum_CriterionType.php @@ -0,0 +1,51 @@ +Google\Ads\Googleads\V0\Enums\CriterionTypeEnum\CriterionType + */ +class CriterionTypeEnum_CriterionType +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Keyword. e.g. 'mars cruise'. + * + * Generated from protobuf enum KEYWORD = 2; + */ + const KEYWORD = 2; + /** + * Platforms to target. + * + * Generated from protobuf enum PLATFORM = 6; + */ + const PLATFORM = 6; + /** + * Locations to target. + * + * Generated from protobuf enum LOCATION = 7; + */ + const LOCATION = 7; + /** + * Listing groups to target. + * + * Generated from protobuf enum LISTING_GROUP = 8; + */ + const LISTING_GROUP = 8; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/DayOfWeekEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/DayOfWeekEnum.php new file mode 100644 index 000000000..7f6150c0a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/DayOfWeekEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.DayOfWeekEnum + */ +class DayOfWeekEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\DayOfWeek::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/DayOfWeekEnum_DayOfWeek.php b/src/Google/Ads/GoogleAds/V0/Enums/DayOfWeekEnum_DayOfWeek.php new file mode 100644 index 000000000..ed837a731 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/DayOfWeekEnum_DayOfWeek.php @@ -0,0 +1,69 @@ +Google\Ads\Googleads\V0\Enums\DayOfWeekEnum\DayOfWeek + */ +class DayOfWeekEnum_DayOfWeek +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The value is unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Monday. + * + * Generated from protobuf enum MONDAY = 2; + */ + const MONDAY = 2; + /** + * Tuesday. + * + * Generated from protobuf enum TUESDAY = 3; + */ + const TUESDAY = 3; + /** + * Wednesday. + * + * Generated from protobuf enum WEDNESDAY = 4; + */ + const WEDNESDAY = 4; + /** + * Thursday. + * + * Generated from protobuf enum THURSDAY = 5; + */ + const THURSDAY = 5; + /** + * Friday. + * + * Generated from protobuf enum FRIDAY = 6; + */ + const FRIDAY = 6; + /** + * Saturday. + * + * Generated from protobuf enum SATURDAY = 7; + */ + const SATURDAY = 7; + /** + * Sunday. + * + * Generated from protobuf enum SUNDAY = 8; + */ + const SUNDAY = 8; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/DeviceEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/DeviceEnum.php new file mode 100644 index 000000000..131cd5ff1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/DeviceEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.DeviceEnum + */ +class DeviceEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\Device::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/DeviceEnum_Device.php b/src/Google/Ads/GoogleAds/V0/Enums/DeviceEnum_Device.php new file mode 100644 index 000000000..f4b09d62b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/DeviceEnum_Device.php @@ -0,0 +1,45 @@ +Google\Ads\Googleads\V0\Enums\DeviceEnum\Device + */ +class DeviceEnum_Device +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The value is unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Mobile devices with full browsers. + * + * Generated from protobuf enum MOBILE = 2; + */ + const MOBILE = 2; + /** + * Tablets with full browsers. + * + * Generated from protobuf enum TABLET = 3; + */ + const TABLET = 3; + /** + * Computers. + * + * Generated from protobuf enum DESKTOP = 4; + */ + const DESKTOP = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldCategoryEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldCategoryEnum.php new file mode 100644 index 000000000..261124bdc --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldCategoryEnum.php @@ -0,0 +1,26 @@ +google.ads.googleads.v0.enums.GoogleAdsFieldCategoryEnum + */ +class GoogleAdsFieldCategoryEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\GoogleAdsFieldCategory::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldCategoryEnum_GoogleAdsFieldCategory.php b/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldCategoryEnum_GoogleAdsFieldCategory.php new file mode 100644 index 000000000..e91019bb3 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldCategoryEnum_GoogleAdsFieldCategory.php @@ -0,0 +1,55 @@ +Google\Ads\Googleads\V0\Enums\GoogleAdsFieldCategoryEnum\GoogleAdsFieldCategory + */ +class GoogleAdsFieldCategoryEnum_GoogleAdsFieldCategory +{ + /** + * Unspecified + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Unknown + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The described artifact is a resource. + * + * Generated from protobuf enum RESOURCE = 2; + */ + const RESOURCE = 2; + /** + * The described artifact is a field and is an attribute of a resource. + * Including a resource attribute field in a query may segment the query if + * the resource to which it is attributed segments the resource found in + * the FROM clause. + * + * Generated from protobuf enum ATTRIBUTE = 3; + */ + const ATTRIBUTE = 3; + /** + * The described artifact is a field and always segments search queries. + * + * Generated from protobuf enum SEGMENT = 5; + */ + const SEGMENT = 5; + /** + * The described artifact is a field and is a metric. It never segments + * search queries. + * + * Generated from protobuf enum METRIC = 6; + */ + const METRIC = 6; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldDataTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldDataTypeEnum.php new file mode 100644 index 000000000..72085593c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldDataTypeEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.GoogleAdsFieldDataTypeEnum + */ +class GoogleAdsFieldDataTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\GoogleAdsFieldDataType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldDataTypeEnum_GoogleAdsFieldDataType.php b/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldDataTypeEnum_GoogleAdsFieldDataType.php new file mode 100644 index 000000000..ca341bd4b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/GoogleAdsFieldDataTypeEnum_GoogleAdsFieldDataType.php @@ -0,0 +1,100 @@ +Google\Ads\Googleads\V0\Enums\GoogleAdsFieldDataTypeEnum\GoogleAdsFieldDataType + */ +class GoogleAdsFieldDataTypeEnum_GoogleAdsFieldDataType +{ + /** + * Unspecified + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Unknown + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Maps to google.protobuf.BoolValue + * Applicable operators: =, != + * + * Generated from protobuf enum BOOLEAN = 2; + */ + const BOOLEAN = 2; + /** + * Maps to google.protobuf.StringValue. It can be compared using the set of + * operators specific to dates however. + * Applicable operators: =, <, >, <=, >=, BETWEEN, DURING, and IN + * + * Generated from protobuf enum DATE = 3; + */ + const DATE = 3; + /** + * Maps to google.protobuf.DoubleValue + * Applicable operators: =, !=, <, >, IN, NOT IN + * + * Generated from protobuf enum DOUBLE = 4; + */ + const DOUBLE = 4; + /** + * Maps to an enum. It's specific definition can be found at type_url. + * Applicable operators: =, !=, IN, NOT IN + * + * Generated from protobuf enum ENUM = 5; + */ + const ENUM = 5; + /** + * Maps to google.protobuf.FloatValue + * Applicable operators: =, !=, <, >, IN, NOT IN + * + * Generated from protobuf enum FLOAT = 6; + */ + const FLOAT = 6; + /** + * Maps to google.protobuf.Int32Value + * Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN + * + * Generated from protobuf enum INT32 = 7; + */ + const INT32 = 7; + /** + * Maps to google.protobuf.Int64Value + * Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN + * + * Generated from protobuf enum INT64 = 8; + */ + const INT64 = 8; + /** + * Maps to a protocol buffer message type. The data type's details can be + * found in type_url. + * No operators work with MESSAGE fields. + * + * Generated from protobuf enum MESSAGE = 9; + */ + const MESSAGE = 9; + /** + * Maps to google.protobuf.StringValue. Represents the resource name + * (unique id) of a resource or one of its foreign keys. + * No operators work with RESOURCE_NAME fields. + * + * Generated from protobuf enum RESOURCE_NAME = 10; + */ + const RESOURCE_NAME = 10; + /** + * Maps to google.protobuf.StringValue. + * Applicable operators: =, !=, LIKE, NOT LIKE, IN, NOT IN + * + * Generated from protobuf enum STRING = 11; + */ + const STRING = 11; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/KeywordMatchTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/KeywordMatchTypeEnum.php new file mode 100644 index 000000000..283e6ca4e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/KeywordMatchTypeEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.KeywordMatchTypeEnum + */ +class KeywordMatchTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\KeywordMatchType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/KeywordMatchTypeEnum_KeywordMatchType.php b/src/Google/Ads/GoogleAds/V0/Enums/KeywordMatchTypeEnum_KeywordMatchType.php new file mode 100644 index 000000000..0e1dff412 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/KeywordMatchTypeEnum_KeywordMatchType.php @@ -0,0 +1,45 @@ +Google\Ads\Googleads\V0\Enums\KeywordMatchTypeEnum\KeywordMatchType + */ +class KeywordMatchTypeEnum_KeywordMatchType +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Exact match. + * + * Generated from protobuf enum EXACT = 2; + */ + const EXACT = 2; + /** + * Phrase match. + * + * Generated from protobuf enum PHRASE = 3; + */ + const PHRASE = 3; + /** + * Broad match. + * + * Generated from protobuf enum BROAD = 4; + */ + const BROAD = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/ListingCustomAttributeIndexEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/ListingCustomAttributeIndexEnum.php new file mode 100644 index 000000000..883ab3245 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/ListingCustomAttributeIndexEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.ListingCustomAttributeIndexEnum + */ +class ListingCustomAttributeIndexEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\ListingCustomAttributeIndex::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/ListingCustomAttributeIndexEnum_ListingCustomAttributeIndex.php b/src/Google/Ads/GoogleAds/V0/Enums/ListingCustomAttributeIndexEnum_ListingCustomAttributeIndex.php new file mode 100644 index 000000000..c37454736 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/ListingCustomAttributeIndexEnum_ListingCustomAttributeIndex.php @@ -0,0 +1,57 @@ +Google\Ads\Googleads\V0\Enums\ListingCustomAttributeIndexEnum\ListingCustomAttributeIndex + */ +class ListingCustomAttributeIndexEnum_ListingCustomAttributeIndex +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * First listing custom attribute. + * + * Generated from protobuf enum CUSTOM_ATTRIBUTE_0 = 2; + */ + const CUSTOM_ATTRIBUTE_0 = 2; + /** + * Second listing custom attribute. + * + * Generated from protobuf enum CUSTOM_ATTRIBUTE_1 = 3; + */ + const CUSTOM_ATTRIBUTE_1 = 3; + /** + * Third listing custom attribute. + * + * Generated from protobuf enum CUSTOM_ATTRIBUTE_2 = 4; + */ + const CUSTOM_ATTRIBUTE_2 = 4; + /** + * Fourth listing custom attribute. + * + * Generated from protobuf enum CUSTOM_ATTRIBUTE_3 = 5; + */ + const CUSTOM_ATTRIBUTE_3 = 5; + /** + * Fifth listing custom attribute. + * + * Generated from protobuf enum CUSTOM_ATTRIBUTE_4 = 6; + */ + const CUSTOM_ATTRIBUTE_4 = 6; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/ListingGroupTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/ListingGroupTypeEnum.php new file mode 100644 index 000000000..d7335299a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/ListingGroupTypeEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.ListingGroupTypeEnum + */ +class ListingGroupTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\ListingGroupType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/ListingGroupTypeEnum_ListingGroupType.php b/src/Google/Ads/GoogleAds/V0/Enums/ListingGroupTypeEnum_ListingGroupType.php new file mode 100644 index 000000000..26a9f4226 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/ListingGroupTypeEnum_ListingGroupType.php @@ -0,0 +1,41 @@ +Google\Ads\Googleads\V0\Enums\ListingGroupTypeEnum\ListingGroupType + */ +class ListingGroupTypeEnum_ListingGroupType +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Subdivision of products along some listing dimension. These nodes + * are not used by serving to target listing entries, but is purely + * to define the structure of the tree. + * + * Generated from protobuf enum SUBDIVISION = 2; + */ + const SUBDIVISION = 2; + /** + * Listing group unit that defines a bid. + * + * Generated from protobuf enum UNIT = 3; + */ + const UNIT = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/PageOnePromotedStrategyGoalEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/PageOnePromotedStrategyGoalEnum.php new file mode 100644 index 000000000..76e64b59e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/PageOnePromotedStrategyGoalEnum.php @@ -0,0 +1,26 @@ +google.ads.googleads.v0.enums.PageOnePromotedStrategyGoalEnum + */ +class PageOnePromotedStrategyGoalEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\PageOnePromotedStrategyGoal::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/PageOnePromotedStrategyGoalEnum_PageOnePromotedStrategyGoal.php b/src/Google/Ads/GoogleAds/V0/Enums/PageOnePromotedStrategyGoalEnum_PageOnePromotedStrategyGoal.php new file mode 100644 index 000000000..8bc0b5c23 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/PageOnePromotedStrategyGoalEnum_PageOnePromotedStrategyGoal.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Enums\PageOnePromotedStrategyGoalEnum\PageOnePromotedStrategyGoal + */ +class PageOnePromotedStrategyGoalEnum_PageOnePromotedStrategyGoal +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * First page on google.com. + * + * Generated from protobuf enum FIRST_PAGE = 2; + */ + const FIRST_PAGE = 2; + /** + * Top slots of the first page on google.com. + * + * Generated from protobuf enum FIRST_PAGE_PROMOTED = 3; + */ + const FIRST_PAGE_PROMOTED = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/QualityScoreBucketEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/QualityScoreBucketEnum.php new file mode 100644 index 000000000..c76358a4b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/QualityScoreBucketEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.QualityScoreBucketEnum + */ +class QualityScoreBucketEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\QualityScoreBucket::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/QualityScoreBucketEnum_QualityScoreBucket.php b/src/Google/Ads/GoogleAds/V0/Enums/QualityScoreBucketEnum_QualityScoreBucket.php new file mode 100644 index 000000000..48b21a194 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/QualityScoreBucketEnum_QualityScoreBucket.php @@ -0,0 +1,45 @@ +Google\Ads\Googleads\V0\Enums\QualityScoreBucketEnum\QualityScoreBucket + */ +class QualityScoreBucketEnum_QualityScoreBucket +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Quality of the creative is below average. + * + * Generated from protobuf enum BELOW_AVERAGE = 2; + */ + const BELOW_AVERAGE = 2; + /** + * Quality of the creative is average. + * + * Generated from protobuf enum AVERAGE = 3; + */ + const AVERAGE = 3; + /** + * Quality of the creative is above average. + * + * Generated from protobuf enum ABOVE_AVERAGE = 4; + */ + const ABOVE_AVERAGE = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/RecommendationTypeEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/RecommendationTypeEnum.php new file mode 100644 index 000000000..91ed32328 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/RecommendationTypeEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.RecommendationTypeEnum + */ +class RecommendationTypeEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\RecommendationType::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/RecommendationTypeEnum_RecommendationType.php b/src/Google/Ads/GoogleAds/V0/Enums/RecommendationTypeEnum_RecommendationType.php new file mode 100644 index 000000000..55b96f990 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/RecommendationTypeEnum_RecommendationType.php @@ -0,0 +1,51 @@ +Google\Ads\Googleads\V0\Enums\RecommendationTypeEnum\RecommendationType + */ +class RecommendationTypeEnum_RecommendationType +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Budget recommendation for budget constrained campaigns. + * + * Generated from protobuf enum CAMPAIGN_BUDGET = 2; + */ + const CAMPAIGN_BUDGET = 2; + /** + * Keyword recommendation. + * + * Generated from protobuf enum KEYWORD = 3; + */ + const KEYWORD = 3; + /** + * Recommendation to add a new text ad. + * + * Generated from protobuf enum TEXT_AD = 4; + */ + const TEXT_AD = 4; + /** + * Recommendation to update a campaign to use a Target CPA bidding strategy. + * + * Generated from protobuf enum TARGET_CPA_OPT_IN = 5; + */ + const TARGET_CPA_OPT_IN = 5; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/SlotEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/SlotEnum.php new file mode 100644 index 000000000..9f14adb2c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/SlotEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.SlotEnum + */ +class SlotEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\Slot::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/SlotEnum_Slot.php b/src/Google/Ads/GoogleAds/V0/Enums/SlotEnum_Slot.php new file mode 100644 index 000000000..f85711f64 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/SlotEnum_Slot.php @@ -0,0 +1,63 @@ +Google\Ads\Googleads\V0\Enums\SlotEnum\Slot + */ +class SlotEnum_Slot +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The value is unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Google search: Side. + * + * Generated from protobuf enum SEARCH_SIDE = 2; + */ + const SEARCH_SIDE = 2; + /** + * Google search: Top. + * + * Generated from protobuf enum SEARCH_TOP = 3; + */ + const SEARCH_TOP = 3; + /** + * Google search: Other. + * + * Generated from protobuf enum SEARCH_OTHER = 4; + */ + const SEARCH_OTHER = 4; + /** + * Google Display Network. + * + * Generated from protobuf enum CONTENT = 5; + */ + const CONTENT = 5; + /** + * Search partners: Top. + * + * Generated from protobuf enum SEARCH_PARTNER_TOP = 6; + */ + const SEARCH_PARTNER_TOP = 6; + /** + * Search partners: Other. + * + * Generated from protobuf enum SEARCH_PARTNER_OTHER = 7; + */ + const SEARCH_PARTNER_OTHER = 7; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/TargetCpaOptInRecommendationGoalEnum.php b/src/Google/Ads/GoogleAds/V0/Enums/TargetCpaOptInRecommendationGoalEnum.php new file mode 100644 index 000000000..c50d0d4af --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/TargetCpaOptInRecommendationGoalEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.enums.TargetCpaOptInRecommendationGoalEnum + */ +class TargetCpaOptInRecommendationGoalEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Enums\TargetCpaOptInRecommendationGoal::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Enums/TargetCpaOptInRecommendationGoalEnum_TargetCpaOptInRecommendationGoal.php b/src/Google/Ads/GoogleAds/V0/Enums/TargetCpaOptInRecommendationGoalEnum_TargetCpaOptInRecommendationGoal.php new file mode 100644 index 000000000..2d83efa23 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Enums/TargetCpaOptInRecommendationGoalEnum_TargetCpaOptInRecommendationGoal.php @@ -0,0 +1,52 @@ +Google\Ads\Googleads\V0\Enums\TargetCpaOptInRecommendationGoalEnum\TargetCpaOptInRecommendationGoal + */ +class TargetCpaOptInRecommendationGoalEnum_TargetCpaOptInRecommendationGoal +{ + /** + * Not specified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Used for return value only. Represents value unknown in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Recommendation to set Target CPA to maintain the same cost. + * + * Generated from protobuf enum SAME_COST = 2; + */ + const SAME_COST = 2; + /** + * Recommendation to set Target CPA to maintain the same conversions. + * + * Generated from protobuf enum SAME_CONVERSIONS = 3; + */ + const SAME_CONVERSIONS = 3; + /** + * Recommendation to set Target CPA to maintain the same CPA. + * + * Generated from protobuf enum SAME_CPA = 4; + */ + const SAME_CPA = 4; + /** + * Recommendation to set Target CPA to a value that is as close as possible + * to, yet lower than, the actual CPA (computed for past 28 days). + * + * Generated from protobuf enum CLOSEST_CPA = 5; + */ + const CLOSEST_CPA = 5; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdCustomizerErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/AdCustomizerErrorEnum.php new file mode 100644 index 000000000..0d39d5466 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdCustomizerErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.AdCustomizerErrorEnum + */ +class AdCustomizerErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\AdCustomizerError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdCustomizerErrorEnum_AdCustomizerError.php b/src/Google/Ads/GoogleAds/V0/Errors/AdCustomizerErrorEnum_AdCustomizerError.php new file mode 100644 index 000000000..6199b8d41 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdCustomizerErrorEnum_AdCustomizerError.php @@ -0,0 +1,57 @@ +Google\Ads\Googleads\V0\Errors\AdCustomizerErrorEnum\AdCustomizerError + */ +class AdCustomizerErrorEnum_AdCustomizerError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Invalid date argument in countdown function. + * + * Generated from protobuf enum COUNTDOWN_INVALID_DATE_FORMAT = 2; + */ + const COUNTDOWN_INVALID_DATE_FORMAT = 2; + /** + * Countdown end date is in the past. + * + * Generated from protobuf enum COUNTDOWN_DATE_IN_PAST = 3; + */ + const COUNTDOWN_DATE_IN_PAST = 3; + /** + * Invalid locale string in countdown function. + * + * Generated from protobuf enum COUNTDOWN_INVALID_LOCALE = 4; + */ + const COUNTDOWN_INVALID_LOCALE = 4; + /** + * Days-before argument to countdown function is not positive. + * + * Generated from protobuf enum COUNTDOWN_INVALID_START_DAYS_BEFORE = 5; + */ + const COUNTDOWN_INVALID_START_DAYS_BEFORE = 5; + /** + * A user list referenced in an IF function does not exist. + * + * Generated from protobuf enum UNKNOWN_USER_LIST = 6; + */ + const UNKNOWN_USER_LIST = 6; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/AdErrorEnum.php new file mode 100644 index 000000000..2d48d33f1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.AdErrorEnum + */ +class AdErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\AdError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdErrorEnum_AdError.php b/src/Google/Ads/GoogleAds/V0/Errors/AdErrorEnum_AdError.php new file mode 100644 index 000000000..f9d032f30 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdErrorEnum_AdError.php @@ -0,0 +1,825 @@ +Google\Ads\Googleads\V0\Errors\AdErrorEnum\AdError + */ +class AdErrorEnum_AdError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Ad customizers are not supported for ad type. + * + * Generated from protobuf enum AD_CUSTOMIZERS_NOT_SUPPORTED_FOR_AD_TYPE = 2; + */ + const AD_CUSTOMIZERS_NOT_SUPPORTED_FOR_AD_TYPE = 2; + /** + * Estimating character sizes the string is too long. + * + * Generated from protobuf enum APPROXIMATELY_TOO_LONG = 3; + */ + const APPROXIMATELY_TOO_LONG = 3; + /** + * Estimating character sizes the string is too short. + * + * Generated from protobuf enum APPROXIMATELY_TOO_SHORT = 4; + */ + const APPROXIMATELY_TOO_SHORT = 4; + /** + * There is a problem with the snippet. + * + * Generated from protobuf enum BAD_SNIPPET = 5; + */ + const BAD_SNIPPET = 5; + /** + * Cannot modify an ad. + * + * Generated from protobuf enum CANNOT_MODIFY_AD = 6; + */ + const CANNOT_MODIFY_AD = 6; + /** + * business name and url cannot be set at the same time + * + * Generated from protobuf enum CANNOT_SET_BUSINESS_NAME_IF_URL_SET = 7; + */ + const CANNOT_SET_BUSINESS_NAME_IF_URL_SET = 7; + /** + * The specified field is incompatible with this ad's type or settings. + * + * Generated from protobuf enum CANNOT_SET_FIELD = 8; + */ + const CANNOT_SET_FIELD = 8; + /** + * Cannot set field when originAdId is set. + * + * Generated from protobuf enum CANNOT_SET_FIELD_WITH_ORIGIN_AD_ID_SET = 9; + */ + const CANNOT_SET_FIELD_WITH_ORIGIN_AD_ID_SET = 9; + /** + * Cannot set field when an existing ad id is set for sharing. + * + * Generated from protobuf enum CANNOT_SET_FIELD_WITH_AD_ID_SET_FOR_SHARING = 10; + */ + const CANNOT_SET_FIELD_WITH_AD_ID_SET_FOR_SHARING = 10; + /** + * Cannot set allowFlexibleColor false if no color is provided by user. + * + * Generated from protobuf enum CANNOT_SET_ALLOW_FLEXIBLE_COLOR_FALSE = 11; + */ + const CANNOT_SET_ALLOW_FLEXIBLE_COLOR_FALSE = 11; + /** + * When user select native, no color control is allowed because we will + * always respect publisher color for native format serving. + * + * Generated from protobuf enum CANNOT_SET_COLOR_CONTROL_WHEN_NATIVE_FORMAT_SETTING = 12; + */ + const CANNOT_SET_COLOR_CONTROL_WHEN_NATIVE_FORMAT_SETTING = 12; + /** + * Cannot specify a url for the ad type + * + * Generated from protobuf enum CANNOT_SET_URL = 13; + */ + const CANNOT_SET_URL = 13; + /** + * Cannot specify a tracking or mobile url without also setting final urls + * + * Generated from protobuf enum CANNOT_SET_WITHOUT_FINAL_URLS = 14; + */ + const CANNOT_SET_WITHOUT_FINAL_URLS = 14; + /** + * Cannot specify a legacy url and a final url simultaneously + * + * Generated from protobuf enum CANNOT_SET_WITH_FINAL_URLS = 15; + */ + const CANNOT_SET_WITH_FINAL_URLS = 15; + /** + * Cannot specify a legacy url and a tracking url template simultaneously in + * a DSA. + * + * Generated from protobuf enum CANNOT_SET_WITH_TRACKING_URL_TEMPLATE = 16; + */ + const CANNOT_SET_WITH_TRACKING_URL_TEMPLATE = 16; + /** + * Cannot specify a urls in UrlData and in template fields simultaneously. + * + * Generated from protobuf enum CANNOT_SET_WITH_URL_DATA = 17; + */ + const CANNOT_SET_WITH_URL_DATA = 17; + /** + * This operator cannot be used with a subclass of Ad. + * + * Generated from protobuf enum CANNOT_USE_AD_SUBCLASS_FOR_OPERATOR = 18; + */ + const CANNOT_USE_AD_SUBCLASS_FOR_OPERATOR = 18; + /** + * Customer is not approved for mobile ads. + * + * Generated from protobuf enum CUSTOMER_NOT_APPROVED_MOBILEADS = 19; + */ + const CUSTOMER_NOT_APPROVED_MOBILEADS = 19; + /** + * Customer is not approved for 3PAS richmedia ads. + * + * Generated from protobuf enum CUSTOMER_NOT_APPROVED_THIRDPARTY_ADS = 20; + */ + const CUSTOMER_NOT_APPROVED_THIRDPARTY_ADS = 20; + /** + * Customer is not approved for 3PAS redirect richmedia (Ad Exchange) ads. + * + * Generated from protobuf enum CUSTOMER_NOT_APPROVED_THIRDPARTY_REDIRECT_ADS = 21; + */ + const CUSTOMER_NOT_APPROVED_THIRDPARTY_REDIRECT_ADS = 21; + /** + * Not an eligible customer + * + * Generated from protobuf enum CUSTOMER_NOT_ELIGIBLE = 22; + */ + const CUSTOMER_NOT_ELIGIBLE = 22; + /** + * Customer is not eligible for updating beacon url + * + * Generated from protobuf enum CUSTOMER_NOT_ELIGIBLE_FOR_UPDATING_BEACON_URL = 23; + */ + const CUSTOMER_NOT_ELIGIBLE_FOR_UPDATING_BEACON_URL = 23; + /** + * There already exists an ad with the same dimensions in the union. + * + * Generated from protobuf enum DIMENSION_ALREADY_IN_UNION = 24; + */ + const DIMENSION_ALREADY_IN_UNION = 24; + /** + * Ad's dimension must be set before setting union dimension. + * + * Generated from protobuf enum DIMENSION_MUST_BE_SET = 25; + */ + const DIMENSION_MUST_BE_SET = 25; + /** + * Ad's dimension must be included in the union dimensions. + * + * Generated from protobuf enum DIMENSION_NOT_IN_UNION = 26; + */ + const DIMENSION_NOT_IN_UNION = 26; + /** + * Display Url cannot be specified (applies to Ad Exchange Ads) + * + * Generated from protobuf enum DISPLAY_URL_CANNOT_BE_SPECIFIED = 27; + */ + const DISPLAY_URL_CANNOT_BE_SPECIFIED = 27; + /** + * Telephone number contains invalid characters or invalid format. Please + * re-enter your number using digits (0-9), dashes (-), and parentheses + * only. + * + * Generated from protobuf enum DOMESTIC_PHONE_NUMBER_FORMAT = 28; + */ + const DOMESTIC_PHONE_NUMBER_FORMAT = 28; + /** + * Emergency telephone numbers are not allowed. Please enter a valid + * domestic phone number to connect customers to your business. + * + * Generated from protobuf enum EMERGENCY_PHONE_NUMBER = 29; + */ + const EMERGENCY_PHONE_NUMBER = 29; + /** + * A required field was not specified or is an empty string. + * + * Generated from protobuf enum EMPTY_FIELD = 30; + */ + const EMPTY_FIELD = 30; + /** + * A feed attribute referenced in an ad customizer tag is not in the ad + * customizer mapping for the feed. + * + * Generated from protobuf enum FEED_ATTRIBUTE_MUST_HAVE_MAPPING_FOR_TYPE_ID = 31; + */ + const FEED_ATTRIBUTE_MUST_HAVE_MAPPING_FOR_TYPE_ID = 31; + /** + * The ad customizer field mapping for the feed attribute does not match the + * expected field type. + * + * Generated from protobuf enum FEED_ATTRIBUTE_MAPPING_TYPE_MISMATCH = 32; + */ + const FEED_ATTRIBUTE_MAPPING_TYPE_MISMATCH = 32; + /** + * The use of ad customizer tags in the ad text is disallowed. Details in + * trigger. + * + * Generated from protobuf enum ILLEGAL_AD_CUSTOMIZER_TAG_USE = 33; + */ + const ILLEGAL_AD_CUSTOMIZER_TAG_USE = 33; + /** + * Tags of the form {PH_x}, where x is a number, are disallowed in ad text. + * + * Generated from protobuf enum ILLEGAL_TAG_USE = 34; + */ + const ILLEGAL_TAG_USE = 34; + /** + * The dimensions of the ad are specified or derived in multiple ways and + * are not consistent. + * + * Generated from protobuf enum INCONSISTENT_DIMENSIONS = 35; + */ + const INCONSISTENT_DIMENSIONS = 35; + /** + * The status cannot differ among template ads of the same union. + * + * Generated from protobuf enum INCONSISTENT_STATUS_IN_TEMPLATE_UNION = 36; + */ + const INCONSISTENT_STATUS_IN_TEMPLATE_UNION = 36; + /** + * The length of the string is not valid. + * + * Generated from protobuf enum INCORRECT_LENGTH = 37; + */ + const INCORRECT_LENGTH = 37; + /** + * The ad is ineligible for upgrade. + * + * Generated from protobuf enum INELIGIBLE_FOR_UPGRADE = 38; + */ + const INELIGIBLE_FOR_UPGRADE = 38; + /** + * User cannot create mobile ad for countries targeted in specified + * campaign. + * + * Generated from protobuf enum INVALID_AD_ADDRESS_CAMPAIGN_TARGET = 39; + */ + const INVALID_AD_ADDRESS_CAMPAIGN_TARGET = 39; + /** + * Invalid Ad type. A specific type of Ad is required. + * + * Generated from protobuf enum INVALID_AD_TYPE = 40; + */ + const INVALID_AD_TYPE = 40; + /** + * Headline, description or phone cannot be present when creating mobile + * image ad. + * + * Generated from protobuf enum INVALID_ATTRIBUTES_FOR_MOBILE_IMAGE = 41; + */ + const INVALID_ATTRIBUTES_FOR_MOBILE_IMAGE = 41; + /** + * Image cannot be present when creating mobile text ad. + * + * Generated from protobuf enum INVALID_ATTRIBUTES_FOR_MOBILE_TEXT = 42; + */ + const INVALID_ATTRIBUTES_FOR_MOBILE_TEXT = 42; + /** + * Invalid call to action text. + * + * Generated from protobuf enum INVALID_CALL_TO_ACTION_TEXT = 43; + */ + const INVALID_CALL_TO_ACTION_TEXT = 43; + /** + * Invalid character in URL. + * + * Generated from protobuf enum INVALID_CHARACTER_FOR_URL = 44; + */ + const INVALID_CHARACTER_FOR_URL = 44; + /** + * Creative's country code is not valid. + * + * Generated from protobuf enum INVALID_COUNTRY_CODE = 45; + */ + const INVALID_COUNTRY_CODE = 45; + /** + * Invalid use of Dynamic Search Ads tags ({lpurl} etc.) + * + * Generated from protobuf enum INVALID_DSA_URL_TAG = 46; + */ + const INVALID_DSA_URL_TAG = 46; + /** + * Invalid use of Expanded Dynamic Search Ads tags ({lpurl} etc.) + * + * Generated from protobuf enum INVALID_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 47; + */ + const INVALID_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 47; + /** + * An input error whose real reason was not properly mapped (should not + * happen). + * + * Generated from protobuf enum INVALID_INPUT = 48; + */ + const INVALID_INPUT = 48; + /** + * An invalid markup language was entered. + * + * Generated from protobuf enum INVALID_MARKUP_LANGUAGE = 49; + */ + const INVALID_MARKUP_LANGUAGE = 49; + /** + * An invalid mobile carrier was entered. + * + * Generated from protobuf enum INVALID_MOBILE_CARRIER = 50; + */ + const INVALID_MOBILE_CARRIER = 50; + /** + * Specified mobile carriers target a country not targeted by the campaign. + * + * Generated from protobuf enum INVALID_MOBILE_CARRIER_TARGET = 51; + */ + const INVALID_MOBILE_CARRIER_TARGET = 51; + /** + * Wrong number of elements for given element type + * + * Generated from protobuf enum INVALID_NUMBER_OF_ELEMENTS = 52; + */ + const INVALID_NUMBER_OF_ELEMENTS = 52; + /** + * The format of the telephone number is incorrect. Please re-enter the + * number using the correct format. + * + * Generated from protobuf enum INVALID_PHONE_NUMBER_FORMAT = 53; + */ + const INVALID_PHONE_NUMBER_FORMAT = 53; + /** + * The certified vendor format id is incorrect. + * + * Generated from protobuf enum INVALID_RICH_MEDIA_CERTIFIED_VENDOR_FORMAT_ID = 54; + */ + const INVALID_RICH_MEDIA_CERTIFIED_VENDOR_FORMAT_ID = 54; + /** + * The template ad data contains validation errors. + * + * Generated from protobuf enum INVALID_TEMPLATE_DATA = 55; + */ + const INVALID_TEMPLATE_DATA = 55; + /** + * The template field doesn't have have the correct type. + * + * Generated from protobuf enum INVALID_TEMPLATE_ELEMENT_FIELD_TYPE = 56; + */ + const INVALID_TEMPLATE_ELEMENT_FIELD_TYPE = 56; + /** + * Invalid template id. + * + * Generated from protobuf enum INVALID_TEMPLATE_ID = 57; + */ + const INVALID_TEMPLATE_ID = 57; + /** + * After substituting replacement strings, the line is too wide. + * + * Generated from protobuf enum LINE_TOO_WIDE = 58; + */ + const LINE_TOO_WIDE = 58; + /** + * The feed referenced must have ad customizer mapping to be used in a + * customizer tag. + * + * Generated from protobuf enum MISSING_AD_CUSTOMIZER_MAPPING = 59; + */ + const MISSING_AD_CUSTOMIZER_MAPPING = 59; + /** + * Missing address component in template element address field. + * + * Generated from protobuf enum MISSING_ADDRESS_COMPONENT = 60; + */ + const MISSING_ADDRESS_COMPONENT = 60; + /** + * An ad name must be entered. + * + * Generated from protobuf enum MISSING_ADVERTISEMENT_NAME = 61; + */ + const MISSING_ADVERTISEMENT_NAME = 61; + /** + * Business name must be entered. + * + * Generated from protobuf enum MISSING_BUSINESS_NAME = 62; + */ + const MISSING_BUSINESS_NAME = 62; + /** + * Description (line 2) must be entered. + * + * Generated from protobuf enum MISSING_DESCRIPTION1 = 63; + */ + const MISSING_DESCRIPTION1 = 63; + /** + * Description (line 3) must be entered. + * + * Generated from protobuf enum MISSING_DESCRIPTION2 = 64; + */ + const MISSING_DESCRIPTION2 = 64; + /** + * The destination url must contain at least one tag (e.g. {lpurl}) + * + * Generated from protobuf enum MISSING_DESTINATION_URL_TAG = 65; + */ + const MISSING_DESTINATION_URL_TAG = 65; + /** + * The tracking url template of ExpandedDynamicSearchAd must contain at + * least one tag. (e.g. {lpurl}) + * + * Generated from protobuf enum MISSING_LANDING_PAGE_URL_TAG = 66; + */ + const MISSING_LANDING_PAGE_URL_TAG = 66; + /** + * A valid dimension must be specified for this ad. + * + * Generated from protobuf enum MISSING_DIMENSION = 67; + */ + const MISSING_DIMENSION = 67; + /** + * A display URL must be entered. + * + * Generated from protobuf enum MISSING_DISPLAY_URL = 68; + */ + const MISSING_DISPLAY_URL = 68; + /** + * Headline must be entered. + * + * Generated from protobuf enum MISSING_HEADLINE = 69; + */ + const MISSING_HEADLINE = 69; + /** + * A height must be entered. + * + * Generated from protobuf enum MISSING_HEIGHT = 70; + */ + const MISSING_HEIGHT = 70; + /** + * An image must be entered. + * + * Generated from protobuf enum MISSING_IMAGE = 71; + */ + const MISSING_IMAGE = 71; + /** + * Marketing image or product videos are required. + * + * Generated from protobuf enum MISSING_MARKETING_IMAGE_OR_PRODUCT_VIDEOS = 72; + */ + const MISSING_MARKETING_IMAGE_OR_PRODUCT_VIDEOS = 72; + /** + * The markup language in which your site is written must be entered. + * + * Generated from protobuf enum MISSING_MARKUP_LANGUAGES = 73; + */ + const MISSING_MARKUP_LANGUAGES = 73; + /** + * A mobile carrier must be entered. + * + * Generated from protobuf enum MISSING_MOBILE_CARRIER = 74; + */ + const MISSING_MOBILE_CARRIER = 74; + /** + * Phone number must be entered. + * + * Generated from protobuf enum MISSING_PHONE = 75; + */ + const MISSING_PHONE = 75; + /** + * Missing required template fields + * + * Generated from protobuf enum MISSING_REQUIRED_TEMPLATE_FIELDS = 76; + */ + const MISSING_REQUIRED_TEMPLATE_FIELDS = 76; + /** + * Missing a required field value + * + * Generated from protobuf enum MISSING_TEMPLATE_FIELD_VALUE = 77; + */ + const MISSING_TEMPLATE_FIELD_VALUE = 77; + /** + * The ad must have text. + * + * Generated from protobuf enum MISSING_TEXT = 78; + */ + const MISSING_TEXT = 78; + /** + * A visible URL must be entered. + * + * Generated from protobuf enum MISSING_VISIBLE_URL = 79; + */ + const MISSING_VISIBLE_URL = 79; + /** + * A width must be entered. + * + * Generated from protobuf enum MISSING_WIDTH = 80; + */ + const MISSING_WIDTH = 80; + /** + * Only 1 feed can be used as the source of ad customizer substitutions in a + * single ad. + * + * Generated from protobuf enum MULTIPLE_DISTINCT_FEEDS_UNSUPPORTED = 81; + */ + const MULTIPLE_DISTINCT_FEEDS_UNSUPPORTED = 81; + /** + * TempAdUnionId must be use when adding template ads. + * + * Generated from protobuf enum MUST_USE_TEMP_AD_UNION_ID_ON_ADD = 82; + */ + const MUST_USE_TEMP_AD_UNION_ID_ON_ADD = 82; + /** + * The string has too many characters. + * + * Generated from protobuf enum TOO_LONG = 83; + */ + const TOO_LONG = 83; + /** + * The string has too few characters. + * + * Generated from protobuf enum TOO_SHORT = 84; + */ + const TOO_SHORT = 84; + /** + * Ad union dimensions cannot change for saved ads. + * + * Generated from protobuf enum UNION_DIMENSIONS_CANNOT_CHANGE = 85; + */ + const UNION_DIMENSIONS_CANNOT_CHANGE = 85; + /** + * Address component is not {country, lat, lng}. + * + * Generated from protobuf enum UNKNOWN_ADDRESS_COMPONENT = 86; + */ + const UNKNOWN_ADDRESS_COMPONENT = 86; + /** + * Unknown unique field name + * + * Generated from protobuf enum UNKNOWN_FIELD_NAME = 87; + */ + const UNKNOWN_FIELD_NAME = 87; + /** + * Unknown unique name (template element type specifier) + * + * Generated from protobuf enum UNKNOWN_UNIQUE_NAME = 88; + */ + const UNKNOWN_UNIQUE_NAME = 88; + /** + * Unsupported ad dimension + * + * Generated from protobuf enum UNSUPPORTED_DIMENSIONS = 89; + */ + const UNSUPPORTED_DIMENSIONS = 89; + /** + * URL starts with an invalid scheme. + * + * Generated from protobuf enum URL_INVALID_SCHEME = 90; + */ + const URL_INVALID_SCHEME = 90; + /** + * URL ends with an invalid top-level domain name. + * + * Generated from protobuf enum URL_INVALID_TOP_LEVEL_DOMAIN = 91; + */ + const URL_INVALID_TOP_LEVEL_DOMAIN = 91; + /** + * URL contains illegal characters. + * + * Generated from protobuf enum URL_MALFORMED = 92; + */ + const URL_MALFORMED = 92; + /** + * URL must contain a host name. + * + * Generated from protobuf enum URL_NO_HOST = 93; + */ + const URL_NO_HOST = 93; + /** + * URL not equivalent during upgrade. + * + * Generated from protobuf enum URL_NOT_EQUIVALENT = 94; + */ + const URL_NOT_EQUIVALENT = 94; + /** + * URL host name too long to be stored as visible URL (applies to Ad + * Exchange ads) + * + * Generated from protobuf enum URL_HOST_NAME_TOO_LONG = 95; + */ + const URL_HOST_NAME_TOO_LONG = 95; + /** + * URL must start with a scheme. + * + * Generated from protobuf enum URL_NO_SCHEME = 96; + */ + const URL_NO_SCHEME = 96; + /** + * URL should end in a valid domain extension, such as .com or .net. + * + * Generated from protobuf enum URL_NO_TOP_LEVEL_DOMAIN = 97; + */ + const URL_NO_TOP_LEVEL_DOMAIN = 97; + /** + * URL must not end with a path. + * + * Generated from protobuf enum URL_PATH_NOT_ALLOWED = 98; + */ + const URL_PATH_NOT_ALLOWED = 98; + /** + * URL must not specify a port. + * + * Generated from protobuf enum URL_PORT_NOT_ALLOWED = 99; + */ + const URL_PORT_NOT_ALLOWED = 99; + /** + * URL must not contain a query. + * + * Generated from protobuf enum URL_QUERY_NOT_ALLOWED = 100; + */ + const URL_QUERY_NOT_ALLOWED = 100; + /** + * A url scheme is not allowed in front of tag in dest url (e.g. + * http://{lpurl}) + * + * Generated from protobuf enum URL_SCHEME_BEFORE_DSA_TAG = 101; + */ + const URL_SCHEME_BEFORE_DSA_TAG = 101; + /** + * A url scheme is not allowed in front of tag in tracking url template + * (e.g. http://{lpurl}) + * + * Generated from protobuf enum URL_SCHEME_BEFORE_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 102; + */ + const URL_SCHEME_BEFORE_EXPANDED_DYNAMIC_SEARCH_AD_TAG = 102; + /** + * The user does not have permissions to create a template ad for the given + * template. + * + * Generated from protobuf enum USER_DOES_NOT_HAVE_ACCESS_TO_TEMPLATE = 103; + */ + const USER_DOES_NOT_HAVE_ACCESS_TO_TEMPLATE = 103; + /** + * Expandable setting is inconsistent/wrong. For example, an AdX ad is + * invalid if it has a expandable vendor format but no expanding directions + * specified, or expanding directions is specified, but the vendor format is + * not expandable. + * + * Generated from protobuf enum INCONSISTENT_EXPANDABLE_SETTINGS = 104; + */ + const INCONSISTENT_EXPANDABLE_SETTINGS = 104; + /** + * Format is invalid + * + * Generated from protobuf enum INVALID_FORMAT = 105; + */ + const INVALID_FORMAT = 105; + /** + * The text of this field did not match a pattern of allowed values. + * + * Generated from protobuf enum INVALID_FIELD_TEXT = 106; + */ + const INVALID_FIELD_TEXT = 106; + /** + * Template element is mising + * + * Generated from protobuf enum ELEMENT_NOT_PRESENT = 107; + */ + const ELEMENT_NOT_PRESENT = 107; + /** + * Error occurred during image processing + * + * Generated from protobuf enum IMAGE_ERROR = 108; + */ + const IMAGE_ERROR = 108; + /** + * The value is not within the valid range + * + * Generated from protobuf enum VALUE_NOT_IN_RANGE = 109; + */ + const VALUE_NOT_IN_RANGE = 109; + /** + * Template element field is not present + * + * Generated from protobuf enum FIELD_NOT_PRESENT = 110; + */ + const FIELD_NOT_PRESENT = 110; + /** + * Address is incomplete + * + * Generated from protobuf enum ADDRESS_NOT_COMPLETE = 111; + */ + const ADDRESS_NOT_COMPLETE = 111; + /** + * Invalid address + * + * Generated from protobuf enum ADDRESS_INVALID = 112; + */ + const ADDRESS_INVALID = 112; + /** + * Error retrieving specified video + * + * Generated from protobuf enum VIDEO_RETRIEVAL_ERROR = 113; + */ + const VIDEO_RETRIEVAL_ERROR = 113; + /** + * Error processing audio + * + * Generated from protobuf enum AUDIO_ERROR = 114; + */ + const AUDIO_ERROR = 114; + /** + * Display URL is incorrect for YouTube PYV ads + * + * Generated from protobuf enum INVALID_YOUTUBE_DISPLAY_URL = 115; + */ + const INVALID_YOUTUBE_DISPLAY_URL = 115; + /** + * Too many product Images in GmailAd + * + * Generated from protobuf enum TOO_MANY_PRODUCT_IMAGES = 116; + */ + const TOO_MANY_PRODUCT_IMAGES = 116; + /** + * Too many product Videos in GmailAd + * + * Generated from protobuf enum TOO_MANY_PRODUCT_VIDEOS = 117; + */ + const TOO_MANY_PRODUCT_VIDEOS = 117; + /** + * The device preference is not compatible with the ad type + * + * Generated from protobuf enum INCOMPATIBLE_AD_TYPE_AND_DEVICE_PREFERENCE = 118; + */ + const INCOMPATIBLE_AD_TYPE_AND_DEVICE_PREFERENCE = 118; + /** + * Call tracking is not supported for specified country. + * + * Generated from protobuf enum CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 119; + */ + const CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY = 119; + /** + * Carrier specific short number is not allowed. + * + * Generated from protobuf enum CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 120; + */ + const CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED = 120; + /** + * Specified phone number type is disallowed. + * + * Generated from protobuf enum DISALLOWED_NUMBER_TYPE = 121; + */ + const DISALLOWED_NUMBER_TYPE = 121; + /** + * Phone number not supported for country. + * + * Generated from protobuf enum PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 122; + */ + const PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY = 122; + /** + * Phone number not supported with call tracking enabled for country. + * + * Generated from protobuf enum PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 123; + */ + const PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY = 123; + /** + * Premium rate phone number is not allowed. + * + * Generated from protobuf enum PREMIUM_RATE_NUMBER_NOT_ALLOWED = 124; + */ + const PREMIUM_RATE_NUMBER_NOT_ALLOWED = 124; + /** + * Vanity phone number is not allowed. + * + * Generated from protobuf enum VANITY_PHONE_NUMBER_NOT_ALLOWED = 125; + */ + const VANITY_PHONE_NUMBER_NOT_ALLOWED = 125; + /** + * Invalid call conversion type id. + * + * Generated from protobuf enum INVALID_CALL_CONVERSION_TYPE_ID = 126; + */ + const INVALID_CALL_CONVERSION_TYPE_ID = 126; + /** + * Cannot disable call conversion and set conversion type id. + * + * Generated from protobuf enum CANNOT_DISABLE_CALL_CONVERSION_AND_SET_CONVERSION_TYPE_ID = 127; + */ + const CANNOT_DISABLE_CALL_CONVERSION_AND_SET_CONVERSION_TYPE_ID = 127; + /** + * Cannot set path2 without path1. + * + * Generated from protobuf enum CANNOT_SET_PATH2_WITHOUT_PATH1 = 128; + */ + const CANNOT_SET_PATH2_WITHOUT_PATH1 = 128; + /** + * Missing domain name in campaign setting when adding expanded dynamic + * search ad. + * + * Generated from protobuf enum MISSING_DYNAMIC_SEARCH_ADS_SETTING_DOMAIN_NAME = 129; + */ + const MISSING_DYNAMIC_SEARCH_ADS_SETTING_DOMAIN_NAME = 129; + /** + * The associated ad is not compatible with restriction type. + * + * Generated from protobuf enum INCOMPATIBLE_WITH_RESTRICTION_TYPE = 130; + */ + const INCOMPATIBLE_WITH_RESTRICTION_TYPE = 130; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdGroupAdErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupAdErrorEnum.php new file mode 100644 index 000000000..ffc61eef2 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupAdErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.AdGroupAdErrorEnum + */ +class AdGroupAdErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\AdGroupAdError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdGroupAdErrorEnum_AdGroupAdError.php b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupAdErrorEnum_AdGroupAdError.php new file mode 100644 index 000000000..781d93a61 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupAdErrorEnum_AdGroupAdError.php @@ -0,0 +1,77 @@ +Google\Ads\Googleads\V0\Errors\AdGroupAdErrorEnum\AdGroupAdError + */ +class AdGroupAdErrorEnum_AdGroupAdError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * No link found between the adgroup ad and the label. + * + * Generated from protobuf enum AD_GROUP_AD_LABEL_DOES_NOT_EXIST = 2; + */ + const AD_GROUP_AD_LABEL_DOES_NOT_EXIST = 2; + /** + * The label has already been attached to the adgroup ad. + * + * Generated from protobuf enum AD_GROUP_AD_LABEL_ALREADY_EXISTS = 3; + */ + const AD_GROUP_AD_LABEL_ALREADY_EXISTS = 3; + /** + * The specified ad was not found in the adgroup + * + * Generated from protobuf enum AD_NOT_UNDER_ADGROUP = 4; + */ + const AD_NOT_UNDER_ADGROUP = 4; + /** + * Removed ads may not be modified + * + * Generated from protobuf enum CANNOT_OPERATE_ON_REMOVED_ADGROUPAD = 5; + */ + const CANNOT_OPERATE_ON_REMOVED_ADGROUPAD = 5; + /** + * An ad of this type is deprecated and cannot be created. Only deletions + * are permitted. + * + * Generated from protobuf enum CANNOT_CREATE_DEPRECATED_ADS = 6; + */ + const CANNOT_CREATE_DEPRECATED_ADS = 6; + /** + * Text ads are deprecated and cannot be created. Use expanded text ads + * instead. + * + * Generated from protobuf enum CANNOT_CREATE_TEXT_ADS = 7; + */ + const CANNOT_CREATE_TEXT_ADS = 7; + /** + * A required field was not specified or is an empty string. + * + * Generated from protobuf enum EMPTY_FIELD = 8; + */ + const EMPTY_FIELD = 8; + /** + * An ad may only be modified once per call + * + * Generated from protobuf enum RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 9; + */ + const RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 9; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdGroupBidModifierErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupBidModifierErrorEnum.php new file mode 100644 index 000000000..e1421552f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupBidModifierErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.AdGroupBidModifierErrorEnum + */ +class AdGroupBidModifierErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\AdGroupBidModifierError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdGroupBidModifierErrorEnum_AdGroupBidModifierError.php b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupBidModifierErrorEnum_AdGroupBidModifierError.php new file mode 100644 index 000000000..25fb203cd --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupBidModifierErrorEnum_AdGroupBidModifierError.php @@ -0,0 +1,40 @@ +Google\Ads\Googleads\V0\Errors\AdGroupBidModifierErrorEnum\AdGroupBidModifierError + */ +class AdGroupBidModifierErrorEnum_AdGroupBidModifierError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The criterion ID does not support bid modification. + * + * Generated from protobuf enum CRITERION_ID_NOT_SUPPORTED = 2; + */ + const CRITERION_ID_NOT_SUPPORTED = 2; + /** + * Cannot override the bid modifier for the given criterion ID if the parent + * campaign is opted out of the same criterion. + * + * Generated from protobuf enum CANNOT_OVERRIDE_OPTED_OUT_CAMPAIGN_CRITERION_BID_MODIFIER = 3; + */ + const CANNOT_OVERRIDE_OPTED_OUT_CAMPAIGN_CRITERION_BID_MODIFIER = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdGroupCriterionErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupCriterionErrorEnum.php new file mode 100644 index 000000000..78534bcac --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupCriterionErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.AdGroupCriterionErrorEnum + */ +class AdGroupCriterionErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\AdGroupCriterionError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdGroupCriterionErrorEnum_AdGroupCriterionError.php b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupCriterionErrorEnum_AdGroupCriterionError.php new file mode 100644 index 000000000..dbcff7a79 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupCriterionErrorEnum_AdGroupCriterionError.php @@ -0,0 +1,259 @@ +Google\Ads\Googleads\V0\Errors\AdGroupCriterionErrorEnum\AdGroupCriterionError + */ +class AdGroupCriterionErrorEnum_AdGroupCriterionError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * No link found between the AdGroupCriterion and the label. + * + * Generated from protobuf enum AD_GROUP_CRITERION_LABEL_DOES_NOT_EXIST = 2; + */ + const AD_GROUP_CRITERION_LABEL_DOES_NOT_EXIST = 2; + /** + * The label has already been attached to the AdGroupCriterion. + * + * Generated from protobuf enum AD_GROUP_CRITERION_LABEL_ALREADY_EXISTS = 3; + */ + const AD_GROUP_CRITERION_LABEL_ALREADY_EXISTS = 3; + /** + * Negative AdGroupCriterion cannot have labels. + * + * Generated from protobuf enum CANNOT_ADD_LABEL_TO_NEGATIVE_CRITERION = 4; + */ + const CANNOT_ADD_LABEL_TO_NEGATIVE_CRITERION = 4; + /** + * Too many operations for a single call. + * + * Generated from protobuf enum TOO_MANY_OPERATIONS = 5; + */ + const TOO_MANY_OPERATIONS = 5; + /** + * Negative ad group criteria are not updateable. + * + * Generated from protobuf enum CANT_UPDATE_NEGATIVE = 6; + */ + const CANT_UPDATE_NEGATIVE = 6; + /** + * Concrete type of criterion (keyword v.s. placement) is required for ADD + * and SET operations. + * + * Generated from protobuf enum CONCRETE_TYPE_REQUIRED = 7; + */ + const CONCRETE_TYPE_REQUIRED = 7; + /** + * Bid is incompatible with ad group's bidding settings. + * + * Generated from protobuf enum BID_INCOMPATIBLE_WITH_ADGROUP = 8; + */ + const BID_INCOMPATIBLE_WITH_ADGROUP = 8; + /** + * Cannot target and exclude the same criterion at once. + * + * Generated from protobuf enum CANNOT_TARGET_AND_EXCLUDE = 9; + */ + const CANNOT_TARGET_AND_EXCLUDE = 9; + /** + * The URL of a placement is invalid. + * + * Generated from protobuf enum ILLEGAL_URL = 10; + */ + const ILLEGAL_URL = 10; + /** + * Keyword text was invalid. + * + * Generated from protobuf enum INVALID_KEYWORD_TEXT = 11; + */ + const INVALID_KEYWORD_TEXT = 11; + /** + * Destination URL was invalid. + * + * Generated from protobuf enum INVALID_DESTINATION_URL = 12; + */ + const INVALID_DESTINATION_URL = 12; + /** + * The destination url must contain at least one tag (e.g. {lpurl}) + * + * Generated from protobuf enum MISSING_DESTINATION_URL_TAG = 13; + */ + const MISSING_DESTINATION_URL_TAG = 13; + /** + * Keyword-level cpm bid is not supported + * + * Generated from protobuf enum KEYWORD_LEVEL_BID_NOT_SUPPORTED_FOR_MANUALCPM = 14; + */ + const KEYWORD_LEVEL_BID_NOT_SUPPORTED_FOR_MANUALCPM = 14; + /** + * For example, cannot add a biddable ad group criterion that had been + * removed. + * + * Generated from protobuf enum INVALID_USER_STATUS = 15; + */ + const INVALID_USER_STATUS = 15; + /** + * Criteria type cannot be targeted for the ad group. Either the account is + * restricted to keywords only, the criteria type is incompatible with the + * campaign's bidding strategy, or the criteria type can only be applied to + * campaigns. + * + * Generated from protobuf enum CANNOT_ADD_CRITERIA_TYPE = 16; + */ + const CANNOT_ADD_CRITERIA_TYPE = 16; + /** + * Criteria type cannot be excluded for the ad group. Refer to the + * documentation for a specific criterion to check if it is excludable. + * + * Generated from protobuf enum CANNOT_EXCLUDE_CRITERIA_TYPE = 17; + */ + const CANNOT_EXCLUDE_CRITERIA_TYPE = 17; + /** + * Partial failure is not supported for shopping campaign mutate operations. + * + * Generated from protobuf enum CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE = 27; + */ + const CAMPAIGN_TYPE_NOT_COMPATIBLE_WITH_PARTIAL_FAILURE = 27; + /** + * Operations in the mutate request changes too many shopping ad groups. + * Please split requests for multiple shopping ad groups across multiple + * requests. + * + * Generated from protobuf enum OPERATIONS_FOR_TOO_MANY_SHOPPING_ADGROUPS = 28; + */ + const OPERATIONS_FOR_TOO_MANY_SHOPPING_ADGROUPS = 28; + /** + * Not allowed to modify url fields of an ad group criterion if there are + * duplicate elements for that ad group criterion in the request. + * + * Generated from protobuf enum CANNOT_MODIFY_URL_FIELDS_WITH_DUPLICATE_ELEMENTS = 29; + */ + const CANNOT_MODIFY_URL_FIELDS_WITH_DUPLICATE_ELEMENTS = 29; + /** + * Cannot set url fields without also setting final urls. + * + * Generated from protobuf enum CANNOT_SET_WITHOUT_FINAL_URLS = 30; + */ + const CANNOT_SET_WITHOUT_FINAL_URLS = 30; + /** + * Cannot clear final urls if final mobile urls exist. + * + * Generated from protobuf enum CANNOT_CLEAR_FINAL_URLS_IF_FINAL_MOBILE_URLS_EXIST = 31; + */ + const CANNOT_CLEAR_FINAL_URLS_IF_FINAL_MOBILE_URLS_EXIST = 31; + /** + * Cannot clear final urls if final app urls exist. + * + * Generated from protobuf enum CANNOT_CLEAR_FINAL_URLS_IF_FINAL_APP_URLS_EXIST = 32; + */ + const CANNOT_CLEAR_FINAL_URLS_IF_FINAL_APP_URLS_EXIST = 32; + /** + * Cannot clear final urls if tracking url template exists. + * + * Generated from protobuf enum CANNOT_CLEAR_FINAL_URLS_IF_TRACKING_URL_TEMPLATE_EXISTS = 33; + */ + const CANNOT_CLEAR_FINAL_URLS_IF_TRACKING_URL_TEMPLATE_EXISTS = 33; + /** + * Cannot clear final urls if url custom parameters exist. + * + * Generated from protobuf enum CANNOT_CLEAR_FINAL_URLS_IF_URL_CUSTOM_PARAMETERS_EXIST = 34; + */ + const CANNOT_CLEAR_FINAL_URLS_IF_URL_CUSTOM_PARAMETERS_EXIST = 34; + /** + * Cannot set both destination url and final urls. + * + * Generated from protobuf enum CANNOT_SET_BOTH_DESTINATION_URL_AND_FINAL_URLS = 35; + */ + const CANNOT_SET_BOTH_DESTINATION_URL_AND_FINAL_URLS = 35; + /** + * Cannot set both destination url and tracking url template. + * + * Generated from protobuf enum CANNOT_SET_BOTH_DESTINATION_URL_AND_TRACKING_URL_TEMPLATE = 36; + */ + const CANNOT_SET_BOTH_DESTINATION_URL_AND_TRACKING_URL_TEMPLATE = 36; + /** + * Final urls are not supported for this criterion type. + * + * Generated from protobuf enum FINAL_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 37; + */ + const FINAL_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 37; + /** + * Final mobile urls are not supported for this criterion type. + * + * Generated from protobuf enum FINAL_MOBILE_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 38; + */ + const FINAL_MOBILE_URLS_NOT_SUPPORTED_FOR_CRITERION_TYPE = 38; + /** + * Ad group is invalid due to the listing groups it contains. + * + * Generated from protobuf enum INVALID_LISTING_GROUP_HIERARCHY = 39; + */ + const INVALID_LISTING_GROUP_HIERARCHY = 39; + /** + * Listing group unit cannot have children. + * + * Generated from protobuf enum LISTING_GROUP_UNIT_CANNOT_HAVE_CHILDREN = 40; + */ + const LISTING_GROUP_UNIT_CANNOT_HAVE_CHILDREN = 40; + /** + * Subdivided listing groups must have an "others" case. + * + * Generated from protobuf enum LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE = 41; + */ + const LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE = 41; + /** + * Dimension type of listing group must be the same as that of its siblings. + * + * Generated from protobuf enum LISTING_GROUP_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS = 42; + */ + const LISTING_GROUP_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS = 42; + /** + * Listing group cannot be added to the ad group because it already exists. + * + * Generated from protobuf enum LISTING_GROUP_ALREADY_EXISTS = 43; + */ + const LISTING_GROUP_ALREADY_EXISTS = 43; + /** + * Listing group referenced in the operation was not found in the ad group. + * + * Generated from protobuf enum LISTING_GROUP_DOES_NOT_EXIST = 44; + */ + const LISTING_GROUP_DOES_NOT_EXIST = 44; + /** + * Recursive removal failed because listing group subdivision is being + * created or modified in this request. + * + * Generated from protobuf enum LISTING_GROUP_CANNOT_BE_REMOVED = 45; + */ + const LISTING_GROUP_CANNOT_BE_REMOVED = 45; + /** + * Listing group type is not allowed for specified ad group criterion type. + * + * Generated from protobuf enum INVALID_LISTING_GROUP_TYPE = 46; + */ + const INVALID_LISTING_GROUP_TYPE = 46; + /** + * Listing group in an ADD operation specifies a non temporary criterion id. + * + * Generated from protobuf enum LISTING_GROUP_ADD_MAY_ONLY_USE_TEMP_ID = 47; + */ + const LISTING_GROUP_ADD_MAY_ONLY_USE_TEMP_ID = 47; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdGroupErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupErrorEnum.php new file mode 100644 index 000000000..763f4c07a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.AdGroupErrorEnum + */ +class AdGroupErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\AdGroupError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdGroupErrorEnum_AdGroupError.php b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupErrorEnum_AdGroupError.php new file mode 100644 index 000000000..1b64834d5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdGroupErrorEnum_AdGroupError.php @@ -0,0 +1,102 @@ +Google\Ads\Googleads\V0\Errors\AdGroupErrorEnum\AdGroupError + */ +class AdGroupErrorEnum_AdGroupError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * AdGroup with the same name already exists for the campaign. + * + * Generated from protobuf enum DUPLICATE_ADGROUP_NAME = 2; + */ + const DUPLICATE_ADGROUP_NAME = 2; + /** + * AdGroup name is not valid. + * + * Generated from protobuf enum INVALID_ADGROUP_NAME = 3; + */ + const INVALID_ADGROUP_NAME = 3; + /** + * Advertiser is not allowed to target sites or set site bids that are not + * on the Google Search Network. + * + * Generated from protobuf enum ADVERTISER_NOT_ON_CONTENT_NETWORK = 5; + */ + const ADVERTISER_NOT_ON_CONTENT_NETWORK = 5; + /** + * Bid amount is too big. + * + * Generated from protobuf enum BID_TOO_BIG = 6; + */ + const BID_TOO_BIG = 6; + /** + * AdGroup bid does not match the campaign's bidding strategy. + * + * Generated from protobuf enum BID_TYPE_AND_BIDDING_STRATEGY_MISMATCH = 7; + */ + const BID_TYPE_AND_BIDDING_STRATEGY_MISMATCH = 7; + /** + * AdGroup name is required for Add. + * + * Generated from protobuf enum MISSING_ADGROUP_NAME = 8; + */ + const MISSING_ADGROUP_NAME = 8; + /** + * No link found between the ad group and the label. + * + * Generated from protobuf enum ADGROUP_LABEL_DOES_NOT_EXIST = 9; + */ + const ADGROUP_LABEL_DOES_NOT_EXIST = 9; + /** + * The label has already been attached to the ad group. + * + * Generated from protobuf enum ADGROUP_LABEL_ALREADY_EXISTS = 10; + */ + const ADGROUP_LABEL_ALREADY_EXISTS = 10; + /** + * The CriterionTypeGroup is not supported for the content bid dimension. + * + * Generated from protobuf enum INVALID_CONTENT_BID_CRITERION_TYPE_GROUP = 11; + */ + const INVALID_CONTENT_BID_CRITERION_TYPE_GROUP = 11; + /** + * The ad group type is not compatible with the campaign channel type. + * + * Generated from protobuf enum AD_GROUP_TYPE_NOT_VALID_FOR_ADVERTISING_CHANNEL_TYPE = 12; + */ + const AD_GROUP_TYPE_NOT_VALID_FOR_ADVERTISING_CHANNEL_TYPE = 12; + /** + * The ad group type is not supported in the country of sale of the + * campaign. + * + * Generated from protobuf enum ADGROUP_TYPE_NOT_SUPPORTED_FOR_CAMPAIGN_SALES_COUNTRY = 13; + */ + const ADGROUP_TYPE_NOT_SUPPORTED_FOR_CAMPAIGN_SALES_COUNTRY = 13; + /** + * Ad groups of AdGroupType.SEARCH_DYNAMIC_ADS can only be added to + * campaigns that have DynamicSearchAdsSetting attached. + * + * Generated from protobuf enum CANNOT_ADD_ADGROUP_OF_TYPE_DSA_TO_CAMPAIGN_WITHOUT_DSA_SETTING = 14; + */ + const CANNOT_ADD_ADGROUP_OF_TYPE_DSA_TO_CAMPAIGN_WITHOUT_DSA_SETTING = 14; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdSharingErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/AdSharingErrorEnum.php new file mode 100644 index 000000000..3a9de1664 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdSharingErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.AdSharingErrorEnum + */ +class AdSharingErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\AdSharingError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdSharingErrorEnum_AdSharingError.php b/src/Google/Ads/GoogleAds/V0/Errors/AdSharingErrorEnum_AdSharingError.php new file mode 100644 index 000000000..b2387d764 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdSharingErrorEnum_AdSharingError.php @@ -0,0 +1,46 @@ +Google\Ads\Googleads\V0\Errors\AdSharingErrorEnum\AdSharingError + */ +class AdSharingErrorEnum_AdSharingError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Error resulting in attempting to add an Ad to an AdGroup that already + * contains the Ad. + * + * Generated from protobuf enum AD_GROUP_ALREADY_CONTAINS_AD = 2; + */ + const AD_GROUP_ALREADY_CONTAINS_AD = 2; + /** + * Ad is not compatible with the AdGroup it is being shared with. + * + * Generated from protobuf enum INCOMPATIBLE_AD_UNDER_AD_GROUP = 3; + */ + const INCOMPATIBLE_AD_UNDER_AD_GROUP = 3; + /** + * Cannot add AdGroupAd on inactive Ad. + * + * Generated from protobuf enum CANNOT_SHARE_INACTIVE_AD = 4; + */ + const CANNOT_SHARE_INACTIVE_AD = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdxErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/AdxErrorEnum.php new file mode 100644 index 000000000..07465669e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdxErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.AdxErrorEnum + */ +class AdxErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\AdxError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AdxErrorEnum_AdxError.php b/src/Google/Ads/GoogleAds/V0/Errors/AdxErrorEnum_AdxError.php new file mode 100644 index 000000000..83f6c6f0a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AdxErrorEnum_AdxError.php @@ -0,0 +1,33 @@ +Google\Ads\Googleads\V0\Errors\AdxErrorEnum\AdxError + */ +class AdxErrorEnum_AdxError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Attempt to use non-AdX feature by AdX customer. + * + * Generated from protobuf enum UNSUPPORTED_FEATURE = 2; + */ + const UNSUPPORTED_FEATURE = 2; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AuthenticationErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/AuthenticationErrorEnum.php new file mode 100644 index 000000000..d035f4d9e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AuthenticationErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.AuthenticationErrorEnum + */ +class AuthenticationErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\AuthenticationError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AuthenticationErrorEnum_AuthenticationError.php b/src/Google/Ads/GoogleAds/V0/Errors/AuthenticationErrorEnum_AuthenticationError.php new file mode 100644 index 000000000..84552f3b1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AuthenticationErrorEnum_AuthenticationError.php @@ -0,0 +1,130 @@ +Google\Ads\Googleads\V0\Errors\AuthenticationErrorEnum\AuthenticationError + */ +class AuthenticationErrorEnum_AuthenticationError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Authentication of the request failed. + * + * Generated from protobuf enum AUTHENTICATION_ERROR = 2; + */ + const AUTHENTICATION_ERROR = 2; + /** + * Client customer Id is not a number. + * + * Generated from protobuf enum CLIENT_CUSTOMER_ID_INVALID = 5; + */ + const CLIENT_CUSTOMER_ID_INVALID = 5; + /** + * No customer found for the customer id provided in the header. + * + * Generated from protobuf enum CUSTOMER_NOT_FOUND = 8; + */ + const CUSTOMER_NOT_FOUND = 8; + /** + * Client's Google Account is deleted. + * + * Generated from protobuf enum GOOGLE_ACCOUNT_DELETED = 9; + */ + const GOOGLE_ACCOUNT_DELETED = 9; + /** + * Google account login token in the cookie is invalid. + * + * Generated from protobuf enum GOOGLE_ACCOUNT_COOKIE_INVALID = 10; + */ + const GOOGLE_ACCOUNT_COOKIE_INVALID = 10; + /** + * A problem occurred during Google account authentication. + * + * Generated from protobuf enum FAILED_TO_AUTHENTICATE_GOOGLE_ACCOUNT = 11; + */ + const FAILED_TO_AUTHENTICATE_GOOGLE_ACCOUNT = 11; + /** + * The user in the google account login token does not match the UserId in + * the cookie. + * + * Generated from protobuf enum GOOGLE_ACCOUNT_USER_AND_ADS_USER_MISMATCH = 12; + */ + const GOOGLE_ACCOUNT_USER_AND_ADS_USER_MISMATCH = 12; + /** + * Login cookie is required for authentication. + * + * Generated from protobuf enum LOGIN_COOKIE_REQUIRED = 13; + */ + const LOGIN_COOKIE_REQUIRED = 13; + /** + * User in the cookie is not a valid Ads user. + * + * Generated from protobuf enum NOT_ADS_USER = 14; + */ + const NOT_ADS_USER = 14; + /** + * Oauth token in the header is not valid. + * + * Generated from protobuf enum OAUTH_TOKEN_INVALID = 15; + */ + const OAUTH_TOKEN_INVALID = 15; + /** + * Oauth token in the header has expired. + * + * Generated from protobuf enum OAUTH_TOKEN_EXPIRED = 16; + */ + const OAUTH_TOKEN_EXPIRED = 16; + /** + * Oauth token in the header has been disabled. + * + * Generated from protobuf enum OAUTH_TOKEN_DISABLED = 17; + */ + const OAUTH_TOKEN_DISABLED = 17; + /** + * Oauth token in the header has been revoked. + * + * Generated from protobuf enum OAUTH_TOKEN_REVOKED = 18; + */ + const OAUTH_TOKEN_REVOKED = 18; + /** + * Oauth token HTTP header is malformed. + * + * Generated from protobuf enum OAUTH_TOKEN_HEADER_INVALID = 19; + */ + const OAUTH_TOKEN_HEADER_INVALID = 19; + /** + * Login cookie is not valid. + * + * Generated from protobuf enum LOGIN_COOKIE_INVALID = 20; + */ + const LOGIN_COOKIE_INVALID = 20; + /** + * Failed to decrypt the login cookie. + * + * Generated from protobuf enum FAILED_TO_RETRIEVE_LOGIN_COOKIE = 21; + */ + const FAILED_TO_RETRIEVE_LOGIN_COOKIE = 21; + /** + * User Id in the header is not a valid id. + * + * Generated from protobuf enum USER_ID_INVALID = 22; + */ + const USER_ID_INVALID = 22; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AuthorizationErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/AuthorizationErrorEnum.php new file mode 100644 index 000000000..d966df87e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AuthorizationErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.AuthorizationErrorEnum + */ +class AuthorizationErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\AuthorizationError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/AuthorizationErrorEnum_AuthorizationError.php b/src/Google/Ads/GoogleAds/V0/Errors/AuthorizationErrorEnum_AuthorizationError.php new file mode 100644 index 000000000..43cff2771 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/AuthorizationErrorEnum_AuthorizationError.php @@ -0,0 +1,58 @@ +Google\Ads\Googleads\V0\Errors\AuthorizationErrorEnum\AuthorizationError + */ +class AuthorizationErrorEnum_AuthorizationError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * User doesn't have permission to access customer. + * + * Generated from protobuf enum USER_PERMISSION_DENIED = 2; + */ + const USER_PERMISSION_DENIED = 2; + /** + * The developer token is not whitelisted. + * + * Generated from protobuf enum DEVELOPER_TOKEN_NOT_WHITELISTED = 3; + */ + const DEVELOPER_TOKEN_NOT_WHITELISTED = 3; + /** + * The developer token is not allowed with the project sent in the request. + * + * Generated from protobuf enum DEVELOPER_TOKEN_PROHIBITED = 4; + */ + const DEVELOPER_TOKEN_PROHIBITED = 4; + /** + * The Google Cloud project sent in the request does not have permission to + * access the api. + * + * Generated from protobuf enum PROJECT_DISABLED = 5; + */ + const PROJECT_DISABLED = 5; + /** + * Authorization of the client failed. + * + * Generated from protobuf enum AUTHORIZATION_ERROR = 6; + */ + const AUTHORIZATION_ERROR = 6; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/BiddingErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/BiddingErrorEnum.php new file mode 100644 index 000000000..b9b180891 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/BiddingErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.BiddingErrorEnum + */ +class BiddingErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\BiddingError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/BiddingErrorEnum_BiddingError.php b/src/Google/Ads/GoogleAds/V0/Errors/BiddingErrorEnum_BiddingError.php new file mode 100644 index 000000000..5a8dbcbc7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/BiddingErrorEnum_BiddingError.php @@ -0,0 +1,152 @@ +Google\Ads\Googleads\V0\Errors\BiddingErrorEnum\BiddingError + */ +class BiddingErrorEnum_BiddingError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Cannot transition to new bidding strategy. + * + * Generated from protobuf enum BIDDING_STRATEGY_TRANSITION_NOT_ALLOWED = 2; + */ + const BIDDING_STRATEGY_TRANSITION_NOT_ALLOWED = 2; + /** + * Cannot attach bidding strategy to campaign. + * + * Generated from protobuf enum CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN = 7; + */ + const CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN = 7; + /** + * Bidding strategy is not supported or cannot be used as anonymous. + * + * Generated from protobuf enum INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE = 10; + */ + const INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE = 10; + /** + * The type does not match the named strategy's type. + * + * Generated from protobuf enum INVALID_BIDDING_STRATEGY_TYPE = 14; + */ + const INVALID_BIDDING_STRATEGY_TYPE = 14; + /** + * The bid is invalid. + * + * Generated from protobuf enum INVALID_BID = 17; + */ + const INVALID_BID = 17; + /** + * Bidding strategy is not available for the account type. + * + * Generated from protobuf enum BIDDING_STRATEGY_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 18; + */ + const BIDDING_STRATEGY_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 18; + /** + * Conversion tracking is not enabled for the campaign for VBB transition. + * + * Generated from protobuf enum CONVERSION_TRACKING_NOT_ENABLED = 19; + */ + const CONVERSION_TRACKING_NOT_ENABLED = 19; + /** + * Not enough conversions tracked for VBB transitions. + * + * Generated from protobuf enum NOT_ENOUGH_CONVERSIONS = 20; + */ + const NOT_ENOUGH_CONVERSIONS = 20; + /** + * Campaign can not be created with given bidding strategy. It can be + * transitioned to the strategy, once eligible. + * + * Generated from protobuf enum CANNOT_CREATE_CAMPAIGN_WITH_BIDDING_STRATEGY = 21; + */ + const CANNOT_CREATE_CAMPAIGN_WITH_BIDDING_STRATEGY = 21; + /** + * Cannot target content network only as campaign uses Page One Promoted + * bidding strategy. + * + * Generated from protobuf enum CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CAMPAIGN_LEVEL_POP_BIDDING_STRATEGY = 23; + */ + const CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CAMPAIGN_LEVEL_POP_BIDDING_STRATEGY = 23; + /** + * Budget Optimizer and Target Spend bidding strategies are not supported + * for campaigns with AdSchedule targeting. + * + * Generated from protobuf enum BIDDING_STRATEGY_NOT_SUPPORTED_WITH_AD_SCHEDULE = 24; + */ + const BIDDING_STRATEGY_NOT_SUPPORTED_WITH_AD_SCHEDULE = 24; + /** + * Pay per conversion is not available to all the customer, only few + * whitelisted customers can use this. + * + * Generated from protobuf enum PAY_PER_CONVERSION_NOT_AVAILABLE_FOR_CUSTOMER = 25; + */ + const PAY_PER_CONVERSION_NOT_AVAILABLE_FOR_CUSTOMER = 25; + /** + * Pay per conversion is not allowed with Target CPA. + * + * Generated from protobuf enum PAY_PER_CONVERSION_NOT_ALLOWED_WITH_TARGET_CPA = 26; + */ + const PAY_PER_CONVERSION_NOT_ALLOWED_WITH_TARGET_CPA = 26; + /** + * Cannot set bidding strategy to Manual CPM for search network only + * campaigns. + * + * Generated from protobuf enum BIDDING_STRATEGY_NOT_ALLOWED_FOR_SEARCH_ONLY_CAMPAIGNS = 27; + */ + const BIDDING_STRATEGY_NOT_ALLOWED_FOR_SEARCH_ONLY_CAMPAIGNS = 27; + /** + * The bidding strategy is not supported for use in drafts or experiments. + * + * Generated from protobuf enum BIDDING_STRATEGY_NOT_SUPPORTED_IN_DRAFTS_OR_EXPERIMENTS = 28; + */ + const BIDDING_STRATEGY_NOT_SUPPORTED_IN_DRAFTS_OR_EXPERIMENTS = 28; + /** + * Bidding strategy type does not support product type ad group criterion. + * + * Generated from protobuf enum BIDDING_STRATEGY_TYPE_DOES_NOT_SUPPORT_PRODUCT_TYPE_ADGROUP_CRITERION = 29; + */ + const BIDDING_STRATEGY_TYPE_DOES_NOT_SUPPORT_PRODUCT_TYPE_ADGROUP_CRITERION = 29; + /** + * Bid amount is too small. + * + * Generated from protobuf enum BID_TOO_SMALL = 30; + */ + const BID_TOO_SMALL = 30; + /** + * Bid amount is too big. + * + * Generated from protobuf enum BID_TOO_BIG = 31; + */ + const BID_TOO_BIG = 31; + /** + * Bid has too many fractional digit precision. + * + * Generated from protobuf enum BID_TOO_MANY_FRACTIONAL_DIGITS = 32; + */ + const BID_TOO_MANY_FRACTIONAL_DIGITS = 32; + /** + * Invalid domain name specified. + * + * Generated from protobuf enum INVALID_DOMAIN_NAME = 33; + */ + const INVALID_DOMAIN_NAME = 33; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/BiddingStrategyErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/BiddingStrategyErrorEnum.php new file mode 100644 index 000000000..92ae77e6c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/BiddingStrategyErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.BiddingStrategyErrorEnum + */ +class BiddingStrategyErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\BiddingStrategyError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/BiddingStrategyErrorEnum_BiddingStrategyError.php b/src/Google/Ads/GoogleAds/V0/Errors/BiddingStrategyErrorEnum_BiddingStrategyError.php new file mode 100644 index 000000000..8404fc6bf --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/BiddingStrategyErrorEnum_BiddingStrategyError.php @@ -0,0 +1,52 @@ +Google\Ads\Googleads\V0\Errors\BiddingStrategyErrorEnum\BiddingStrategyError + */ +class BiddingStrategyErrorEnum_BiddingStrategyError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Each bidding strategy must have a unique name. + * + * Generated from protobuf enum DUPLICATE_NAME = 2; + */ + const DUPLICATE_NAME = 2; + /** + * Bidding strategy type is immutable. + * + * Generated from protobuf enum CANNOT_CHANGE_BIDDING_STRATEGY_TYPE = 3; + */ + const CANNOT_CHANGE_BIDDING_STRATEGY_TYPE = 3; + /** + * Only bidding strategies not linked to campaigns, adgroups or adgroup + * criteria can be removed. + * + * Generated from protobuf enum CANNOT_REMOVE_ASSOCIATED_STRATEGY = 4; + */ + const CANNOT_REMOVE_ASSOCIATED_STRATEGY = 4; + /** + * The specified bidding strategy is not supported. + * + * Generated from protobuf enum BIDDING_STRATEGY_NOT_SUPPORTED = 5; + */ + const BIDDING_STRATEGY_NOT_SUPPORTED = 5; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/CampaignBudgetErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/CampaignBudgetErrorEnum.php new file mode 100644 index 000000000..e94630a0a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/CampaignBudgetErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.CampaignBudgetErrorEnum + */ +class CampaignBudgetErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\CampaignBudgetError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/CampaignBudgetErrorEnum_CampaignBudgetError.php b/src/Google/Ads/GoogleAds/V0/Errors/CampaignBudgetErrorEnum_CampaignBudgetError.php new file mode 100644 index 000000000..10631f8fc --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/CampaignBudgetErrorEnum_CampaignBudgetError.php @@ -0,0 +1,116 @@ +Google\Ads\Googleads\V0\Errors\CampaignBudgetErrorEnum\CampaignBudgetError + */ +class CampaignBudgetErrorEnum_CampaignBudgetError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The requested campaign budget no longer exists. + * + * Generated from protobuf enum CAMPAIGN_BUDGET_REMOVED = 2; + */ + const CAMPAIGN_BUDGET_REMOVED = 2; + /** + * The campaign budget is associated with at least one campaign, and so the + * campaign budget cannot be removed. + * + * Generated from protobuf enum CAMPAIGN_BUDGET_IN_USE = 3; + */ + const CAMPAIGN_BUDGET_IN_USE = 3; + /** + * Customer is not whitelisted for this campaign budget period. + * + * Generated from protobuf enum CAMPAIGN_BUDGET_PERIOD_NOT_AVAILABLE = 4; + */ + const CAMPAIGN_BUDGET_PERIOD_NOT_AVAILABLE = 4; + /** + * This field is not mutable on implicitly shared campaign budgets + * + * Generated from protobuf enum CANNOT_MODIFY_FIELD_OF_IMPLICITLY_SHARED_CAMPAIGN_BUDGET = 6; + */ + const CANNOT_MODIFY_FIELD_OF_IMPLICITLY_SHARED_CAMPAIGN_BUDGET = 6; + /** + * Cannot change explicitly shared campaign budgets back to implicitly + * shared ones. + * + * Generated from protobuf enum CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_IMPLICITLY_SHARED = 7; + */ + const CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_IMPLICITLY_SHARED = 7; + /** + * An implicit campaign budget without a name cannot be changed to + * explicitly shared campaign budget. + * + * Generated from protobuf enum CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_EXPLICITLY_SHARED_WITHOUT_NAME = 8; + */ + const CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_EXPLICITLY_SHARED_WITHOUT_NAME = 8; + /** + * Cannot change an implicitly shared campaign budget to an explicitly + * shared one. + * + * Generated from protobuf enum CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_EXPLICITLY_SHARED = 9; + */ + const CANNOT_UPDATE_CAMPAIGN_BUDGET_TO_EXPLICITLY_SHARED = 9; + /** + * Only explicitly shared campaign budgets can be used with multiple + * campaigns. + * + * Generated from protobuf enum CANNOT_USE_IMPLICITLY_SHARED_CAMPAIGN_BUDGET_WITH_MULTIPLE_CAMPAIGNS = 10; + */ + const CANNOT_USE_IMPLICITLY_SHARED_CAMPAIGN_BUDGET_WITH_MULTIPLE_CAMPAIGNS = 10; + /** + * A campaign budget with this name already exists. + * + * Generated from protobuf enum DUPLICATE_NAME = 11; + */ + const DUPLICATE_NAME = 11; + /** + * A money amount was not in the expected currency. + * + * Generated from protobuf enum MONEY_AMOUNT_IN_WRONG_CURRENCY = 12; + */ + const MONEY_AMOUNT_IN_WRONG_CURRENCY = 12; + /** + * A money amount was less than the minimum CPC for currency. + * + * Generated from protobuf enum MONEY_AMOUNT_LESS_THAN_CURRENCY_MINIMUM_CPC = 13; + */ + const MONEY_AMOUNT_LESS_THAN_CURRENCY_MINIMUM_CPC = 13; + /** + * A money amount was greater than the maximum allowed. + * + * Generated from protobuf enum MONEY_AMOUNT_TOO_LARGE = 14; + */ + const MONEY_AMOUNT_TOO_LARGE = 14; + /** + * A money amount was negative. + * + * Generated from protobuf enum NEGATIVE_MONEY_AMOUNT = 15; + */ + const NEGATIVE_MONEY_AMOUNT = 15; + /** + * A money amount was not a multiple of a minimum unit. + * + * Generated from protobuf enum NON_MULTIPLE_OF_MINIMUM_CURRENCY_UNIT = 16; + */ + const NON_MULTIPLE_OF_MINIMUM_CURRENCY_UNIT = 16; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/CampaignCriterionErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/CampaignCriterionErrorEnum.php new file mode 100644 index 000000000..4259a64ab --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/CampaignCriterionErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.CampaignCriterionErrorEnum + */ +class CampaignCriterionErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\CampaignCriterionError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/CampaignCriterionErrorEnum_CampaignCriterionError.php b/src/Google/Ads/GoogleAds/V0/Errors/CampaignCriterionErrorEnum_CampaignCriterionError.php new file mode 100644 index 000000000..aee05be98 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/CampaignCriterionErrorEnum_CampaignCriterionError.php @@ -0,0 +1,91 @@ +Google\Ads\Googleads\V0\Errors\CampaignCriterionErrorEnum\CampaignCriterionError + */ +class CampaignCriterionErrorEnum_CampaignCriterionError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Concrete type of criterion (keyword v.s. placement) is required for + * CREATE and UPDATE operations. + * + * Generated from protobuf enum CONCRETE_TYPE_REQUIRED = 2; + */ + const CONCRETE_TYPE_REQUIRED = 2; + /** + * Invalid placement URL. + * + * Generated from protobuf enum INVALID_PLACEMENT_URL = 3; + */ + const INVALID_PLACEMENT_URL = 3; + /** + * Criteria type can not be excluded for the campaign by the customer. like + * AOL account type cannot target site type criteria + * + * Generated from protobuf enum CANNOT_EXCLUDE_CRITERIA_TYPE = 4; + */ + const CANNOT_EXCLUDE_CRITERIA_TYPE = 4; + /** + * Cannot set the campaign criterion status for this criteria type. + * + * Generated from protobuf enum CANNOT_SET_STATUS_FOR_CRITERIA_TYPE = 5; + */ + const CANNOT_SET_STATUS_FOR_CRITERIA_TYPE = 5; + /** + * Cannot set the campaign criterion status for an excluded criteria. + * + * Generated from protobuf enum CANNOT_SET_STATUS_FOR_EXCLUDED_CRITERIA = 6; + */ + const CANNOT_SET_STATUS_FOR_EXCLUDED_CRITERIA = 6; + /** + * Cannot target and exclude the same criterion. + * + * Generated from protobuf enum CANNOT_TARGET_AND_EXCLUDE = 7; + */ + const CANNOT_TARGET_AND_EXCLUDE = 7; + /** + * The mutate contained too many operations. + * + * Generated from protobuf enum TOO_MANY_OPERATIONS = 8; + */ + const TOO_MANY_OPERATIONS = 8; + /** + * This operator cannot be applied to a criterion of this type. + * + * Generated from protobuf enum OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE = 9; + */ + const OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE = 9; + /** + * The Shopping campaign sales country is not supported for + * ProductSalesChannel targeting. + * + * Generated from protobuf enum SHOPPING_CAMPAIGN_SALES_COUNTRY_NOT_SUPPORTED_FOR_SALES_CHANNEL = 10; + */ + const SHOPPING_CAMPAIGN_SALES_COUNTRY_NOT_SUPPORTED_FOR_SALES_CHANNEL = 10; + /** + * The existing field can't be updated with CREATE operation. It can be + * updated with UPDATE operation only. + * + * Generated from protobuf enum CANNOT_ADD_EXISTING_FIELD = 11; + */ + const CANNOT_ADD_EXISTING_FIELD = 11; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/CampaignErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/CampaignErrorEnum.php new file mode 100644 index 000000000..feb627bac --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/CampaignErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.CampaignErrorEnum + */ +class CampaignErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\CampaignError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/CampaignErrorEnum_CampaignError.php b/src/Google/Ads/GoogleAds/V0/Errors/CampaignErrorEnum_CampaignError.php new file mode 100644 index 000000000..e7d76bbf1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/CampaignErrorEnum_CampaignError.php @@ -0,0 +1,261 @@ +Google\Ads\Googleads\V0\Errors\CampaignErrorEnum\CampaignError + */ +class CampaignErrorEnum_CampaignError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Cannot target content network. + * + * Generated from protobuf enum CANNOT_TARGET_CONTENT_NETWORK = 3; + */ + const CANNOT_TARGET_CONTENT_NETWORK = 3; + /** + * Cannot target search network. + * + * Generated from protobuf enum CANNOT_TARGET_SEARCH_NETWORK = 4; + */ + const CANNOT_TARGET_SEARCH_NETWORK = 4; + /** + * Cannot cover search network without google search network. + * + * Generated from protobuf enum CANNOT_TARGET_SEARCH_NETWORK_WITHOUT_GOOGLE_SEARCH = 5; + */ + const CANNOT_TARGET_SEARCH_NETWORK_WITHOUT_GOOGLE_SEARCH = 5; + /** + * Cannot target Google Search network for a CPM campaign. + * + * Generated from protobuf enum CANNOT_TARGET_GOOGLE_SEARCH_FOR_CPM_CAMPAIGN = 6; + */ + const CANNOT_TARGET_GOOGLE_SEARCH_FOR_CPM_CAMPAIGN = 6; + /** + * Must target at least one network. + * + * Generated from protobuf enum CAMPAIGN_MUST_TARGET_AT_LEAST_ONE_NETWORK = 7; + */ + const CAMPAIGN_MUST_TARGET_AT_LEAST_ONE_NETWORK = 7; + /** + * Only some Google partners are allowed to target partner search network. + * + * Generated from protobuf enum CANNOT_TARGET_PARTNER_SEARCH_NETWORK = 8; + */ + const CANNOT_TARGET_PARTNER_SEARCH_NETWORK = 8; + /** + * Cannot target content network only as campaign has criteria-level bidding + * strategy. + * + * Generated from protobuf enum CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CRITERIA_LEVEL_BIDDING_STRATEGY = 9; + */ + const CANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CRITERIA_LEVEL_BIDDING_STRATEGY = 9; + /** + * Cannot modify the start or end date such that the campaign duration would + * not contain the durations of all runnable trials. + * + * Generated from protobuf enum CAMPAIGN_DURATION_MUST_CONTAIN_ALL_RUNNABLE_TRIALS = 10; + */ + const CAMPAIGN_DURATION_MUST_CONTAIN_ALL_RUNNABLE_TRIALS = 10; + /** + * Cannot modify dates, budget or campaign name of a trial campaign. + * + * Generated from protobuf enum CANNOT_MODIFY_FOR_TRIAL_CAMPAIGN = 11; + */ + const CANNOT_MODIFY_FOR_TRIAL_CAMPAIGN = 11; + /** + * Trying to modify the name of an active or paused campaign, where the name + * is already assigned to another active or paused campaign. + * + * Generated from protobuf enum DUPLICATE_CAMPAIGN_NAME = 12; + */ + const DUPLICATE_CAMPAIGN_NAME = 12; + /** + * Two fields are in conflicting modes. + * + * Generated from protobuf enum INCOMPATIBLE_CAMPAIGN_FIELD = 13; + */ + const INCOMPATIBLE_CAMPAIGN_FIELD = 13; + /** + * Campaign name cannot be used. + * + * Generated from protobuf enum INVALID_CAMPAIGN_NAME = 14; + */ + const INVALID_CAMPAIGN_NAME = 14; + /** + * Given status is invalid. + * + * Generated from protobuf enum INVALID_AD_SERVING_OPTIMIZATION_STATUS = 15; + */ + const INVALID_AD_SERVING_OPTIMIZATION_STATUS = 15; + /** + * Error in the campaign level tracking url. + * + * Generated from protobuf enum INVALID_TRACKING_URL = 16; + */ + const INVALID_TRACKING_URL = 16; + /** + * Cannot set both tracking url template and tracking setting. An user has + * to clear legacy tracking setting in order to add tracking url template. + * + * Generated from protobuf enum CANNOT_SET_BOTH_TRACKING_URL_TEMPLATE_AND_TRACKING_SETTING = 17; + */ + const CANNOT_SET_BOTH_TRACKING_URL_TEMPLATE_AND_TRACKING_SETTING = 17; + /** + * The maximum number of impressions for Frequency Cap should be an integer + * greater than 0. + * + * Generated from protobuf enum MAX_IMPRESSIONS_NOT_IN_RANGE = 18; + */ + const MAX_IMPRESSIONS_NOT_IN_RANGE = 18; + /** + * Only the Day, Week and Month time units are supported. + * + * Generated from protobuf enum TIME_UNIT_NOT_SUPPORTED = 19; + */ + const TIME_UNIT_NOT_SUPPORTED = 19; + /** + * Operation not allowed on a campaign whose serving status has ended + * + * Generated from protobuf enum INVALID_OPERATION_IF_SERVING_STATUS_HAS_ENDED = 20; + */ + const INVALID_OPERATION_IF_SERVING_STATUS_HAS_ENDED = 20; + /** + * This budget is exclusively linked to a Campaign that is using experiments + * so it cannot be shared. + * + * Generated from protobuf enum BUDGET_CANNOT_BE_SHARED = 21; + */ + const BUDGET_CANNOT_BE_SHARED = 21; + /** + * Campaigns using experiments cannot use a shared budget. + * + * Generated from protobuf enum CAMPAIGN_CANNOT_USE_SHARED_BUDGET = 22; + */ + const CAMPAIGN_CANNOT_USE_SHARED_BUDGET = 22; + /** + * A different budget cannot be assigned to a campaign when there are + * running or scheduled trials. + * + * Generated from protobuf enum CANNOT_CHANGE_BUDGET_ON_CAMPAIGN_WITH_TRIALS = 23; + */ + const CANNOT_CHANGE_BUDGET_ON_CAMPAIGN_WITH_TRIALS = 23; + /** + * No link found between the campaign and the label. + * + * Generated from protobuf enum CAMPAIGN_LABEL_DOES_NOT_EXIST = 24; + */ + const CAMPAIGN_LABEL_DOES_NOT_EXIST = 24; + /** + * The label has already been attached to the campaign. + * + * Generated from protobuf enum CAMPAIGN_LABEL_ALREADY_EXISTS = 25; + */ + const CAMPAIGN_LABEL_ALREADY_EXISTS = 25; + /** + * A ShoppingSetting was not found when creating a shopping campaign. + * + * Generated from protobuf enum MISSING_SHOPPING_SETTING = 26; + */ + const MISSING_SHOPPING_SETTING = 26; + /** + * The country in shopping setting is not an allowed country. + * + * Generated from protobuf enum INVALID_SHOPPING_SALES_COUNTRY = 27; + */ + const INVALID_SHOPPING_SALES_COUNTRY = 27; + /** + * Shopping merchant is not enabled for Purchases on Google. + * + * Generated from protobuf enum SHOPPING_MERCHANT_NOT_ALLOWED_FOR_PURCHASES_ON_GOOGLE = 28; + */ + const SHOPPING_MERCHANT_NOT_ALLOWED_FOR_PURCHASES_ON_GOOGLE = 28; + /** + * Purchases on Google not enabled for the shopping campaign's sales + * country. + * + * Generated from protobuf enum PURCHASES_ON_GOOGLE_NOT_SUPPORTED_FOR_SHOPPING_SALES_COUNTRY = 29; + */ + const PURCHASES_ON_GOOGLE_NOT_SUPPORTED_FOR_SHOPPING_SALES_COUNTRY = 29; + /** + * A Campaign with channel sub type UNIVERSAL_APP_CAMPAIGN must have a + * UniversalAppCampaignSetting specified. + * + * Generated from protobuf enum MISSING_UNIVERSAL_APP_CAMPAIGN_SETTING = 30; + */ + const MISSING_UNIVERSAL_APP_CAMPAIGN_SETTING = 30; + /** + * The requested channel type is not available according to the customer's + * account setting. + * + * Generated from protobuf enum ADVERTISING_CHANNEL_TYPE_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 31; + */ + const ADVERTISING_CHANNEL_TYPE_NOT_AVAILABLE_FOR_ACCOUNT_TYPE = 31; + /** + * The AdvertisingChannelSubType is not a valid subtype of the primary + * channel type. + * + * Generated from protobuf enum INVALID_ADVERTISING_CHANNEL_SUB_TYPE = 32; + */ + const INVALID_ADVERTISING_CHANNEL_SUB_TYPE = 32; + /** + * At least one conversion must be selected. + * + * Generated from protobuf enum AT_LEAST_ONE_CONVERSION_MUST_BE_SELECTED = 33; + */ + const AT_LEAST_ONE_CONVERSION_MUST_BE_SELECTED = 33; + /** + * Setting ad rotation mode for a campaign is not allowed. Ad rotation mode + * at campaign is deprecated. + * + * Generated from protobuf enum CANNOT_SET_AD_ROTATION_MODE = 34; + */ + const CANNOT_SET_AD_ROTATION_MODE = 34; + /** + * Trying to change start date on a campaign that has started. + * + * Generated from protobuf enum CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 35; + */ + const CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 35; + /** + * Trying to modify a date into the past. + * + * Generated from protobuf enum CANNOT_SET_DATE_TO_PAST = 36; + */ + const CANNOT_SET_DATE_TO_PAST = 36; + /** + * Hotel center id in the hotel setting does not match any customer links. + * + * Generated from protobuf enum MISSING_HOTEL_CUSTOMER_LINK = 37; + */ + const MISSING_HOTEL_CUSTOMER_LINK = 37; + /** + * Hotel center id in the hotel setting must match an active customer link. + * + * Generated from protobuf enum INVALID_HOTEL_CUSTOMER_LINK = 38; + */ + const INVALID_HOTEL_CUSTOMER_LINK = 38; + /** + * Hotel setting was not found when creating a hotel ads campaign. + * + * Generated from protobuf enum MISSING_HOTEL_SETTING = 39; + */ + const MISSING_HOTEL_SETTING = 39; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/CollectionSizeErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/CollectionSizeErrorEnum.php new file mode 100644 index 000000000..fb7a21bf7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/CollectionSizeErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.CollectionSizeErrorEnum + */ +class CollectionSizeErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\CollectionSizeError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/CollectionSizeErrorEnum_CollectionSizeError.php b/src/Google/Ads/GoogleAds/V0/Errors/CollectionSizeErrorEnum_CollectionSizeError.php new file mode 100644 index 000000000..c0f37fbc3 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/CollectionSizeErrorEnum_CollectionSizeError.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Errors\CollectionSizeErrorEnum\CollectionSizeError + */ +class CollectionSizeErrorEnum_CollectionSizeError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Too few. + * + * Generated from protobuf enum TOO_FEW = 2; + */ + const TOO_FEW = 2; + /** + * Too many. + * + * Generated from protobuf enum TOO_MANY = 3; + */ + const TOO_MANY = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ContextErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/ContextErrorEnum.php new file mode 100644 index 000000000..bcd5aa325 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ContextErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.ContextErrorEnum + */ +class ContextErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\ContextError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ContextErrorEnum_ContextError.php b/src/Google/Ads/GoogleAds/V0/Errors/ContextErrorEnum_ContextError.php new file mode 100644 index 000000000..4e98adc46 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ContextErrorEnum_ContextError.php @@ -0,0 +1,33 @@ +Google\Ads\Googleads\V0\Errors\ContextErrorEnum\ContextError + */ +class ContextErrorEnum_ContextError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The operation is not allowed for the given context. + * + * Generated from protobuf enum OPERATION_NOT_PERMITTED_FOR_CONTEXT = 2; + */ + const OPERATION_NOT_PERMITTED_FOR_CONTEXT = 2; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/CriterionErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/CriterionErrorEnum.php new file mode 100644 index 000000000..15cd84527 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/CriterionErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.CriterionErrorEnum + */ +class CriterionErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\CriterionError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/CriterionErrorEnum_CriterionError.php b/src/Google/Ads/GoogleAds/V0/Errors/CriterionErrorEnum_CriterionError.php new file mode 100644 index 000000000..1488f4065 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/CriterionErrorEnum_CriterionError.php @@ -0,0 +1,550 @@ +Google\Ads\Googleads\V0\Errors\CriterionErrorEnum\CriterionError + */ +class CriterionErrorEnum_CriterionError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Concrete type of criterion is required for CREATE and UPDATE operations. + * + * Generated from protobuf enum CONCRETE_TYPE_REQUIRED = 2; + */ + const CONCRETE_TYPE_REQUIRED = 2; + /** + * The category requested for exclusion is invalid. + * + * Generated from protobuf enum INVALID_EXCLUDED_CATEGORY = 3; + */ + const INVALID_EXCLUDED_CATEGORY = 3; + /** + * Invalid keyword criteria text. + * + * Generated from protobuf enum INVALID_KEYWORD_TEXT = 4; + */ + const INVALID_KEYWORD_TEXT = 4; + /** + * Keyword text should be less than 80 chars. + * + * Generated from protobuf enum KEYWORD_TEXT_TOO_LONG = 5; + */ + const KEYWORD_TEXT_TOO_LONG = 5; + /** + * Keyword text has too many words. + * + * Generated from protobuf enum KEYWORD_HAS_TOO_MANY_WORDS = 6; + */ + const KEYWORD_HAS_TOO_MANY_WORDS = 6; + /** + * Keyword text has invalid characters or symbols. + * + * Generated from protobuf enum KEYWORD_HAS_INVALID_CHARS = 7; + */ + const KEYWORD_HAS_INVALID_CHARS = 7; + /** + * Invalid placement URL. + * + * Generated from protobuf enum INVALID_PLACEMENT_URL = 8; + */ + const INVALID_PLACEMENT_URL = 8; + /** + * Invalid user list criterion. + * + * Generated from protobuf enum INVALID_USER_LIST = 9; + */ + const INVALID_USER_LIST = 9; + /** + * Invalid user interest criterion. + * + * Generated from protobuf enum INVALID_USER_INTEREST = 10; + */ + const INVALID_USER_INTEREST = 10; + /** + * Placement URL has wrong format. + * + * Generated from protobuf enum INVALID_FORMAT_FOR_PLACEMENT_URL = 11; + */ + const INVALID_FORMAT_FOR_PLACEMENT_URL = 11; + /** + * Placement URL is too long. + * + * Generated from protobuf enum PLACEMENT_URL_IS_TOO_LONG = 12; + */ + const PLACEMENT_URL_IS_TOO_LONG = 12; + /** + * Indicates the URL contains an illegal character. + * + * Generated from protobuf enum PLACEMENT_URL_HAS_ILLEGAL_CHAR = 13; + */ + const PLACEMENT_URL_HAS_ILLEGAL_CHAR = 13; + /** + * Indicates the URL contains multiple comma separated URLs. + * + * Generated from protobuf enum PLACEMENT_URL_HAS_MULTIPLE_SITES_IN_LINE = 14; + */ + const PLACEMENT_URL_HAS_MULTIPLE_SITES_IN_LINE = 14; + /** + * Indicates the domain is blacklisted. + * + * Generated from protobuf enum PLACEMENT_IS_NOT_AVAILABLE_FOR_TARGETING_OR_EXCLUSION = 15; + */ + const PLACEMENT_IS_NOT_AVAILABLE_FOR_TARGETING_OR_EXCLUSION = 15; + /** + * Invalid vertical path. + * + * Generated from protobuf enum INVALID_VERTICAL_PATH = 16; + */ + const INVALID_VERTICAL_PATH = 16; + /** + * The YouTube Channel Id is invalid. + * + * Generated from protobuf enum INVALID_YOUTUBE_CHANNEL_ID = 17; + */ + const INVALID_YOUTUBE_CHANNEL_ID = 17; + /** + * The YouTube Video Id is invalid. + * + * Generated from protobuf enum INVALID_YOUTUBE_VIDEO_ID = 18; + */ + const INVALID_YOUTUBE_VIDEO_ID = 18; + /** + * Indicates the placement is a YouTube vertical channel, which is no longer + * supported. + * + * Generated from protobuf enum YOUTUBE_VERTICAL_CHANNEL_DEPRECATED = 19; + */ + const YOUTUBE_VERTICAL_CHANNEL_DEPRECATED = 19; + /** + * Indicates the placement is a YouTube demographic channel, which is no + * longer supported. + * + * Generated from protobuf enum YOUTUBE_DEMOGRAPHIC_CHANNEL_DEPRECATED = 20; + */ + const YOUTUBE_DEMOGRAPHIC_CHANNEL_DEPRECATED = 20; + /** + * YouTube urls are not supported in Placement criterion. Use YouTubeChannel + * and YouTubeVideo criterion instead. + * + * Generated from protobuf enum YOUTUBE_URL_UNSUPPORTED = 21; + */ + const YOUTUBE_URL_UNSUPPORTED = 21; + /** + * Criteria type can not be excluded by the customer, like AOL account type + * cannot target site type criteria. + * + * Generated from protobuf enum CANNOT_EXCLUDE_CRITERIA_TYPE = 22; + */ + const CANNOT_EXCLUDE_CRITERIA_TYPE = 22; + /** + * Criteria type can not be targeted. + * + * Generated from protobuf enum CANNOT_ADD_CRITERIA_TYPE = 23; + */ + const CANNOT_ADD_CRITERIA_TYPE = 23; + /** + * Product filter in the product criteria has invalid characters. Operand + * and the argument in the filter can not have "==" or "&+". + * + * Generated from protobuf enum INVALID_PRODUCT_FILTER = 24; + */ + const INVALID_PRODUCT_FILTER = 24; + /** + * Product filter in the product criteria is translated to a string as + * operand1==argument1&+operand2==argument2, maximum allowed length for the + * string is 255 chars. + * + * Generated from protobuf enum PRODUCT_FILTER_TOO_LONG = 25; + */ + const PRODUCT_FILTER_TOO_LONG = 25; + /** + * Not allowed to exclude similar user list. + * + * Generated from protobuf enum CANNOT_EXCLUDE_SIMILAR_USER_LIST = 26; + */ + const CANNOT_EXCLUDE_SIMILAR_USER_LIST = 26; + /** + * Not allowed to target a closed user list. + * + * Generated from protobuf enum CANNOT_ADD_CLOSED_USER_LIST = 27; + */ + const CANNOT_ADD_CLOSED_USER_LIST = 27; + /** + * Not allowed to add display only UserLists to search only campaigns. + * + * Generated from protobuf enum CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_ONLY_CAMPAIGNS = 28; + */ + const CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_ONLY_CAMPAIGNS = 28; + /** + * Not allowed to add display only UserLists to search plus campaigns. + * + * Generated from protobuf enum CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_CAMPAIGNS = 29; + */ + const CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SEARCH_CAMPAIGNS = 29; + /** + * Not allowed to add display only UserLists to shopping campaigns. + * + * Generated from protobuf enum CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SHOPPING_CAMPAIGNS = 30; + */ + const CANNOT_ADD_DISPLAY_ONLY_LISTS_TO_SHOPPING_CAMPAIGNS = 30; + /** + * Not allowed to add User interests to search only campaigns. + * + * Generated from protobuf enum CANNOT_ADD_USER_INTERESTS_TO_SEARCH_CAMPAIGNS = 31; + */ + const CANNOT_ADD_USER_INTERESTS_TO_SEARCH_CAMPAIGNS = 31; + /** + * Not allowed to set bids for this criterion type in search campaigns + * + * Generated from protobuf enum CANNOT_SET_BIDS_ON_CRITERION_TYPE_IN_SEARCH_CAMPAIGNS = 32; + */ + const CANNOT_SET_BIDS_ON_CRITERION_TYPE_IN_SEARCH_CAMPAIGNS = 32; + /** + * Final URLs, URL Templates and CustomParameters cannot be set for the + * criterion types of Gender, AgeRange, UserList, Placement, MobileApp, and + * MobileAppCategory in search campaigns and shopping campaigns. + * + * Generated from protobuf enum CANNOT_ADD_URLS_TO_CRITERION_TYPE_FOR_CAMPAIGN_TYPE = 33; + */ + const CANNOT_ADD_URLS_TO_CRITERION_TYPE_FOR_CAMPAIGN_TYPE = 33; + /** + * IP address is not valid. + * + * Generated from protobuf enum INVALID_IP_ADDRESS = 34; + */ + const INVALID_IP_ADDRESS = 34; + /** + * IP format is not valid. + * + * Generated from protobuf enum INVALID_IP_FORMAT = 35; + */ + const INVALID_IP_FORMAT = 35; + /** + * Mobile application is not valid. + * + * Generated from protobuf enum INVALID_MOBILE_APP = 36; + */ + const INVALID_MOBILE_APP = 36; + /** + * Mobile application category is not valid. + * + * Generated from protobuf enum INVALID_MOBILE_APP_CATEGORY = 37; + */ + const INVALID_MOBILE_APP_CATEGORY = 37; + /** + * The CriterionId does not exist or is of the incorrect type. + * + * Generated from protobuf enum INVALID_CRITERION_ID = 38; + */ + const INVALID_CRITERION_ID = 38; + /** + * The Criterion is not allowed to be targeted. + * + * Generated from protobuf enum CANNOT_TARGET_CRITERION = 39; + */ + const CANNOT_TARGET_CRITERION = 39; + /** + * The criterion is not allowed to be targeted as it is deprecated. + * + * Generated from protobuf enum CANNOT_TARGET_OBSOLETE_CRITERION = 40; + */ + const CANNOT_TARGET_OBSOLETE_CRITERION = 40; + /** + * The CriterionId is not valid for the type. + * + * Generated from protobuf enum CRITERION_ID_AND_TYPE_MISMATCH = 41; + */ + const CRITERION_ID_AND_TYPE_MISMATCH = 41; + /** + * Distance for the radius for the proximity criterion is invalid. + * + * Generated from protobuf enum INVALID_PROXIMITY_RADIUS = 42; + */ + const INVALID_PROXIMITY_RADIUS = 42; + /** + * Units for the distance for the radius for the proximity criterion is + * invalid. + * + * Generated from protobuf enum INVALID_PROXIMITY_RADIUS_UNITS = 43; + */ + const INVALID_PROXIMITY_RADIUS_UNITS = 43; + /** + * Street address is too short. + * + * Generated from protobuf enum INVALID_STREETADDRESS_LENGTH = 44; + */ + const INVALID_STREETADDRESS_LENGTH = 44; + /** + * City name in the address is too short. + * + * Generated from protobuf enum INVALID_CITYNAME_LENGTH = 45; + */ + const INVALID_CITYNAME_LENGTH = 45; + /** + * Region code in the address is too short. + * + * Generated from protobuf enum INVALID_REGIONCODE_LENGTH = 46; + */ + const INVALID_REGIONCODE_LENGTH = 46; + /** + * Region name in the address is not valid. + * + * Generated from protobuf enum INVALID_REGIONNAME_LENGTH = 47; + */ + const INVALID_REGIONNAME_LENGTH = 47; + /** + * Postal code in the address is not valid. + * + * Generated from protobuf enum INVALID_POSTALCODE_LENGTH = 48; + */ + const INVALID_POSTALCODE_LENGTH = 48; + /** + * Country code in the address is not valid. + * + * Generated from protobuf enum INVALID_COUNTRY_CODE = 49; + */ + const INVALID_COUNTRY_CODE = 49; + /** + * Latitude for the GeoPoint is not valid. + * + * Generated from protobuf enum INVALID_LATITUDE = 50; + */ + const INVALID_LATITUDE = 50; + /** + * Longitude for the GeoPoint is not valid. + * + * Generated from protobuf enum INVALID_LONGITUDE = 51; + */ + const INVALID_LONGITUDE = 51; + /** + * The Proximity input is not valid. Both address and geoPoint cannot be + * null. + * + * Generated from protobuf enum PROXIMITY_GEOPOINT_AND_ADDRESS_BOTH_CANNOT_BE_NULL = 52; + */ + const PROXIMITY_GEOPOINT_AND_ADDRESS_BOTH_CANNOT_BE_NULL = 52; + /** + * The Proximity address cannot be geocoded to a valid lat/long. + * + * Generated from protobuf enum INVALID_PROXIMITY_ADDRESS = 53; + */ + const INVALID_PROXIMITY_ADDRESS = 53; + /** + * User domain name is not valid. + * + * Generated from protobuf enum INVALID_USER_DOMAIN_NAME = 54; + */ + const INVALID_USER_DOMAIN_NAME = 54; + /** + * Length of serialized criterion parameter exceeded size limit. + * + * Generated from protobuf enum CRITERION_PARAMETER_TOO_LONG = 55; + */ + const CRITERION_PARAMETER_TOO_LONG = 55; + /** + * Time interval in the AdSchedule overlaps with another AdSchedule. + * + * Generated from protobuf enum AD_SCHEDULE_TIME_INTERVALS_OVERLAP = 56; + */ + const AD_SCHEDULE_TIME_INTERVALS_OVERLAP = 56; + /** + * AdSchedule time interval cannot span multiple days. + * + * Generated from protobuf enum AD_SCHEDULE_INTERVAL_CANNOT_SPAN_MULTIPLE_DAYS = 57; + */ + const AD_SCHEDULE_INTERVAL_CANNOT_SPAN_MULTIPLE_DAYS = 57; + /** + * AdSchedule time interval specified is invalid, endTime cannot be earlier + * than startTime. + * + * Generated from protobuf enum AD_SCHEDULE_INVALID_TIME_INTERVAL = 58; + */ + const AD_SCHEDULE_INVALID_TIME_INTERVAL = 58; + /** + * The number of AdSchedule entries in a day exceeds the limit. + * + * Generated from protobuf enum AD_SCHEDULE_EXCEEDED_INTERVALS_PER_DAY_LIMIT = 59; + */ + const AD_SCHEDULE_EXCEEDED_INTERVALS_PER_DAY_LIMIT = 59; + /** + * CriteriaId does not match the interval of the AdSchedule specified. + * + * Generated from protobuf enum AD_SCHEDULE_CRITERION_ID_MISMATCHING_FIELDS = 60; + */ + const AD_SCHEDULE_CRITERION_ID_MISMATCHING_FIELDS = 60; + /** + * Cannot set bid modifier for this criterion type. + * + * Generated from protobuf enum CANNOT_BID_MODIFY_CRITERION_TYPE = 61; + */ + const CANNOT_BID_MODIFY_CRITERION_TYPE = 61; + /** + * Cannot bid modify criterion, since it is opted out of the campaign. + * + * Generated from protobuf enum CANNOT_BID_MODIFY_CRITERION_CAMPAIGN_OPTED_OUT = 62; + */ + const CANNOT_BID_MODIFY_CRITERION_CAMPAIGN_OPTED_OUT = 62; + /** + * Cannot set bid modifier for a negative criterion. + * + * Generated from protobuf enum CANNOT_BID_MODIFY_NEGATIVE_CRITERION = 63; + */ + const CANNOT_BID_MODIFY_NEGATIVE_CRITERION = 63; + /** + * Bid Modifier already exists. Use SET operation to update. + * + * Generated from protobuf enum BID_MODIFIER_ALREADY_EXISTS = 64; + */ + const BID_MODIFIER_ALREADY_EXISTS = 64; + /** + * Feed Id is not allowed in these Location Groups. + * + * Generated from protobuf enum FEED_ID_NOT_ALLOWED = 65; + */ + const FEED_ID_NOT_ALLOWED = 65; + /** + * The account may not use the requested criteria type. For example, some + * accounts are restricted to keywords only. + * + * Generated from protobuf enum ACCOUNT_INELIGIBLE_FOR_CRITERIA_TYPE = 66; + */ + const ACCOUNT_INELIGIBLE_FOR_CRITERIA_TYPE = 66; + /** + * The requested criteria type cannot be used with campaign or ad group + * bidding strategy. + * + * Generated from protobuf enum CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY = 67; + */ + const CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY = 67; + /** + * The Criterion is not allowed to be excluded. + * + * Generated from protobuf enum CANNOT_EXCLUDE_CRITERION = 68; + */ + const CANNOT_EXCLUDE_CRITERION = 68; + /** + * The criterion is not allowed to be removed. For example, we cannot remove + * any of the platform criterion. + * + * Generated from protobuf enum CANNOT_REMOVE_CRITERION = 69; + */ + const CANNOT_REMOVE_CRITERION = 69; + /** + * The combined length of product dimension values of the product scope + * criterion is too long. + * + * Generated from protobuf enum PRODUCT_SCOPE_TOO_LONG = 70; + */ + const PRODUCT_SCOPE_TOO_LONG = 70; + /** + * Product scope contains too many dimensions. + * + * Generated from protobuf enum PRODUCT_SCOPE_TOO_MANY_DIMENSIONS = 71; + */ + const PRODUCT_SCOPE_TOO_MANY_DIMENSIONS = 71; + /** + * The combined length of product dimension values of the product partition + * criterion is too long. + * + * Generated from protobuf enum PRODUCT_PARTITION_TOO_LONG = 72; + */ + const PRODUCT_PARTITION_TOO_LONG = 72; + /** + * Product partition contains too many dimensions. + * + * Generated from protobuf enum PRODUCT_PARTITION_TOO_MANY_DIMENSIONS = 73; + */ + const PRODUCT_PARTITION_TOO_MANY_DIMENSIONS = 73; + /** + * The product dimension is invalid (e.g. dimension contains illegal value, + * dimension type is represented with wrong class, etc). Product dimension + * value can not contain "==" or "&+". + * + * Generated from protobuf enum INVALID_PRODUCT_DIMENSION = 74; + */ + const INVALID_PRODUCT_DIMENSION = 74; + /** + * Product dimension type is either invalid for campaigns of this type or + * cannot be used in the current context. BIDDING_CATEGORY_Lx and + * PRODUCT_TYPE_Lx product dimensions must be used in ascending order of + * their levels: L1, L2, L3, L4, L5... The levels must be specified + * sequentially and start from L1. Furthermore, an "others" product + * partition cannot be subdivided with a dimension of the same type but of a + * higher level ("others" BIDDING_CATEGORY_L3 can be subdivided with BRAND + * but not with BIDDING_CATEGORY_L4). + * + * Generated from protobuf enum INVALID_PRODUCT_DIMENSION_TYPE = 75; + */ + const INVALID_PRODUCT_DIMENSION_TYPE = 75; + /** + * Bidding categories do not form a valid path in the Shopping bidding + * category taxonomy. + * + * Generated from protobuf enum INVALID_PRODUCT_BIDDING_CATEGORY = 76; + */ + const INVALID_PRODUCT_BIDDING_CATEGORY = 76; + /** + * ShoppingSetting must be added to the campaign before ProductScope + * criteria can be added. + * + * Generated from protobuf enum MISSING_SHOPPING_SETTING = 77; + */ + const MISSING_SHOPPING_SETTING = 77; + /** + * Matching function is invalid. + * + * Generated from protobuf enum INVALID_MATCHING_FUNCTION = 78; + */ + const INVALID_MATCHING_FUNCTION = 78; + /** + * Filter parameters not allowed for location groups targeting. + * + * Generated from protobuf enum LOCATION_FILTER_NOT_ALLOWED = 79; + */ + const LOCATION_FILTER_NOT_ALLOWED = 79; + /** + * Given location filter parameter is invalid for location groups targeting. + * + * Generated from protobuf enum LOCATION_FILTER_INVALID = 80; + */ + const LOCATION_FILTER_INVALID = 80; + /** + * Criteria type cannot be associated with a campaign and its ad group(s) + * simultaneously. + * + * Generated from protobuf enum CANNOT_ATTACH_CRITERIA_AT_CAMPAIGN_AND_ADGROUP = 81; + */ + const CANNOT_ATTACH_CRITERIA_AT_CAMPAIGN_AND_ADGROUP = 81; + /** + * Range represented by hotel length of stay's min nights and max nights + * overlaps with an existing criterion. + * + * Generated from protobuf enum HOTEL_LENGTH_OF_STAY_OVERLAPS_WITH_EXISTING_CRITERION = 82; + */ + const HOTEL_LENGTH_OF_STAY_OVERLAPS_WITH_EXISTING_CRITERION = 82; + /** + * Range represented by hotel advance booking window's min days and max days + * overlaps with an existing criterion. + * + * Generated from protobuf enum HOTEL_ADVANCE_BOOKING_WINDOW_OVERLAPS_WITH_EXISTING_CRITERION = 83; + */ + const HOTEL_ADVANCE_BOOKING_WINDOW_OVERLAPS_WITH_EXISTING_CRITERION = 83; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/DateErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/DateErrorEnum.php new file mode 100644 index 000000000..6e427a91e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/DateErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.DateErrorEnum + */ +class DateErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\DateError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/DateErrorEnum_DateError.php b/src/Google/Ads/GoogleAds/V0/Errors/DateErrorEnum_DateError.php new file mode 100644 index 000000000..621c61cba --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/DateErrorEnum_DateError.php @@ -0,0 +1,75 @@ +Google\Ads\Googleads\V0\Errors\DateErrorEnum\DateError + */ +class DateErrorEnum_DateError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Given field values do not correspond to a valid date. + * + * Generated from protobuf enum INVALID_FIELD_VALUES_IN_DATE = 2; + */ + const INVALID_FIELD_VALUES_IN_DATE = 2; + /** + * Given field values do not correspond to a valid date time. + * + * Generated from protobuf enum INVALID_FIELD_VALUES_IN_DATE_TIME = 3; + */ + const INVALID_FIELD_VALUES_IN_DATE_TIME = 3; + /** + * The string date's format should be yyyymmdd. + * + * Generated from protobuf enum INVALID_STRING_DATE = 4; + */ + const INVALID_STRING_DATE = 4; + /** + * The string date time's format should be yyyymmdd hhmmss [tz]. + * + * Generated from protobuf enum INVALID_STRING_DATE_TIME = 6; + */ + const INVALID_STRING_DATE_TIME = 6; + /** + * Date is before allowed minimum. + * + * Generated from protobuf enum EARLIER_THAN_MINIMUM_DATE = 7; + */ + const EARLIER_THAN_MINIMUM_DATE = 7; + /** + * Date is after allowed maximum. + * + * Generated from protobuf enum LATER_THAN_MAXIMUM_DATE = 8; + */ + const LATER_THAN_MAXIMUM_DATE = 8; + /** + * Date range bounds are not in order. + * + * Generated from protobuf enum DATE_RANGE_MINIMUM_DATE_LATER_THAN_MAXIMUM_DATE = 9; + */ + const DATE_RANGE_MINIMUM_DATE_LATER_THAN_MAXIMUM_DATE = 9; + /** + * Both dates in range are null. + * + * Generated from protobuf enum DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL = 10; + */ + const DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL = 10; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/DateRangeErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/DateRangeErrorEnum.php new file mode 100644 index 000000000..0062c7ca0 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/DateRangeErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.DateRangeErrorEnum + */ +class DateRangeErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\DateRangeError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/DateRangeErrorEnum_DateRangeError.php b/src/Google/Ads/GoogleAds/V0/Errors/DateRangeErrorEnum_DateRangeError.php new file mode 100644 index 000000000..cf036d7f0 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/DateRangeErrorEnum_DateRangeError.php @@ -0,0 +1,57 @@ +Google\Ads\Googleads\V0\Errors\DateRangeErrorEnum\DateRangeError + */ +class DateRangeErrorEnum_DateRangeError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Invalid date. + * + * Generated from protobuf enum INVALID_DATE = 2; + */ + const INVALID_DATE = 2; + /** + * The start date was after the end date. + * + * Generated from protobuf enum START_DATE_AFTER_END_DATE = 3; + */ + const START_DATE_AFTER_END_DATE = 3; + /** + * Cannot set date to past time + * + * Generated from protobuf enum CANNOT_SET_DATE_TO_PAST = 4; + */ + const CANNOT_SET_DATE_TO_PAST = 4; + /** + * A date was used that is past the system "last" date. + * + * Generated from protobuf enum AFTER_MAXIMUM_ALLOWABLE_DATE = 5; + */ + const AFTER_MAXIMUM_ALLOWABLE_DATE = 5; + /** + * Trying to change start date on a campaign that has started. + * + * Generated from protobuf enum CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 6; + */ + const CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED = 6; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/DistinctErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/DistinctErrorEnum.php new file mode 100644 index 000000000..80d2c6405 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/DistinctErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.DistinctErrorEnum + */ +class DistinctErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\DistinctError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/DistinctErrorEnum_DistinctError.php b/src/Google/Ads/GoogleAds/V0/Errors/DistinctErrorEnum_DistinctError.php new file mode 100644 index 000000000..0e85d419c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/DistinctErrorEnum_DistinctError.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Errors\DistinctErrorEnum\DistinctError + */ +class DistinctErrorEnum_DistinctError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Duplicate element. + * + * Generated from protobuf enum DUPLICATE_ELEMENT = 2; + */ + const DUPLICATE_ELEMENT = 2; + /** + * Duplicate type. + * + * Generated from protobuf enum DUPLICATE_TYPE = 3; + */ + const DUPLICATE_TYPE = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ErrorCode.php b/src/Google/Ads/GoogleAds/V0/Errors/ErrorCode.php new file mode 100644 index 000000000..d363fde0d --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ErrorCode.php @@ -0,0 +1,1360 @@ +google.ads.googleads.v0.errors.ErrorCode + */ +class ErrorCode extends \Google\Protobuf\Internal\Message +{ + protected $error_code; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\Errors::initOnce(); + parent::__construct(); + } + + /** + * An error caused by the request + * + * Generated from protobuf field .google.ads.googleads.v0.errors.RequestErrorEnum.RequestError request_error = 1; + * @return int + */ + public function getRequestError() + { + return $this->readOneof(1); + } + + /** + * An error caused by the request + * + * Generated from protobuf field .google.ads.googleads.v0.errors.RequestErrorEnum.RequestError request_error = 1; + * @param int $var + * @return $this + */ + public function setRequestError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\RequestErrorEnum_RequestError::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * An error with a Bidding Strategy mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.BiddingStrategyErrorEnum.BiddingStrategyError bidding_strategy_error = 2; + * @return int + */ + public function getBiddingStrategyError() + { + return $this->readOneof(2); + } + + /** + * An error with a Bidding Strategy mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.BiddingStrategyErrorEnum.BiddingStrategyError bidding_strategy_error = 2; + * @param int $var + * @return $this + */ + public function setBiddingStrategyError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\BiddingStrategyErrorEnum_BiddingStrategyError::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * An error with a URL field mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.UrlFieldErrorEnum.UrlFieldError url_field_error = 3; + * @return int + */ + public function getUrlFieldError() + { + return $this->readOneof(3); + } + + /** + * An error with a URL field mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.UrlFieldErrorEnum.UrlFieldError url_field_error = 3; + * @param int $var + * @return $this + */ + public function setUrlFieldError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\UrlFieldErrorEnum_UrlFieldError::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * An error with a list operation. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ListOperationErrorEnum.ListOperationError list_operation_error = 4; + * @return int + */ + public function getListOperationError() + { + return $this->readOneof(4); + } + + /** + * An error with a list operation. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ListOperationErrorEnum.ListOperationError list_operation_error = 4; + * @param int $var + * @return $this + */ + public function setListOperationError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\ListOperationErrorEnum_ListOperationError::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * An error with an AWQL query + * + * Generated from protobuf field .google.ads.googleads.v0.errors.QueryErrorEnum.QueryError query_error = 5; + * @return int + */ + public function getQueryError() + { + return $this->readOneof(5); + } + + /** + * An error with an AWQL query + * + * Generated from protobuf field .google.ads.googleads.v0.errors.QueryErrorEnum.QueryError query_error = 5; + * @param int $var + * @return $this + */ + public function setQueryError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\QueryErrorEnum_QueryError::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * An error with a mutate + * + * Generated from protobuf field .google.ads.googleads.v0.errors.MutateErrorEnum.MutateError mutate_error = 7; + * @return int + */ + public function getMutateError() + { + return $this->readOneof(7); + } + + /** + * An error with a mutate + * + * Generated from protobuf field .google.ads.googleads.v0.errors.MutateErrorEnum.MutateError mutate_error = 7; + * @param int $var + * @return $this + */ + public function setMutateError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\MutateErrorEnum_MutateError::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * An error with a field mask + * + * Generated from protobuf field .google.ads.googleads.v0.errors.FieldMaskErrorEnum.FieldMaskError field_mask_error = 8; + * @return int + */ + public function getFieldMaskError() + { + return $this->readOneof(8); + } + + /** + * An error with a field mask + * + * Generated from protobuf field .google.ads.googleads.v0.errors.FieldMaskErrorEnum.FieldMaskError field_mask_error = 8; + * @param int $var + * @return $this + */ + public function setFieldMaskError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\FieldMaskErrorEnum_FieldMaskError::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * An error encountered when trying to authorize a user. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AuthorizationErrorEnum.AuthorizationError authorization_error = 9; + * @return int + */ + public function getAuthorizationError() + { + return $this->readOneof(9); + } + + /** + * An error encountered when trying to authorize a user. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AuthorizationErrorEnum.AuthorizationError authorization_error = 9; + * @param int $var + * @return $this + */ + public function setAuthorizationError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\AuthorizationErrorEnum_AuthorizationError::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * An unexpected server-side error. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.InternalErrorEnum.InternalError internal_error = 10; + * @return int + */ + public function getInternalError() + { + return $this->readOneof(10); + } + + /** + * An unexpected server-side error. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.InternalErrorEnum.InternalError internal_error = 10; + * @param int $var + * @return $this + */ + public function setInternalError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\InternalErrorEnum_InternalError::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * An error with the amonut of quota remaining. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.QuotaErrorEnum.QuotaError quota_error = 11; + * @return int + */ + public function getQuotaError() + { + return $this->readOneof(11); + } + + /** + * An error with the amonut of quota remaining. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.QuotaErrorEnum.QuotaError quota_error = 11; + * @param int $var + * @return $this + */ + public function setQuotaError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\QuotaErrorEnum_QuotaError::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * An error with an Ad Group Ad mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdErrorEnum.AdError ad_error = 12; + * @return int + */ + public function getAdError() + { + return $this->readOneof(12); + } + + /** + * An error with an Ad Group Ad mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdErrorEnum.AdError ad_error = 12; + * @param int $var + * @return $this + */ + public function setAdError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\AdErrorEnum_AdError::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * An error with an Ad Group mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdGroupErrorEnum.AdGroupError ad_group_error = 13; + * @return int + */ + public function getAdGroupError() + { + return $this->readOneof(13); + } + + /** + * An error with an Ad Group mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdGroupErrorEnum.AdGroupError ad_group_error = 13; + * @param int $var + * @return $this + */ + public function setAdGroupError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\AdGroupErrorEnum_AdGroupError::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * An error with a Campaign Budget mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.CampaignBudgetErrorEnum.CampaignBudgetError campaign_budget_error = 14; + * @return int + */ + public function getCampaignBudgetError() + { + return $this->readOneof(14); + } + + /** + * An error with a Campaign Budget mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.CampaignBudgetErrorEnum.CampaignBudgetError campaign_budget_error = 14; + * @param int $var + * @return $this + */ + public function setCampaignBudgetError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\CampaignBudgetErrorEnum_CampaignBudgetError::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * An error with a Campaign mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.CampaignErrorEnum.CampaignError campaign_error = 15; + * @return int + */ + public function getCampaignError() + { + return $this->readOneof(15); + } + + /** + * An error with a Campaign mutate. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.CampaignErrorEnum.CampaignError campaign_error = 15; + * @param int $var + * @return $this + */ + public function setCampaignError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\CampaignErrorEnum_CampaignError::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Indicates failure to properly authenticate user. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AuthenticationErrorEnum.AuthenticationError authentication_error = 17; + * @return int + */ + public function getAuthenticationError() + { + return $this->readOneof(17); + } + + /** + * Indicates failure to properly authenticate user. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AuthenticationErrorEnum.AuthenticationError authentication_error = 17; + * @param int $var + * @return $this + */ + public function setAuthenticationError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\AuthenticationErrorEnum_AuthenticationError::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Indicates failure to properly authenticate user. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdGroupCriterionErrorEnum.AdGroupCriterionError ad_group_criterion_error = 18; + * @return int + */ + public function getAdGroupCriterionError() + { + return $this->readOneof(18); + } + + /** + * Indicates failure to properly authenticate user. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdGroupCriterionErrorEnum.AdGroupCriterionError ad_group_criterion_error = 18; + * @param int $var + * @return $this + */ + public function setAdGroupCriterionError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\AdGroupCriterionErrorEnum_AdGroupCriterionError::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * The reasons for the ad customizer error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdCustomizerErrorEnum.AdCustomizerError ad_customizer_error = 19; + * @return int + */ + public function getAdCustomizerError() + { + return $this->readOneof(19); + } + + /** + * The reasons for the ad customizer error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdCustomizerErrorEnum.AdCustomizerError ad_customizer_error = 19; + * @param int $var + * @return $this + */ + public function setAdCustomizerError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\AdCustomizerErrorEnum_AdCustomizerError::class); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * The reasons for the ad group ad error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdGroupAdErrorEnum.AdGroupAdError ad_group_ad_error = 21; + * @return int + */ + public function getAdGroupAdError() + { + return $this->readOneof(21); + } + + /** + * The reasons for the ad group ad error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdGroupAdErrorEnum.AdGroupAdError ad_group_ad_error = 21; + * @param int $var + * @return $this + */ + public function setAdGroupAdError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\AdGroupAdErrorEnum_AdGroupAdError::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * The reasons for the ad sharing error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdSharingErrorEnum.AdSharingError ad_sharing_error = 24; + * @return int + */ + public function getAdSharingError() + { + return $this->readOneof(24); + } + + /** + * The reasons for the ad sharing error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdSharingErrorEnum.AdSharingError ad_sharing_error = 24; + * @param int $var + * @return $this + */ + public function setAdSharingError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\AdSharingErrorEnum_AdSharingError::class); + $this->writeOneof(24, $var); + + return $this; + } + + /** + * The reasons for the adx error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdxErrorEnum.AdxError adx_error = 25; + * @return int + */ + public function getAdxError() + { + return $this->readOneof(25); + } + + /** + * The reasons for the adx error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdxErrorEnum.AdxError adx_error = 25; + * @param int $var + * @return $this + */ + public function setAdxError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\AdxErrorEnum_AdxError::class); + $this->writeOneof(25, $var); + + return $this; + } + + /** + * The reasons for the bidding errors + * + * Generated from protobuf field .google.ads.googleads.v0.errors.BiddingErrorEnum.BiddingError bidding_error = 26; + * @return int + */ + public function getBiddingError() + { + return $this->readOneof(26); + } + + /** + * The reasons for the bidding errors + * + * Generated from protobuf field .google.ads.googleads.v0.errors.BiddingErrorEnum.BiddingError bidding_error = 26; + * @param int $var + * @return $this + */ + public function setBiddingError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\BiddingErrorEnum_BiddingError::class); + $this->writeOneof(26, $var); + + return $this; + } + + /** + * The reasons for the campaign criterion error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.CampaignCriterionErrorEnum.CampaignCriterionError campaign_criterion_error = 29; + * @return int + */ + public function getCampaignCriterionError() + { + return $this->readOneof(29); + } + + /** + * The reasons for the campaign criterion error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.CampaignCriterionErrorEnum.CampaignCriterionError campaign_criterion_error = 29; + * @param int $var + * @return $this + */ + public function setCampaignCriterionError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\CampaignCriterionErrorEnum_CampaignCriterionError::class); + $this->writeOneof(29, $var); + + return $this; + } + + /** + * The reasons for the collection size error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.CollectionSizeErrorEnum.CollectionSizeError collection_size_error = 31; + * @return int + */ + public function getCollectionSizeError() + { + return $this->readOneof(31); + } + + /** + * The reasons for the collection size error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.CollectionSizeErrorEnum.CollectionSizeError collection_size_error = 31; + * @param int $var + * @return $this + */ + public function setCollectionSizeError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\CollectionSizeErrorEnum_CollectionSizeError::class); + $this->writeOneof(31, $var); + + return $this; + } + + /** + * The reasons for the criterion error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.CriterionErrorEnum.CriterionError criterion_error = 32; + * @return int + */ + public function getCriterionError() + { + return $this->readOneof(32); + } + + /** + * The reasons for the criterion error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.CriterionErrorEnum.CriterionError criterion_error = 32; + * @param int $var + * @return $this + */ + public function setCriterionError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\CriterionErrorEnum_CriterionError::class); + $this->writeOneof(32, $var); + + return $this; + } + + /** + * The reasons for the date error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.DateErrorEnum.DateError date_error = 33; + * @return int + */ + public function getDateError() + { + return $this->readOneof(33); + } + + /** + * The reasons for the date error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.DateErrorEnum.DateError date_error = 33; + * @param int $var + * @return $this + */ + public function setDateError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\DateErrorEnum_DateError::class); + $this->writeOneof(33, $var); + + return $this; + } + + /** + * The reasons for the date range error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.DateRangeErrorEnum.DateRangeError date_range_error = 34; + * @return int + */ + public function getDateRangeError() + { + return $this->readOneof(34); + } + + /** + * The reasons for the date range error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.DateRangeErrorEnum.DateRangeError date_range_error = 34; + * @param int $var + * @return $this + */ + public function setDateRangeError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\DateRangeErrorEnum_DateRangeError::class); + $this->writeOneof(34, $var); + + return $this; + } + + /** + * The reasons for the distinct error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.DistinctErrorEnum.DistinctError distinct_error = 35; + * @return int + */ + public function getDistinctError() + { + return $this->readOneof(35); + } + + /** + * The reasons for the distinct error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.DistinctErrorEnum.DistinctError distinct_error = 35; + * @param int $var + * @return $this + */ + public function setDistinctError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\DistinctErrorEnum_DistinctError::class); + $this->writeOneof(35, $var); + + return $this; + } + + /** + * The reasons for the feed attribute reference error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.FeedAttributeReferenceErrorEnum.FeedAttributeReferenceError feed_attribute_reference_error = 36; + * @return int + */ + public function getFeedAttributeReferenceError() + { + return $this->readOneof(36); + } + + /** + * The reasons for the feed attribute reference error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.FeedAttributeReferenceErrorEnum.FeedAttributeReferenceError feed_attribute_reference_error = 36; + * @param int $var + * @return $this + */ + public function setFeedAttributeReferenceError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\FeedAttributeReferenceErrorEnum_FeedAttributeReferenceError::class); + $this->writeOneof(36, $var); + + return $this; + } + + /** + * The reasons for the function error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.FunctionErrorEnum.FunctionError function_error = 37; + * @return int + */ + public function getFunctionError() + { + return $this->readOneof(37); + } + + /** + * The reasons for the function error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.FunctionErrorEnum.FunctionError function_error = 37; + * @param int $var + * @return $this + */ + public function setFunctionError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\FunctionErrorEnum_FunctionError::class); + $this->writeOneof(37, $var); + + return $this; + } + + /** + * The reasons for the function parsing error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.FunctionParsingErrorEnum.FunctionParsingError function_parsing_error = 38; + * @return int + */ + public function getFunctionParsingError() + { + return $this->readOneof(38); + } + + /** + * The reasons for the function parsing error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.FunctionParsingErrorEnum.FunctionParsingError function_parsing_error = 38; + * @param int $var + * @return $this + */ + public function setFunctionParsingError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\FunctionParsingErrorEnum_FunctionParsingError::class); + $this->writeOneof(38, $var); + + return $this; + } + + /** + * The reasons for the id error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.IdErrorEnum.IdError id_error = 39; + * @return int + */ + public function getIdError() + { + return $this->readOneof(39); + } + + /** + * The reasons for the id error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.IdErrorEnum.IdError id_error = 39; + * @param int $var + * @return $this + */ + public function setIdError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\IdErrorEnum_IdError::class); + $this->writeOneof(39, $var); + + return $this; + } + + /** + * The reasons for the image error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ImageErrorEnum.ImageError image_error = 40; + * @return int + */ + public function getImageError() + { + return $this->readOneof(40); + } + + /** + * The reasons for the image error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ImageErrorEnum.ImageError image_error = 40; + * @param int $var + * @return $this + */ + public function setImageError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\ImageErrorEnum_ImageError::class); + $this->writeOneof(40, $var); + + return $this; + } + + /** + * The reasons for the media bundle error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.MediaBundleErrorEnum.MediaBundleError media_bundle_error = 42; + * @return int + */ + public function getMediaBundleError() + { + return $this->readOneof(42); + } + + /** + * The reasons for the media bundle error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.MediaBundleErrorEnum.MediaBundleError media_bundle_error = 42; + * @param int $var + * @return $this + */ + public function setMediaBundleError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\MediaBundleErrorEnum_MediaBundleError::class); + $this->writeOneof(42, $var); + + return $this; + } + + /** + * The reasons for the media error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.MediaErrorEnum.MediaError media_error = 43; + * @return int + */ + public function getMediaError() + { + return $this->readOneof(43); + } + + /** + * The reasons for the media error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.MediaErrorEnum.MediaError media_error = 43; + * @param int $var + * @return $this + */ + public function setMediaError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\MediaErrorEnum_MediaError::class); + $this->writeOneof(43, $var); + + return $this; + } + + /** + * The reasons for the multiplier error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.MultiplierErrorEnum.MultiplierError multiplier_error = 44; + * @return int + */ + public function getMultiplierError() + { + return $this->readOneof(44); + } + + /** + * The reasons for the multiplier error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.MultiplierErrorEnum.MultiplierError multiplier_error = 44; + * @param int $var + * @return $this + */ + public function setMultiplierError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\MultiplierErrorEnum_MultiplierError::class); + $this->writeOneof(44, $var); + + return $this; + } + + /** + * The reasons for the new resource creation error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.NewResourceCreationErrorEnum.NewResourceCreationError new_resource_creation_error = 45; + * @return int + */ + public function getNewResourceCreationError() + { + return $this->readOneof(45); + } + + /** + * The reasons for the new resource creation error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.NewResourceCreationErrorEnum.NewResourceCreationError new_resource_creation_error = 45; + * @param int $var + * @return $this + */ + public function setNewResourceCreationError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\NewResourceCreationErrorEnum_NewResourceCreationError::class); + $this->writeOneof(45, $var); + + return $this; + } + + /** + * The reasons for the not empty error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.NotEmptyErrorEnum.NotEmptyError not_empty_error = 46; + * @return int + */ + public function getNotEmptyError() + { + return $this->readOneof(46); + } + + /** + * The reasons for the not empty error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.NotEmptyErrorEnum.NotEmptyError not_empty_error = 46; + * @param int $var + * @return $this + */ + public function setNotEmptyError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\NotEmptyErrorEnum_NotEmptyError::class); + $this->writeOneof(46, $var); + + return $this; + } + + /** + * The reasons for the null error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.NullErrorEnum.NullError null_error = 47; + * @return int + */ + public function getNullError() + { + return $this->readOneof(47); + } + + /** + * The reasons for the null error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.NullErrorEnum.NullError null_error = 47; + * @param int $var + * @return $this + */ + public function setNullError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\NullErrorEnum_NullError::class); + $this->writeOneof(47, $var); + + return $this; + } + + /** + * The reasons for the operator error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.OperatorErrorEnum.OperatorError operator_error = 48; + * @return int + */ + public function getOperatorError() + { + return $this->readOneof(48); + } + + /** + * The reasons for the operator error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.OperatorErrorEnum.OperatorError operator_error = 48; + * @param int $var + * @return $this + */ + public function setOperatorError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\OperatorErrorEnum_OperatorError::class); + $this->writeOneof(48, $var); + + return $this; + } + + /** + * The reasons for the range error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.RangeErrorEnum.RangeError range_error = 49; + * @return int + */ + public function getRangeError() + { + return $this->readOneof(49); + } + + /** + * The reasons for the range error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.RangeErrorEnum.RangeError range_error = 49; + * @param int $var + * @return $this + */ + public function setRangeError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\RangeErrorEnum_RangeError::class); + $this->writeOneof(49, $var); + + return $this; + } + + /** + * The reasons for error in applying a recommendation + * + * Generated from protobuf field .google.ads.googleads.v0.errors.RecommendationErrorEnum.RecommendationError recommendation_error = 58; + * @return int + */ + public function getRecommendationError() + { + return $this->readOneof(58); + } + + /** + * The reasons for error in applying a recommendation + * + * Generated from protobuf field .google.ads.googleads.v0.errors.RecommendationErrorEnum.RecommendationError recommendation_error = 58; + * @param int $var + * @return $this + */ + public function setRecommendationError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\RecommendationErrorEnum_RecommendationError::class); + $this->writeOneof(58, $var); + + return $this; + } + + /** + * The reasons for the region code error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.RegionCodeErrorEnum.RegionCodeError region_code_error = 51; + * @return int + */ + public function getRegionCodeError() + { + return $this->readOneof(51); + } + + /** + * The reasons for the region code error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.RegionCodeErrorEnum.RegionCodeError region_code_error = 51; + * @param int $var + * @return $this + */ + public function setRegionCodeError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\RegionCodeErrorEnum_RegionCodeError::class); + $this->writeOneof(51, $var); + + return $this; + } + + /** + * The reasons for the setting error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.SettingErrorEnum.SettingError setting_error = 52; + * @return int + */ + public function getSettingError() + { + return $this->readOneof(52); + } + + /** + * The reasons for the setting error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.SettingErrorEnum.SettingError setting_error = 52; + * @param int $var + * @return $this + */ + public function setSettingError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\SettingErrorEnum_SettingError::class); + $this->writeOneof(52, $var); + + return $this; + } + + /** + * The reasons for the string format error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.StringFormatErrorEnum.StringFormatError string_format_error = 53; + * @return int + */ + public function getStringFormatError() + { + return $this->readOneof(53); + } + + /** + * The reasons for the string format error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.StringFormatErrorEnum.StringFormatError string_format_error = 53; + * @param int $var + * @return $this + */ + public function setStringFormatError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\StringFormatErrorEnum_StringFormatError::class); + $this->writeOneof(53, $var); + + return $this; + } + + /** + * The reasons for the string length error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.StringLengthErrorEnum.StringLengthError string_length_error = 54; + * @return int + */ + public function getStringLengthError() + { + return $this->readOneof(54); + } + + /** + * The reasons for the string length error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.StringLengthErrorEnum.StringLengthError string_length_error = 54; + * @param int $var + * @return $this + */ + public function setStringLengthError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\StringLengthErrorEnum_StringLengthError::class); + $this->writeOneof(54, $var); + + return $this; + } + + /** + * The reasons for the operation access denied error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.OperationAccessDeniedErrorEnum.OperationAccessDeniedError operation_access_denied_error = 55; + * @return int + */ + public function getOperationAccessDeniedError() + { + return $this->readOneof(55); + } + + /** + * The reasons for the operation access denied error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.OperationAccessDeniedErrorEnum.OperationAccessDeniedError operation_access_denied_error = 55; + * @param int $var + * @return $this + */ + public function setOperationAccessDeniedError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\OperationAccessDeniedErrorEnum_OperationAccessDeniedError::class); + $this->writeOneof(55, $var); + + return $this; + } + + /** + * The reasons for the resource access denied error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ResourceAccessDeniedErrorEnum.ResourceAccessDeniedError resource_access_denied_error = 56; + * @return int + */ + public function getResourceAccessDeniedError() + { + return $this->readOneof(56); + } + + /** + * The reasons for the resource access denied error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ResourceAccessDeniedErrorEnum.ResourceAccessDeniedError resource_access_denied_error = 56; + * @param int $var + * @return $this + */ + public function setResourceAccessDeniedError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\ResourceAccessDeniedErrorEnum_ResourceAccessDeniedError::class); + $this->writeOneof(56, $var); + + return $this; + } + + /** + * The reasons for the resource count limit exceeded error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ResourceCountLimitExceededErrorEnum.ResourceCountLimitExceededError resource_count_limit_exceeded_error = 57; + * @return int + */ + public function getResourceCountLimitExceededError() + { + return $this->readOneof(57); + } + + /** + * The reasons for the resource count limit exceeded error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ResourceCountLimitExceededErrorEnum.ResourceCountLimitExceededError resource_count_limit_exceeded_error = 57; + * @param int $var + * @return $this + */ + public function setResourceCountLimitExceededError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\ResourceCountLimitExceededErrorEnum_ResourceCountLimitExceededError::class); + $this->writeOneof(57, $var); + + return $this; + } + + /** + * The reasons for the ad group bid modifier error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdGroupBidModifierErrorEnum.AdGroupBidModifierError ad_group_bid_modifier_error = 59; + * @return int + */ + public function getAdGroupBidModifierError() + { + return $this->readOneof(59); + } + + /** + * The reasons for the ad group bid modifier error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.AdGroupBidModifierErrorEnum.AdGroupBidModifierError ad_group_bid_modifier_error = 59; + * @param int $var + * @return $this + */ + public function setAdGroupBidModifierError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\AdGroupBidModifierErrorEnum_AdGroupBidModifierError::class); + $this->writeOneof(59, $var); + + return $this; + } + + /** + * The reasons for the context error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ContextErrorEnum.ContextError context_error = 60; + * @return int + */ + public function getContextError() + { + return $this->readOneof(60); + } + + /** + * The reasons for the context error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ContextErrorEnum.ContextError context_error = 60; + * @param int $var + * @return $this + */ + public function setContextError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\ContextErrorEnum_ContextError::class); + $this->writeOneof(60, $var); + + return $this; + } + + /** + * The reasons for the field error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.FieldErrorEnum.FieldError field_error = 61; + * @return int + */ + public function getFieldError() + { + return $this->readOneof(61); + } + + /** + * The reasons for the field error + * + * Generated from protobuf field .google.ads.googleads.v0.errors.FieldErrorEnum.FieldError field_error = 61; + * @param int $var + * @return $this + */ + public function setFieldError($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Errors\FieldErrorEnum_FieldError::class); + $this->writeOneof(61, $var); + + return $this; + } + + /** + * @return string + */ + public function getErrorCode() + { + return $this->whichOneof("error_code"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ErrorDetails.php b/src/Google/Ads/GoogleAds/V0/Errors/ErrorDetails.php new file mode 100644 index 000000000..5e36fd5dd --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ErrorDetails.php @@ -0,0 +1,92 @@ +google.ads.googleads.v0.errors.ErrorDetails + */ +class ErrorDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The error code that should have been returned, but wasn't. This is used + * when the error code is InternalError.ERROR_CODE_NOT_PUBLISHED. + * + * Generated from protobuf field string unpublished_error_code = 1; + */ + private $unpublished_error_code = ''; + /** + * Describes an ad policy violation. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.PolicyViolationDetails policy_violation_details = 2; + */ + private $policy_violation_details = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\Errors::initOnce(); + parent::__construct(); + } + + /** + * The error code that should have been returned, but wasn't. This is used + * when the error code is InternalError.ERROR_CODE_NOT_PUBLISHED. + * + * Generated from protobuf field string unpublished_error_code = 1; + * @return string + */ + public function getUnpublishedErrorCode() + { + return $this->unpublished_error_code; + } + + /** + * The error code that should have been returned, but wasn't. This is used + * when the error code is InternalError.ERROR_CODE_NOT_PUBLISHED. + * + * Generated from protobuf field string unpublished_error_code = 1; + * @param string $var + * @return $this + */ + public function setUnpublishedErrorCode($var) + { + GPBUtil::checkString($var, True); + $this->unpublished_error_code = $var; + + return $this; + } + + /** + * Describes an ad policy violation. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.PolicyViolationDetails policy_violation_details = 2; + * @return \Google\Ads\GoogleAds\V0\Errors\PolicyViolationDetails + */ + public function getPolicyViolationDetails() + { + return $this->policy_violation_details; + } + + /** + * Describes an ad policy violation. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.PolicyViolationDetails policy_violation_details = 2; + * @param \Google\Ads\GoogleAds\V0\Errors\PolicyViolationDetails $var + * @return $this + */ + public function setPolicyViolationDetails($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Errors\PolicyViolationDetails::class); + $this->policy_violation_details = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ErrorLocation.php b/src/Google/Ads/GoogleAds/V0/Errors/ErrorLocation.php new file mode 100644 index 000000000..e98d43181 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ErrorLocation.php @@ -0,0 +1,92 @@ +google.ads.googleads.v0.errors.ErrorLocation + */ +class ErrorLocation extends \Google\Protobuf\Internal\Message +{ + /** + * The mutate operation that failed + * + * Generated from protobuf field .google.protobuf.Int64Value operation_index = 1; + */ + private $operation_index = null; + /** + * A field path that indicates which field was invalid in the resource being + * mutated. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.errors.ErrorLocation.FieldPathElement field_path_elements = 2; + */ + private $field_path_elements; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\Errors::initOnce(); + parent::__construct(); + } + + /** + * The mutate operation that failed + * + * Generated from protobuf field .google.protobuf.Int64Value operation_index = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getOperationIndex() + { + return $this->operation_index; + } + + /** + * The mutate operation that failed + * + * Generated from protobuf field .google.protobuf.Int64Value operation_index = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setOperationIndex($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->operation_index = $var; + + return $this; + } + + /** + * A field path that indicates which field was invalid in the resource being + * mutated. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.errors.ErrorLocation.FieldPathElement field_path_elements = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFieldPathElements() + { + return $this->field_path_elements; + } + + /** + * A field path that indicates which field was invalid in the resource being + * mutated. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.errors.ErrorLocation.FieldPathElement field_path_elements = 2; + * @param \Google\Ads\GoogleAds\V0\Errors\ErrorLocation_FieldPathElement[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFieldPathElements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Errors\ErrorLocation_FieldPathElement::class); + $this->field_path_elements = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ErrorLocation_FieldPathElement.php b/src/Google/Ads/GoogleAds/V0/Errors/ErrorLocation_FieldPathElement.php new file mode 100644 index 000000000..77dc9c3a3 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ErrorLocation_FieldPathElement.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.errors.ErrorLocation.FieldPathElement + */ +class ErrorLocation_FieldPathElement extends \Google\Protobuf\Internal\Message +{ + /** + * The name of a field + * + * Generated from protobuf field string field_name = 1; + */ + private $field_name = ''; + /** + * If field_name is a list, this is the element that failed + * + * Generated from protobuf field .google.protobuf.Int64Value index = 2; + */ + private $index = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\Errors::initOnce(); + parent::__construct(); + } + + /** + * The name of a field + * + * Generated from protobuf field string field_name = 1; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * The name of a field + * + * Generated from protobuf field string field_name = 1; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + + /** + * If field_name is a list, this is the element that failed + * + * Generated from protobuf field .google.protobuf.Int64Value index = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getIndex() + { + return $this->index; + } + + /** + * If field_name is a list, this is the element that failed + * + * Generated from protobuf field .google.protobuf.Int64Value index = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->index = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/FeedAttributeReferenceErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/FeedAttributeReferenceErrorEnum.php new file mode 100644 index 000000000..23a5206de --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/FeedAttributeReferenceErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.FeedAttributeReferenceErrorEnum + */ +class FeedAttributeReferenceErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\FeedAttributeReferenceError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/FeedAttributeReferenceErrorEnum_FeedAttributeReferenceError.php b/src/Google/Ads/GoogleAds/V0/Errors/FeedAttributeReferenceErrorEnum_FeedAttributeReferenceError.php new file mode 100644 index 000000000..d5f2dddcd --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/FeedAttributeReferenceErrorEnum_FeedAttributeReferenceError.php @@ -0,0 +1,45 @@ +Google\Ads\Googleads\V0\Errors\FeedAttributeReferenceErrorEnum\FeedAttributeReferenceError + */ +class FeedAttributeReferenceErrorEnum_FeedAttributeReferenceError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * A feed referenced by ID has been deleted. + * + * Generated from protobuf enum CANNOT_REFERENCE_DELETED_FEED = 2; + */ + const CANNOT_REFERENCE_DELETED_FEED = 2; + /** + * There is no active feed with the given name. + * + * Generated from protobuf enum INVALID_FEED_NAME = 3; + */ + const INVALID_FEED_NAME = 3; + /** + * There is no feed attribute in an active feed with the given name. + * + * Generated from protobuf enum INVALID_FEED_ATTRIBUTE_NAME = 4; + */ + const INVALID_FEED_ATTRIBUTE_NAME = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/FieldErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/FieldErrorEnum.php new file mode 100644 index 000000000..96423efd8 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/FieldErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.FieldErrorEnum + */ +class FieldErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\FieldError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/FieldErrorEnum_FieldError.php b/src/Google/Ads/GoogleAds/V0/Errors/FieldErrorEnum_FieldError.php new file mode 100644 index 000000000..0edb2bf2e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/FieldErrorEnum_FieldError.php @@ -0,0 +1,57 @@ +Google\Ads\Googleads\V0\Errors\FieldErrorEnum\FieldError + */ +class FieldErrorEnum_FieldError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The required field was not present in the resource. + * + * Generated from protobuf enum REQUIRED = 2; + */ + const REQUIRED = 2; + /** + * The field attempted to be mutated is immutable. + * + * Generated from protobuf enum IMMUTABLE_FIELD = 3; + */ + const IMMUTABLE_FIELD = 3; + /** + * The field's value is invalid. + * + * Generated from protobuf enum INVALID_VALUE = 4; + */ + const INVALID_VALUE = 4; + /** + * The field cannot be set. + * + * Generated from protobuf enum VALUE_MUST_BE_UNSET = 5; + */ + const VALUE_MUST_BE_UNSET = 5; + /** + * The required repeated field was empty. + * + * Generated from protobuf enum REQUIRED_NONEMPTY_LIST = 6; + */ + const REQUIRED_NONEMPTY_LIST = 6; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/FieldMaskErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/FieldMaskErrorEnum.php new file mode 100644 index 000000000..46cc43b10 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/FieldMaskErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.FieldMaskErrorEnum + */ +class FieldMaskErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\FieldMaskError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/FieldMaskErrorEnum_FieldMaskError.php b/src/Google/Ads/GoogleAds/V0/Errors/FieldMaskErrorEnum_FieldMaskError.php new file mode 100644 index 000000000..3970f99bf --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/FieldMaskErrorEnum_FieldMaskError.php @@ -0,0 +1,53 @@ +Google\Ads\Googleads\V0\Errors\FieldMaskErrorEnum\FieldMaskError + */ +class FieldMaskErrorEnum_FieldMaskError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The field mask must be provided for update operations. + * + * Generated from protobuf enum FIELD_MASK_MISSING = 5; + */ + const FIELD_MASK_MISSING = 5; + /** + * The field mask must be empty for create and remove operations. + * + * Generated from protobuf enum FIELD_MASK_NOT_ALLOWED = 4; + */ + const FIELD_MASK_NOT_ALLOWED = 4; + /** + * The field mask contained an invalid field. + * + * Generated from protobuf enum FIELD_NOT_FOUND = 2; + */ + const FIELD_NOT_FOUND = 2; + /** + * The field mask updated a field with subfields. Fields with subfields may + * be cleared, but not updated. To fix this, the field mask should select + * all the subfields of the invalid field. + * + * Generated from protobuf enum FIELD_HAS_SUBFIELDS = 3; + */ + const FIELD_HAS_SUBFIELDS = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/FunctionErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/FunctionErrorEnum.php new file mode 100644 index 000000000..1bc02499e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/FunctionErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.FunctionErrorEnum + */ +class FunctionErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\FunctionError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/FunctionErrorEnum_FunctionError.php b/src/Google/Ads/GoogleAds/V0/Errors/FunctionErrorEnum_FunctionError.php new file mode 100644 index 000000000..88ff9229c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/FunctionErrorEnum_FunctionError.php @@ -0,0 +1,124 @@ +Google\Ads\Googleads\V0\Errors\FunctionErrorEnum\FunctionError + */ +class FunctionErrorEnum_FunctionError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The format of the function is not recognized as a supported function + * format. + * + * Generated from protobuf enum INVALID_FUNCTION_FORMAT = 2; + */ + const INVALID_FUNCTION_FORMAT = 2; + /** + * Operand data types do not match. + * + * Generated from protobuf enum DATA_TYPE_MISMATCH = 3; + */ + const DATA_TYPE_MISMATCH = 3; + /** + * The operands cannot be used together in a conjunction. + * + * Generated from protobuf enum INVALID_CONJUNCTION_OPERANDS = 4; + */ + const INVALID_CONJUNCTION_OPERANDS = 4; + /** + * Invalid numer of Operands. + * + * Generated from protobuf enum INVALID_NUMBER_OF_OPERANDS = 5; + */ + const INVALID_NUMBER_OF_OPERANDS = 5; + /** + * Operand Type not supported. + * + * Generated from protobuf enum INVALID_OPERAND_TYPE = 6; + */ + const INVALID_OPERAND_TYPE = 6; + /** + * Operator not supported. + * + * Generated from protobuf enum INVALID_OPERATOR = 7; + */ + const INVALID_OPERATOR = 7; + /** + * Request context type not supported. + * + * Generated from protobuf enum INVALID_REQUEST_CONTEXT_TYPE = 8; + */ + const INVALID_REQUEST_CONTEXT_TYPE = 8; + /** + * The matching function is not allowed for call placeholders + * + * Generated from protobuf enum INVALID_FUNCTION_FOR_CALL_PLACEHOLDER = 9; + */ + const INVALID_FUNCTION_FOR_CALL_PLACEHOLDER = 9; + /** + * The matching function is not allowed for the specified placeholder + * + * Generated from protobuf enum INVALID_FUNCTION_FOR_PLACEHOLDER = 10; + */ + const INVALID_FUNCTION_FOR_PLACEHOLDER = 10; + /** + * Invalid operand. + * + * Generated from protobuf enum INVALID_OPERAND = 11; + */ + const INVALID_OPERAND = 11; + /** + * Missing value for the constant operand. + * + * Generated from protobuf enum MISSING_CONSTANT_OPERAND_VALUE = 12; + */ + const MISSING_CONSTANT_OPERAND_VALUE = 12; + /** + * The value of the constant operand is invalid. + * + * Generated from protobuf enum INVALID_CONSTANT_OPERAND_VALUE = 13; + */ + const INVALID_CONSTANT_OPERAND_VALUE = 13; + /** + * Invalid function nesting. + * + * Generated from protobuf enum INVALID_NESTING = 14; + */ + const INVALID_NESTING = 14; + /** + * The Feed ID was different from another Feed ID in the same function. + * + * Generated from protobuf enum MULTIPLE_FEED_IDS_NOT_SUPPORTED = 15; + */ + const MULTIPLE_FEED_IDS_NOT_SUPPORTED = 15; + /** + * The matching function is invalid for use with a feed with a fixed schema. + * + * Generated from protobuf enum INVALID_FUNCTION_FOR_FEED_WITH_FIXED_SCHEMA = 16; + */ + const INVALID_FUNCTION_FOR_FEED_WITH_FIXED_SCHEMA = 16; + /** + * Invalid attribute name. + * + * Generated from protobuf enum INVALID_ATTRIBUTE_NAME = 17; + */ + const INVALID_ATTRIBUTE_NAME = 17; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/FunctionParsingErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/FunctionParsingErrorEnum.php new file mode 100644 index 000000000..21673fdab --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/FunctionParsingErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.FunctionParsingErrorEnum + */ +class FunctionParsingErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\FunctionParsingError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/FunctionParsingErrorEnum_FunctionParsingError.php b/src/Google/Ads/GoogleAds/V0/Errors/FunctionParsingErrorEnum_FunctionParsingError.php new file mode 100644 index 000000000..11f6362f9 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/FunctionParsingErrorEnum_FunctionParsingError.php @@ -0,0 +1,93 @@ +Google\Ads\Googleads\V0\Errors\FunctionParsingErrorEnum\FunctionParsingError + */ +class FunctionParsingErrorEnum_FunctionParsingError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Unexpected end of function string. + * + * Generated from protobuf enum NO_MORE_INPUT = 2; + */ + const NO_MORE_INPUT = 2; + /** + * Could not find an expected character. + * + * Generated from protobuf enum EXPECTED_CHARACTER = 3; + */ + const EXPECTED_CHARACTER = 3; + /** + * Unexpected separator character. + * + * Generated from protobuf enum UNEXPECTED_SEPARATOR = 4; + */ + const UNEXPECTED_SEPARATOR = 4; + /** + * Unmatched left bracket or parenthesis. + * + * Generated from protobuf enum UNMATCHED_LEFT_BRACKET = 5; + */ + const UNMATCHED_LEFT_BRACKET = 5; + /** + * Unmatched right bracket or parenthesis. + * + * Generated from protobuf enum UNMATCHED_RIGHT_BRACKET = 6; + */ + const UNMATCHED_RIGHT_BRACKET = 6; + /** + * Functions are nested too deeply. + * + * Generated from protobuf enum TOO_MANY_NESTED_FUNCTIONS = 7; + */ + const TOO_MANY_NESTED_FUNCTIONS = 7; + /** + * Missing right-hand-side operand. + * + * Generated from protobuf enum MISSING_RIGHT_HAND_OPERAND = 8; + */ + const MISSING_RIGHT_HAND_OPERAND = 8; + /** + * Invalid operator/function name. + * + * Generated from protobuf enum INVALID_OPERATOR_NAME = 9; + */ + const INVALID_OPERATOR_NAME = 9; + /** + * Feed attribute operand's argument is not an integer. + * + * Generated from protobuf enum FEED_ATTRIBUTE_OPERAND_ARGUMENT_NOT_INTEGER = 10; + */ + const FEED_ATTRIBUTE_OPERAND_ARGUMENT_NOT_INTEGER = 10; + /** + * Missing function operands. + * + * Generated from protobuf enum NO_OPERANDS = 11; + */ + const NO_OPERANDS = 11; + /** + * Function had too many operands. + * + * Generated from protobuf enum TOO_MANY_OPERANDS = 12; + */ + const TOO_MANY_OPERANDS = 12; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/GoogleAdsError.php b/src/Google/Ads/GoogleAds/V0/Errors/GoogleAdsError.php new file mode 100644 index 000000000..b8c97ec97 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/GoogleAdsError.php @@ -0,0 +1,188 @@ +google.ads.googleads.v0.errors.GoogleAdsError + */ +class GoogleAdsError extends \Google\Protobuf\Internal\Message +{ + /** + * An enum value that indicates which error occurred. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ErrorCode error_code = 1; + */ + private $error_code = null; + /** + * A human-readable description of the error. + * + * Generated from protobuf field string message = 2; + */ + private $message = ''; + /** + * The value that triggered the error. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Value trigger = 3; + */ + private $trigger = null; + /** + * Describes the part of the request proto that caused the error. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ErrorLocation location = 4; + */ + private $location = null; + /** + * Additional error details, which are returned by certain error codes. Most + * error codes do not include details. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ErrorDetails details = 5; + */ + private $details = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\Errors::initOnce(); + parent::__construct(); + } + + /** + * An enum value that indicates which error occurred. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ErrorCode error_code = 1; + * @return \Google\Ads\GoogleAds\V0\Errors\ErrorCode + */ + public function getErrorCode() + { + return $this->error_code; + } + + /** + * An enum value that indicates which error occurred. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ErrorCode error_code = 1; + * @param \Google\Ads\GoogleAds\V0\Errors\ErrorCode $var + * @return $this + */ + public function setErrorCode($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Errors\ErrorCode::class); + $this->error_code = $var; + + return $this; + } + + /** + * A human-readable description of the error. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * A human-readable description of the error. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * The value that triggered the error. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Value trigger = 3; + * @return \Google\Ads\GoogleAds\V0\Common\Value + */ + public function getTrigger() + { + return $this->trigger; + } + + /** + * The value that triggered the error. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Value trigger = 3; + * @param \Google\Ads\GoogleAds\V0\Common\Value $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\Value::class); + $this->trigger = $var; + + return $this; + } + + /** + * Describes the part of the request proto that caused the error. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ErrorLocation location = 4; + * @return \Google\Ads\GoogleAds\V0\Errors\ErrorLocation + */ + public function getLocation() + { + return $this->location; + } + + /** + * Describes the part of the request proto that caused the error. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ErrorLocation location = 4; + * @param \Google\Ads\GoogleAds\V0\Errors\ErrorLocation $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Errors\ErrorLocation::class); + $this->location = $var; + + return $this; + } + + /** + * Additional error details, which are returned by certain error codes. Most + * error codes do not include details. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ErrorDetails details = 5; + * @return \Google\Ads\GoogleAds\V0\Errors\ErrorDetails + */ + public function getDetails() + { + return $this->details; + } + + /** + * Additional error details, which are returned by certain error codes. Most + * error codes do not include details. + * + * Generated from protobuf field .google.ads.googleads.v0.errors.ErrorDetails details = 5; + * @param \Google\Ads\GoogleAds\V0\Errors\ErrorDetails $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Errors\ErrorDetails::class); + $this->details = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/GoogleAdsFailure.php b/src/Google/Ads/GoogleAds/V0/Errors/GoogleAdsFailure.php new file mode 100644 index 000000000..38da677c0 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/GoogleAdsFailure.php @@ -0,0 +1,58 @@ +google.ads.googleads.v0.errors.GoogleAdsFailure + */ +class GoogleAdsFailure extends \Google\Protobuf\Internal\Message +{ + /** + * The list of errors that occurred. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.errors.GoogleAdsError errors = 1; + */ + private $errors; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\Errors::initOnce(); + parent::__construct(); + } + + /** + * The list of errors that occurred. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.errors.GoogleAdsError errors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * The list of errors that occurred. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.errors.GoogleAdsError errors = 1; + * @param \Google\Ads\GoogleAds\V0\Errors\GoogleAdsError[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Errors\GoogleAdsError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/IdErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/IdErrorEnum.php new file mode 100644 index 000000000..e9beb386a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/IdErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.IdErrorEnum + */ +class IdErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\IdError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/IdErrorEnum_IdError.php b/src/Google/Ads/GoogleAds/V0/Errors/IdErrorEnum_IdError.php new file mode 100644 index 000000000..2d05bfa6a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/IdErrorEnum_IdError.php @@ -0,0 +1,33 @@ +Google\Ads\Googleads\V0\Errors\IdErrorEnum\IdError + */ +class IdErrorEnum_IdError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Id not found + * + * Generated from protobuf enum NOT_FOUND = 2; + */ + const NOT_FOUND = 2; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ImageErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/ImageErrorEnum.php new file mode 100644 index 000000000..a487b912f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ImageErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.ImageErrorEnum + */ +class ImageErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\ImageError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ImageErrorEnum_ImageError.php b/src/Google/Ads/GoogleAds/V0/Errors/ImageErrorEnum_ImageError.php new file mode 100644 index 000000000..0b4615fe4 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ImageErrorEnum_ImageError.php @@ -0,0 +1,250 @@ +Google\Ads\Googleads\V0\Errors\ImageErrorEnum\ImageError + */ +class ImageErrorEnum_ImageError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The image is not valid. + * + * Generated from protobuf enum INVALID_IMAGE = 2; + */ + const INVALID_IMAGE = 2; + /** + * The image could not be stored. + * + * Generated from protobuf enum STORAGE_ERROR = 3; + */ + const STORAGE_ERROR = 3; + /** + * There was a problem with the request. + * + * Generated from protobuf enum BAD_REQUEST = 4; + */ + const BAD_REQUEST = 4; + /** + * The image is not of legal dimensions. + * + * Generated from protobuf enum UNEXPECTED_SIZE = 5; + */ + const UNEXPECTED_SIZE = 5; + /** + * Animated image are not permitted. + * + * Generated from protobuf enum ANIMATED_NOT_ALLOWED = 6; + */ + const ANIMATED_NOT_ALLOWED = 6; + /** + * Animation is too long. + * + * Generated from protobuf enum ANIMATION_TOO_LONG = 7; + */ + const ANIMATION_TOO_LONG = 7; + /** + * There was an error on the server. + * + * Generated from protobuf enum SERVER_ERROR = 8; + */ + const SERVER_ERROR = 8; + /** + * Image cannot be in CMYK color format. + * + * Generated from protobuf enum CMYK_JPEG_NOT_ALLOWED = 9; + */ + const CMYK_JPEG_NOT_ALLOWED = 9; + /** + * Flash images are not permitted. + * + * Generated from protobuf enum FLASH_NOT_ALLOWED = 10; + */ + const FLASH_NOT_ALLOWED = 10; + /** + * Flash images must support clickTag. + * + * Generated from protobuf enum FLASH_WITHOUT_CLICKTAG = 11; + */ + const FLASH_WITHOUT_CLICKTAG = 11; + /** + * A flash error has occurred after fixing the click tag. + * + * Generated from protobuf enum FLASH_ERROR_AFTER_FIXING_CLICK_TAG = 12; + */ + const FLASH_ERROR_AFTER_FIXING_CLICK_TAG = 12; + /** + * Unacceptable visual effects. + * + * Generated from protobuf enum ANIMATED_VISUAL_EFFECT = 13; + */ + const ANIMATED_VISUAL_EFFECT = 13; + /** + * There was a problem with the flash image. + * + * Generated from protobuf enum FLASH_ERROR = 14; + */ + const FLASH_ERROR = 14; + /** + * Incorrect image layout. + * + * Generated from protobuf enum LAYOUT_PROBLEM = 15; + */ + const LAYOUT_PROBLEM = 15; + /** + * There was a problem reading the image file. + * + * Generated from protobuf enum PROBLEM_READING_IMAGE_FILE = 16; + */ + const PROBLEM_READING_IMAGE_FILE = 16; + /** + * There was an error storing the image. + * + * Generated from protobuf enum ERROR_STORING_IMAGE = 17; + */ + const ERROR_STORING_IMAGE = 17; + /** + * The aspect ratio of the image is not allowed. + * + * Generated from protobuf enum ASPECT_RATIO_NOT_ALLOWED = 18; + */ + const ASPECT_RATIO_NOT_ALLOWED = 18; + /** + * Flash cannot have network objects. + * + * Generated from protobuf enum FLASH_HAS_NETWORK_OBJECTS = 19; + */ + const FLASH_HAS_NETWORK_OBJECTS = 19; + /** + * Flash cannot have network methods. + * + * Generated from protobuf enum FLASH_HAS_NETWORK_METHODS = 20; + */ + const FLASH_HAS_NETWORK_METHODS = 20; + /** + * Flash cannot have a Url. + * + * Generated from protobuf enum FLASH_HAS_URL = 21; + */ + const FLASH_HAS_URL = 21; + /** + * Flash cannot use mouse tracking. + * + * Generated from protobuf enum FLASH_HAS_MOUSE_TRACKING = 22; + */ + const FLASH_HAS_MOUSE_TRACKING = 22; + /** + * Flash cannot have a random number. + * + * Generated from protobuf enum FLASH_HAS_RANDOM_NUM = 23; + */ + const FLASH_HAS_RANDOM_NUM = 23; + /** + * Ad click target cannot be '_self'. + * + * Generated from protobuf enum FLASH_SELF_TARGETS = 24; + */ + const FLASH_SELF_TARGETS = 24; + /** + * GetUrl method should only use '_blank'. + * + * Generated from protobuf enum FLASH_BAD_GETURL_TARGET = 25; + */ + const FLASH_BAD_GETURL_TARGET = 25; + /** + * Flash version is not supported. + * + * Generated from protobuf enum FLASH_VERSION_NOT_SUPPORTED = 26; + */ + const FLASH_VERSION_NOT_SUPPORTED = 26; + /** + * Flash movies need to have hard coded click URL or clickTAG + * + * Generated from protobuf enum FLASH_WITHOUT_HARD_CODED_CLICK_URL = 27; + */ + const FLASH_WITHOUT_HARD_CODED_CLICK_URL = 27; + /** + * Uploaded flash file is corrupted. + * + * Generated from protobuf enum INVALID_FLASH_FILE = 28; + */ + const INVALID_FLASH_FILE = 28; + /** + * Uploaded flash file can be parsed, but the click tag can not be fixed + * properly. + * + * Generated from protobuf enum FAILED_TO_FIX_CLICK_TAG_IN_FLASH = 29; + */ + const FAILED_TO_FIX_CLICK_TAG_IN_FLASH = 29; + /** + * Flash movie accesses network resources + * + * Generated from protobuf enum FLASH_ACCESSES_NETWORK_RESOURCES = 30; + */ + const FLASH_ACCESSES_NETWORK_RESOURCES = 30; + /** + * Flash movie attempts to call external javascript code + * + * Generated from protobuf enum FLASH_EXTERNAL_JS_CALL = 31; + */ + const FLASH_EXTERNAL_JS_CALL = 31; + /** + * Flash movie attempts to call flash system commands + * + * Generated from protobuf enum FLASH_EXTERNAL_FS_CALL = 32; + */ + const FLASH_EXTERNAL_FS_CALL = 32; + /** + * Image file is too large. + * + * Generated from protobuf enum FILE_TOO_LARGE = 33; + */ + const FILE_TOO_LARGE = 33; + /** + * Image data is too large. + * + * Generated from protobuf enum IMAGE_DATA_TOO_LARGE = 34; + */ + const IMAGE_DATA_TOO_LARGE = 34; + /** + * Error while processing the image. + * + * Generated from protobuf enum IMAGE_PROCESSING_ERROR = 35; + */ + const IMAGE_PROCESSING_ERROR = 35; + /** + * Image is too small. + * + * Generated from protobuf enum IMAGE_TOO_SMALL = 36; + */ + const IMAGE_TOO_SMALL = 36; + /** + * Input was invalid. + * + * Generated from protobuf enum INVALID_INPUT = 37; + */ + const INVALID_INPUT = 37; + /** + * There was a problem reading the image file. + * + * Generated from protobuf enum PROBLEM_READING_FILE = 38; + */ + const PROBLEM_READING_FILE = 38; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/InternalErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/InternalErrorEnum.php new file mode 100644 index 000000000..6dd94995b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/InternalErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.InternalErrorEnum + */ +class InternalErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\InternalError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/InternalErrorEnum_InternalError.php b/src/Google/Ads/GoogleAds/V0/Errors/InternalErrorEnum_InternalError.php new file mode 100644 index 000000000..fcdf1de17 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/InternalErrorEnum_InternalError.php @@ -0,0 +1,47 @@ +Google\Ads\Googleads\V0\Errors\InternalErrorEnum\InternalError + */ +class InternalErrorEnum_InternalError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Google Ads API encountered unexpected internal error. + * + * Generated from protobuf enum INTERNAL_ERROR = 2; + */ + const INTERNAL_ERROR = 2; + /** + * The intended error code doesn't exist in any API version. This will be + * fixed by adding a new error code as soon as possible. + * + * Generated from protobuf enum ERROR_CODE_NOT_PUBLISHED = 3; + */ + const ERROR_CODE_NOT_PUBLISHED = 3; + /** + * Google Ads API encountered an unexpected transient error. The user + * should retry their request in these cases. + * + * Generated from protobuf enum TRANSIENT_ERROR = 4; + */ + const TRANSIENT_ERROR = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ListOperationErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/ListOperationErrorEnum.php new file mode 100644 index 000000000..5b776df4a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ListOperationErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.ListOperationErrorEnum + */ +class ListOperationErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\ListOperationError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ListOperationErrorEnum_ListOperationError.php b/src/Google/Ads/GoogleAds/V0/Errors/ListOperationErrorEnum_ListOperationError.php new file mode 100644 index 000000000..d982d6a63 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ListOperationErrorEnum_ListOperationError.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Errors\ListOperationErrorEnum\ListOperationError + */ +class ListOperationErrorEnum_ListOperationError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Field required in value is missing. + * + * Generated from protobuf enum REQUIRED_FIELD_MISSING = 7; + */ + const REQUIRED_FIELD_MISSING = 7; + /** + * Duplicate or identical value is sent in multiple list operations. + * + * Generated from protobuf enum DUPLICATE_VALUES = 8; + */ + const DUPLICATE_VALUES = 8; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/MediaBundleErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/MediaBundleErrorEnum.php new file mode 100644 index 000000000..35a413ad8 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/MediaBundleErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.MediaBundleErrorEnum + */ +class MediaBundleErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\MediaBundleError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/MediaBundleErrorEnum_MediaBundleError.php b/src/Google/Ads/GoogleAds/V0/Errors/MediaBundleErrorEnum_MediaBundleError.php new file mode 100644 index 000000000..6e1ab0777 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/MediaBundleErrorEnum_MediaBundleError.php @@ -0,0 +1,159 @@ +Google\Ads\Googleads\V0\Errors\MediaBundleErrorEnum\MediaBundleError + */ +class MediaBundleErrorEnum_MediaBundleError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * There was a problem with the request. + * + * Generated from protobuf enum BAD_REQUEST = 3; + */ + const BAD_REQUEST = 3; + /** + * HTML5 ads using DoubleClick Studio created ZIP files are not supported. + * + * Generated from protobuf enum DOUBLECLICK_BUNDLE_NOT_ALLOWED = 4; + */ + const DOUBLECLICK_BUNDLE_NOT_ALLOWED = 4; + /** + * Cannot reference URL external to the media bundle. + * + * Generated from protobuf enum EXTERNAL_URL_NOT_ALLOWED = 5; + */ + const EXTERNAL_URL_NOT_ALLOWED = 5; + /** + * Media bundle file is too large. + * + * Generated from protobuf enum FILE_TOO_LARGE = 6; + */ + const FILE_TOO_LARGE = 6; + /** + * ZIP file from Google Web Designer is not published. + * + * Generated from protobuf enum GOOGLE_WEB_DESIGNER_ZIP_FILE_NOT_PUBLISHED = 7; + */ + const GOOGLE_WEB_DESIGNER_ZIP_FILE_NOT_PUBLISHED = 7; + /** + * Input was invalid. + * + * Generated from protobuf enum INVALID_INPUT = 8; + */ + const INVALID_INPUT = 8; + /** + * There was a problem with the media bundle. + * + * Generated from protobuf enum INVALID_MEDIA_BUNDLE = 9; + */ + const INVALID_MEDIA_BUNDLE = 9; + /** + * There was a problem with one or more of the media bundle entries. + * + * Generated from protobuf enum INVALID_MEDIA_BUNDLE_ENTRY = 10; + */ + const INVALID_MEDIA_BUNDLE_ENTRY = 10; + /** + * The media bundle contains a file with an unknown mime type + * + * Generated from protobuf enum INVALID_MIME_TYPE = 11; + */ + const INVALID_MIME_TYPE = 11; + /** + * The media bundle contain an invalid asset path. + * + * Generated from protobuf enum INVALID_PATH = 12; + */ + const INVALID_PATH = 12; + /** + * HTML5 ad is trying to reference an asset not in .ZIP file + * + * Generated from protobuf enum INVALID_URL_REFERENCE = 13; + */ + const INVALID_URL_REFERENCE = 13; + /** + * Media data is too large. + * + * Generated from protobuf enum MEDIA_DATA_TOO_LARGE = 14; + */ + const MEDIA_DATA_TOO_LARGE = 14; + /** + * The media bundle contains no primary entry. + * + * Generated from protobuf enum MISSING_PRIMARY_MEDIA_BUNDLE_ENTRY = 15; + */ + const MISSING_PRIMARY_MEDIA_BUNDLE_ENTRY = 15; + /** + * There was an error on the server. + * + * Generated from protobuf enum SERVER_ERROR = 16; + */ + const SERVER_ERROR = 16; + /** + * The image could not be stored. + * + * Generated from protobuf enum STORAGE_ERROR = 17; + */ + const STORAGE_ERROR = 17; + /** + * Media bundle created with the Swiffy tool is not allowed. + * + * Generated from protobuf enum SWIFFY_BUNDLE_NOT_ALLOWED = 18; + */ + const SWIFFY_BUNDLE_NOT_ALLOWED = 18; + /** + * The media bundle contains too many files. + * + * Generated from protobuf enum TOO_MANY_FILES = 19; + */ + const TOO_MANY_FILES = 19; + /** + * The media bundle is not of legal dimensions. + * + * Generated from protobuf enum UNEXPECTED_SIZE = 20; + */ + const UNEXPECTED_SIZE = 20; + /** + * Google Web Designer not created for "AdWords" environment. + * + * Generated from protobuf enum UNSUPPORTED_GOOGLE_WEB_DESIGNER_ENVIRONMENT = 21; + */ + const UNSUPPORTED_GOOGLE_WEB_DESIGNER_ENVIRONMENT = 21; + /** + * Unsupported HTML5 feature in HTML5 asset. + * + * Generated from protobuf enum UNSUPPORTED_HTML5_FEATURE = 22; + */ + const UNSUPPORTED_HTML5_FEATURE = 22; + /** + * URL in HTML5 entry is not ssl compliant. + * + * Generated from protobuf enum URL_IN_MEDIA_BUNDLE_NOT_SSL_COMPLIANT = 23; + */ + const URL_IN_MEDIA_BUNDLE_NOT_SSL_COMPLIANT = 23; + /** + * Custom exits not allowed in HTML5 entry. + * + * Generated from protobuf enum CUSTOM_EXIT_NOT_ALLOWED = 24; + */ + const CUSTOM_EXIT_NOT_ALLOWED = 24; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/MediaErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/MediaErrorEnum.php new file mode 100644 index 000000000..8598b8a08 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/MediaErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.MediaErrorEnum + */ +class MediaErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\MediaError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/MediaErrorEnum_MediaError.php b/src/Google/Ads/GoogleAds/V0/Errors/MediaErrorEnum_MediaError.php new file mode 100644 index 000000000..8b59f2d6a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/MediaErrorEnum_MediaError.php @@ -0,0 +1,172 @@ +Google\Ads\Googleads\V0\Errors\MediaErrorEnum\MediaError + */ +class MediaErrorEnum_MediaError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Cannot add a standard icon type + * + * Generated from protobuf enum CANNOT_ADD_STANDARD_ICON = 2; + */ + const CANNOT_ADD_STANDARD_ICON = 2; + /** + * May only select Standard Icons alone + * + * Generated from protobuf enum CANNOT_SELECT_STANDARD_ICON_WITH_OTHER_TYPES = 3; + */ + const CANNOT_SELECT_STANDARD_ICON_WITH_OTHER_TYPES = 3; + /** + * Image contains both a media ID and media data. + * + * Generated from protobuf enum CANNOT_SPECIFY_MEDIA_ID_AND_DATA = 4; + */ + const CANNOT_SPECIFY_MEDIA_ID_AND_DATA = 4; + /** + * A media with given type and reference id already exists + * + * Generated from protobuf enum DUPLICATE_MEDIA = 5; + */ + const DUPLICATE_MEDIA = 5; + /** + * A required field was not specified or is an empty string. + * + * Generated from protobuf enum EMPTY_FIELD = 6; + */ + const EMPTY_FIELD = 6; + /** + * A media may only be modified once per call + * + * Generated from protobuf enum RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 7; + */ + const RESOURCE_REFERENCED_IN_MULTIPLE_OPS = 7; + /** + * Field is not supported for the media sub type. + * + * Generated from protobuf enum FIELD_NOT_SUPPORTED_FOR_MEDIA_SUB_TYPE = 8; + */ + const FIELD_NOT_SUPPORTED_FOR_MEDIA_SUB_TYPE = 8; + /** + * The media id is invalid + * + * Generated from protobuf enum INVALID_MEDIA_ID = 9; + */ + const INVALID_MEDIA_ID = 9; + /** + * The media subtype is invalid + * + * Generated from protobuf enum INVALID_MEDIA_SUB_TYPE = 10; + */ + const INVALID_MEDIA_SUB_TYPE = 10; + /** + * The media type is invalid + * + * Generated from protobuf enum INVALID_MEDIA_TYPE = 11; + */ + const INVALID_MEDIA_TYPE = 11; + /** + * The mimetype is invalid + * + * Generated from protobuf enum INVALID_MIME_TYPE = 12; + */ + const INVALID_MIME_TYPE = 12; + /** + * The media reference id is invalid + * + * Generated from protobuf enum INVALID_REFERENCE_ID = 13; + */ + const INVALID_REFERENCE_ID = 13; + /** + * The YouTube video id is invalid + * + * Generated from protobuf enum INVALID_YOU_TUBE_ID = 14; + */ + const INVALID_YOU_TUBE_ID = 14; + /** + * Media has failed transcoding + * + * Generated from protobuf enum MEDIA_FAILED_TRANSCODING = 15; + */ + const MEDIA_FAILED_TRANSCODING = 15; + /** + * Media has not been transcoded + * + * Generated from protobuf enum MEDIA_NOT_TRANSCODED = 16; + */ + const MEDIA_NOT_TRANSCODED = 16; + /** + * The MediaType does not match the actual media object's type + * + * Generated from protobuf enum MEDIA_TYPE_DOES_NOT_MATCH_OBJECT_TYPE = 17; + */ + const MEDIA_TYPE_DOES_NOT_MATCH_OBJECT_TYPE = 17; + /** + * None of the fields have been specified. + * + * Generated from protobuf enum NO_FIELDS_SPECIFIED = 18; + */ + const NO_FIELDS_SPECIFIED = 18; + /** + * One of reference Id or media Id must be specified + * + * Generated from protobuf enum NULL_REFERENCE_ID_AND_MEDIA_ID = 19; + */ + const NULL_REFERENCE_ID_AND_MEDIA_ID = 19; + /** + * The string has too many characters. + * + * Generated from protobuf enum TOO_LONG = 20; + */ + const TOO_LONG = 20; + /** + * The specified operation is not supported. Only ADD, SET, and REMOVE are + * supported + * + * Generated from protobuf enum UNSUPPORTED_OPERATION = 21; + */ + const UNSUPPORTED_OPERATION = 21; + /** + * The specified type is not supported. + * + * Generated from protobuf enum UNSUPPORTED_TYPE = 22; + */ + const UNSUPPORTED_TYPE = 22; + /** + * YouTube is unavailable for requesting video data. + * + * Generated from protobuf enum YOU_TUBE_SERVICE_UNAVAILABLE = 23; + */ + const YOU_TUBE_SERVICE_UNAVAILABLE = 23; + /** + * The YouTube video has a non positive duration. + * + * Generated from protobuf enum YOU_TUBE_VIDEO_HAS_NON_POSITIVE_DURATION = 24; + */ + const YOU_TUBE_VIDEO_HAS_NON_POSITIVE_DURATION = 24; + /** + * The YouTube video id is syntactically valid but the video was not found. + * + * Generated from protobuf enum YOU_TUBE_VIDEO_NOT_FOUND = 25; + */ + const YOU_TUBE_VIDEO_NOT_FOUND = 25; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/MultiplierErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/MultiplierErrorEnum.php new file mode 100644 index 000000000..3aa6ec2bd --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/MultiplierErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.MultiplierErrorEnum + */ +class MultiplierErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\MultiplierError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/MultiplierErrorEnum_MultiplierError.php b/src/Google/Ads/GoogleAds/V0/Errors/MultiplierErrorEnum_MultiplierError.php new file mode 100644 index 000000000..7e3c12848 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/MultiplierErrorEnum_MultiplierError.php @@ -0,0 +1,100 @@ +Google\Ads\Googleads\V0\Errors\MultiplierErrorEnum\MultiplierError + */ +class MultiplierErrorEnum_MultiplierError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Multiplier value is too high + * + * Generated from protobuf enum MULTIPLIER_TOO_HIGH = 2; + */ + const MULTIPLIER_TOO_HIGH = 2; + /** + * Multiplier value is too low + * + * Generated from protobuf enum MULTIPLIER_TOO_LOW = 3; + */ + const MULTIPLIER_TOO_LOW = 3; + /** + * Too many fractional digits + * + * Generated from protobuf enum TOO_MANY_FRACTIONAL_DIGITS = 4; + */ + const TOO_MANY_FRACTIONAL_DIGITS = 4; + /** + * A multiplier cannot be set for this bidding strategy + * + * Generated from protobuf enum MULTIPLIER_NOT_ALLOWED_FOR_BIDDING_STRATEGY = 5; + */ + const MULTIPLIER_NOT_ALLOWED_FOR_BIDDING_STRATEGY = 5; + /** + * A multiplier cannot be set when there is no base bid (e.g., content max + * cpc) + * + * Generated from protobuf enum MULTIPLIER_NOT_ALLOWED_WHEN_BASE_BID_IS_MISSING = 6; + */ + const MULTIPLIER_NOT_ALLOWED_WHEN_BASE_BID_IS_MISSING = 6; + /** + * A bid multiplier must be specified + * + * Generated from protobuf enum NO_MULTIPLIER_SPECIFIED = 7; + */ + const NO_MULTIPLIER_SPECIFIED = 7; + /** + * Multiplier causes bid to exceed daily budget + * + * Generated from protobuf enum MULTIPLIER_CAUSES_BID_TO_EXCEED_DAILY_BUDGET = 8; + */ + const MULTIPLIER_CAUSES_BID_TO_EXCEED_DAILY_BUDGET = 8; + /** + * Multiplier causes bid to exceed monthly budget + * + * Generated from protobuf enum MULTIPLIER_CAUSES_BID_TO_EXCEED_MONTHLY_BUDGET = 9; + */ + const MULTIPLIER_CAUSES_BID_TO_EXCEED_MONTHLY_BUDGET = 9; + /** + * Multiplier causes bid to exceed custom budget + * + * Generated from protobuf enum MULTIPLIER_CAUSES_BID_TO_EXCEED_CUSTOM_BUDGET = 10; + */ + const MULTIPLIER_CAUSES_BID_TO_EXCEED_CUSTOM_BUDGET = 10; + /** + * Multiplier causes bid to exceed maximum allowed bid + * + * Generated from protobuf enum MULTIPLIER_CAUSES_BID_TO_EXCEED_MAX_ALLOWED_BID = 11; + */ + const MULTIPLIER_CAUSES_BID_TO_EXCEED_MAX_ALLOWED_BID = 11; + /** + * Multiplier causes bid to become less than the minimum bid allowed + * + * Generated from protobuf enum BID_LESS_THAN_MIN_ALLOWED_BID_WITH_MULTIPLIER = 12; + */ + const BID_LESS_THAN_MIN_ALLOWED_BID_WITH_MULTIPLIER = 12; + /** + * Multiplier type (cpc vs. cpm) needs to match campaign's bidding strategy + * + * Generated from protobuf enum MULTIPLIER_AND_BIDDING_STRATEGY_TYPE_MISMATCH = 13; + */ + const MULTIPLIER_AND_BIDDING_STRATEGY_TYPE_MISMATCH = 13; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/MutateErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/MutateErrorEnum.php new file mode 100644 index 000000000..7b349d5cb --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/MutateErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.MutateErrorEnum + */ +class MutateErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\MutateError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/MutateErrorEnum_MutateError.php b/src/Google/Ads/GoogleAds/V0/Errors/MutateErrorEnum_MutateError.php new file mode 100644 index 000000000..1263a90bc --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/MutateErrorEnum_MutateError.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Errors\MutateErrorEnum\MutateError + */ +class MutateErrorEnum_MutateError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Requested resource was not found. + * + * Generated from protobuf enum RESOURCE_NOT_FOUND = 3; + */ + const RESOURCE_NOT_FOUND = 3; + /** + * Cannot mutate the same resource twice in one request. + * + * Generated from protobuf enum ID_EXISTS_IN_MULTIPLE_MUTATES = 7; + */ + const ID_EXISTS_IN_MULTIPLE_MUTATES = 7; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/NewResourceCreationErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/NewResourceCreationErrorEnum.php new file mode 100644 index 000000000..fcaafd13c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/NewResourceCreationErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.NewResourceCreationErrorEnum + */ +class NewResourceCreationErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\NewResourceCreationError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/NewResourceCreationErrorEnum_NewResourceCreationError.php b/src/Google/Ads/GoogleAds/V0/Errors/NewResourceCreationErrorEnum_NewResourceCreationError.php new file mode 100644 index 000000000..929027311 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/NewResourceCreationErrorEnum_NewResourceCreationError.php @@ -0,0 +1,46 @@ +Google\Ads\Googleads\V0\Errors\NewResourceCreationErrorEnum\NewResourceCreationError + */ +class NewResourceCreationErrorEnum_NewResourceCreationError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Do not set the id field while creating new entities. + * + * Generated from protobuf enum CANNOT_SET_ID_FOR_ADD = 2; + */ + const CANNOT_SET_ID_FOR_ADD = 2; + /** + * Creating more than one resource with the same temp ID is not allowed. + * + * Generated from protobuf enum DUPLICATE_TEMP_IDS = 3; + */ + const DUPLICATE_TEMP_IDS = 3; + /** + * Parent object with specified temp id failed validation, so no deep + * validation will be done for this child resource. + * + * Generated from protobuf enum TEMP_ID_RESOURCE_HAD_ERRORS = 4; + */ + const TEMP_ID_RESOURCE_HAD_ERRORS = 4; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/NotEmptyErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/NotEmptyErrorEnum.php new file mode 100644 index 000000000..9a708aea7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/NotEmptyErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.NotEmptyErrorEnum + */ +class NotEmptyErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\NotEmptyError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/NotEmptyErrorEnum_NotEmptyError.php b/src/Google/Ads/GoogleAds/V0/Errors/NotEmptyErrorEnum_NotEmptyError.php new file mode 100644 index 000000000..243313189 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/NotEmptyErrorEnum_NotEmptyError.php @@ -0,0 +1,33 @@ +Google\Ads\Googleads\V0\Errors\NotEmptyErrorEnum\NotEmptyError + */ +class NotEmptyErrorEnum_NotEmptyError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Empty list. + * + * Generated from protobuf enum EMPTY_LIST = 2; + */ + const EMPTY_LIST = 2; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/NullErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/NullErrorEnum.php new file mode 100644 index 000000000..428ae238e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/NullErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.NullErrorEnum + */ +class NullErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\NullError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/NullErrorEnum_NullError.php b/src/Google/Ads/GoogleAds/V0/Errors/NullErrorEnum_NullError.php new file mode 100644 index 000000000..825a207fb --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/NullErrorEnum_NullError.php @@ -0,0 +1,33 @@ +Google\Ads\Googleads\V0\Errors\NullErrorEnum\NullError + */ +class NullErrorEnum_NullError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Specified list/container must not contain any null elements + * + * Generated from protobuf enum NULL_CONTENT = 2; + */ + const NULL_CONTENT = 2; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/OperationAccessDeniedErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/OperationAccessDeniedErrorEnum.php new file mode 100644 index 000000000..071ab2bf7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/OperationAccessDeniedErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.OperationAccessDeniedErrorEnum + */ +class OperationAccessDeniedErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\OperationAccessDeniedError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/OperationAccessDeniedErrorEnum_OperationAccessDeniedError.php b/src/Google/Ads/GoogleAds/V0/Errors/OperationAccessDeniedErrorEnum_OperationAccessDeniedError.php new file mode 100644 index 000000000..55c785093 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/OperationAccessDeniedErrorEnum_OperationAccessDeniedError.php @@ -0,0 +1,81 @@ +Google\Ads\Googleads\V0\Errors\OperationAccessDeniedErrorEnum\OperationAccessDeniedError + */ +class OperationAccessDeniedErrorEnum_OperationAccessDeniedError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Unauthorized invocation of a service's method (get, mutate, etc.) + * + * Generated from protobuf enum ACTION_NOT_PERMITTED = 2; + */ + const ACTION_NOT_PERMITTED = 2; + /** + * Unauthorized CREATE operation in invoking a service's mutate method. + * + * Generated from protobuf enum CREATE_OPERATION_NOT_PERMITTED = 3; + */ + const CREATE_OPERATION_NOT_PERMITTED = 3; + /** + * Unauthorized REMOVE operation in invoking a service's mutate method. + * + * Generated from protobuf enum REMOVE_OPERATION_NOT_PERMITTED = 4; + */ + const REMOVE_OPERATION_NOT_PERMITTED = 4; + /** + * Unauthorized UPDATE operation in invoking a service's mutate method. + * + * Generated from protobuf enum UPDATE_OPERATION_NOT_PERMITTED = 5; + */ + const UPDATE_OPERATION_NOT_PERMITTED = 5; + /** + * A mutate action is not allowed on this campaign, from this client. + * + * Generated from protobuf enum MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT = 6; + */ + const MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT = 6; + /** + * This operation is not permitted on this campaign type + * + * Generated from protobuf enum OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE = 7; + */ + const OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE = 7; + /** + * A CREATE operation may not set status to REMOVED. + * + * Generated from protobuf enum CREATE_AS_REMOVED_NOT_PERMITTED = 8; + */ + const CREATE_AS_REMOVED_NOT_PERMITTED = 8; + /** + * This operation is not allowed because the campaign or adgroup is removed. + * + * Generated from protobuf enum OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE = 9; + */ + const OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE = 9; + /** + * This operation is not permitted on this ad group type. + * + * Generated from protobuf enum OPERATION_NOT_PERMITTED_FOR_AD_GROUP_TYPE = 10; + */ + const OPERATION_NOT_PERMITTED_FOR_AD_GROUP_TYPE = 10; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/OperatorErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/OperatorErrorEnum.php new file mode 100644 index 000000000..305892155 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/OperatorErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.OperatorErrorEnum + */ +class OperatorErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\OperatorError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/OperatorErrorEnum_OperatorError.php b/src/Google/Ads/GoogleAds/V0/Errors/OperatorErrorEnum_OperatorError.php new file mode 100644 index 000000000..fb3789f5f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/OperatorErrorEnum_OperatorError.php @@ -0,0 +1,33 @@ +Google\Ads\Googleads\V0\Errors\OperatorErrorEnum\OperatorError + */ +class OperatorErrorEnum_OperatorError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Operator not supported. + * + * Generated from protobuf enum OPERATOR_NOT_SUPPORTED = 2; + */ + const OPERATOR_NOT_SUPPORTED = 2; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/PolicyViolationDetails.php b/src/Google/Ads/GoogleAds/V0/Errors/PolicyViolationDetails.php new file mode 100644 index 000000000..428af20d5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/PolicyViolationDetails.php @@ -0,0 +1,158 @@ +google.ads.googleads.v0.errors.PolicyViolationDetails + */ +class PolicyViolationDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Human readable description of policy violation. + * + * Generated from protobuf field string external_policy_description = 2; + */ + private $external_policy_description = ''; + /** + * Unique identifier for this violation. + * If policy is exemptible, this key may be used to request exemption. + * + * Generated from protobuf field .google.ads.googleads.v0.common.PolicyViolationKey key = 4; + */ + private $key = null; + /** + * Human readable name of the policy. + * + * Generated from protobuf field string external_policy_name = 5; + */ + private $external_policy_name = ''; + /** + * Whether user can file an exemption request for this violation. + * + * Generated from protobuf field bool is_exemptible = 6; + */ + private $is_exemptible = false; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\Errors::initOnce(); + parent::__construct(); + } + + /** + * Human readable description of policy violation. + * + * Generated from protobuf field string external_policy_description = 2; + * @return string + */ + public function getExternalPolicyDescription() + { + return $this->external_policy_description; + } + + /** + * Human readable description of policy violation. + * + * Generated from protobuf field string external_policy_description = 2; + * @param string $var + * @return $this + */ + public function setExternalPolicyDescription($var) + { + GPBUtil::checkString($var, True); + $this->external_policy_description = $var; + + return $this; + } + + /** + * Unique identifier for this violation. + * If policy is exemptible, this key may be used to request exemption. + * + * Generated from protobuf field .google.ads.googleads.v0.common.PolicyViolationKey key = 4; + * @return \Google\Ads\GoogleAds\V0\Common\PolicyViolationKey + */ + public function getKey() + { + return $this->key; + } + + /** + * Unique identifier for this violation. + * If policy is exemptible, this key may be used to request exemption. + * + * Generated from protobuf field .google.ads.googleads.v0.common.PolicyViolationKey key = 4; + * @param \Google\Ads\GoogleAds\V0\Common\PolicyViolationKey $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\PolicyViolationKey::class); + $this->key = $var; + + return $this; + } + + /** + * Human readable name of the policy. + * + * Generated from protobuf field string external_policy_name = 5; + * @return string + */ + public function getExternalPolicyName() + { + return $this->external_policy_name; + } + + /** + * Human readable name of the policy. + * + * Generated from protobuf field string external_policy_name = 5; + * @param string $var + * @return $this + */ + public function setExternalPolicyName($var) + { + GPBUtil::checkString($var, True); + $this->external_policy_name = $var; + + return $this; + } + + /** + * Whether user can file an exemption request for this violation. + * + * Generated from protobuf field bool is_exemptible = 6; + * @return bool + */ + public function getIsExemptible() + { + return $this->is_exemptible; + } + + /** + * Whether user can file an exemption request for this violation. + * + * Generated from protobuf field bool is_exemptible = 6; + * @param bool $var + * @return $this + */ + public function setIsExemptible($var) + { + GPBUtil::checkBool($var); + $this->is_exemptible = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/QueryErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/QueryErrorEnum.php new file mode 100644 index 000000000..e98e9aa8c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/QueryErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.QueryErrorEnum + */ +class QueryErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\QueryError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/QueryErrorEnum_QueryError.php b/src/Google/Ads/GoogleAds/V0/Errors/QueryErrorEnum_QueryError.php new file mode 100644 index 000000000..08daf68a5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/QueryErrorEnum_QueryError.php @@ -0,0 +1,326 @@ +Google\Ads\Googleads\V0\Errors\QueryErrorEnum\QueryError + */ +class QueryErrorEnum_QueryError +{ + /** + * Name unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Returned if all other query error reasons are not applicable. + * + * Generated from protobuf enum QUERY_ERROR = 50; + */ + const QUERY_ERROR = 50; + /** + * A condition used in the query references an invalid enum constant. + * + * Generated from protobuf enum BAD_ENUM_CONSTANT = 18; + */ + const BAD_ENUM_CONSTANT = 18; + /** + * Query contains an invalid escape sequence. + * + * Generated from protobuf enum BAD_ESCAPE_SEQUENCE = 7; + */ + const BAD_ESCAPE_SEQUENCE = 7; + /** + * Field name is invalid. + * + * Generated from protobuf enum BAD_FIELD_NAME = 12; + */ + const BAD_FIELD_NAME = 12; + /** + * Limit value is invalid (i.e. not a number) + * + * Generated from protobuf enum BAD_LIMIT_VALUE = 15; + */ + const BAD_LIMIT_VALUE = 15; + /** + * Encountered number can not be parsed. + * + * Generated from protobuf enum BAD_NUMBER = 5; + */ + const BAD_NUMBER = 5; + /** + * Invalid operator encountered. + * + * Generated from protobuf enum BAD_OPERATOR = 3; + */ + const BAD_OPERATOR = 3; + /** + * Invalid resource type was specified in the FROM clause. + * + * Generated from protobuf enum BAD_RESOURCE_TYPE_IN_FROM_CLAUSE = 45; + */ + const BAD_RESOURCE_TYPE_IN_FROM_CLAUSE = 45; + /** + * Non-ASCII symbol encountered outside of strings. + * + * Generated from protobuf enum BAD_SYMBOL = 2; + */ + const BAD_SYMBOL = 2; + /** + * Value is invalid. + * + * Generated from protobuf enum BAD_VALUE = 4; + */ + const BAD_VALUE = 4; + /** + * Date filters fail to restrict date to a range smaller than 31 days. + * Applicable if the query is segmented by date. + * + * Generated from protobuf enum DATE_RANGE_TOO_WIDE = 36; + */ + const DATE_RANGE_TOO_WIDE = 36; + /** + * Expected AND between values with BETWEEN operator. + * + * Generated from protobuf enum EXPECTED_AND = 30; + */ + const EXPECTED_AND = 30; + /** + * Expecting ORDER BY to have BY. + * + * Generated from protobuf enum EXPECTED_BY = 14; + */ + const EXPECTED_BY = 14; + /** + * There was no dimension field selected. + * + * Generated from protobuf enum EXPECTED_DIMENSION_FIELD_IN_SELECT_CLAUSE = 37; + */ + const EXPECTED_DIMENSION_FIELD_IN_SELECT_CLAUSE = 37; + /** + * Missing filters on date related fields. + * + * Generated from protobuf enum EXPECTED_FILTERS_ON_DATE_RANGE = 55; + */ + const EXPECTED_FILTERS_ON_DATE_RANGE = 55; + /** + * Missing FROM clause. + * + * Generated from protobuf enum EXPECTED_FROM = 44; + */ + const EXPECTED_FROM = 44; + /** + * The operator used in the conditions requires the value to be a list. + * + * Generated from protobuf enum EXPECTED_LIST = 41; + */ + const EXPECTED_LIST = 41; + /** + * Fields used in WHERE or ORDER BY clauses are missing from the SELECT + * clause. + * + * Generated from protobuf enum EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE = 16; + */ + const EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE = 16; + /** + * SELECT is missing at the beginning of query. + * + * Generated from protobuf enum EXPECTED_SELECT = 13; + */ + const EXPECTED_SELECT = 13; + /** + * A list was passed as a value to a condition whose operator expects a + * single value. + * + * Generated from protobuf enum EXPECTED_SINGLE_VALUE = 42; + */ + const EXPECTED_SINGLE_VALUE = 42; + /** + * Missing one or both values with BETWEEN operator. + * + * Generated from protobuf enum EXPECTED_VALUE_WITH_BETWEEN_OPERATOR = 29; + */ + const EXPECTED_VALUE_WITH_BETWEEN_OPERATOR = 29; + /** + * Invalid date format. Expected 'YYYY-MM-DD'. + * + * Generated from protobuf enum INVALID_DATE_FORMAT = 38; + */ + const INVALID_DATE_FORMAT = 38; + /** + * Value passed was not a string when it should have been. I.e., it was a + * number or unquoted literal. + * + * Generated from protobuf enum INVALID_STRING_VALUE = 57; + */ + const INVALID_STRING_VALUE = 57; + /** + * A String value passed to the BETWEEN operator does not parse as a date. + * + * Generated from protobuf enum INVALID_VALUE_WITH_BETWEEN_OPERATOR = 26; + */ + const INVALID_VALUE_WITH_BETWEEN_OPERATOR = 26; + /** + * The value passed to the DURING operator is not a Date range literal + * + * Generated from protobuf enum INVALID_VALUE_WITH_DURING_OPERATOR = 22; + */ + const INVALID_VALUE_WITH_DURING_OPERATOR = 22; + /** + * A non-string value was passed to the LIKE operator. + * + * Generated from protobuf enum INVALID_VALUE_WITH_LIKE_OPERATOR = 56; + */ + const INVALID_VALUE_WITH_LIKE_OPERATOR = 56; + /** + * An operator was provided that is inapplicable to the field being + * filtered. + * + * Generated from protobuf enum OPERATOR_FIELD_MISMATCH = 35; + */ + const OPERATOR_FIELD_MISMATCH = 35; + /** + * A Condition was found with an empty list. + * + * Generated from protobuf enum PROHIBITED_EMPTY_LIST_IN_CONDITION = 28; + */ + const PROHIBITED_EMPTY_LIST_IN_CONDITION = 28; + /** + * A condition used in the query references an unsupported enum constant. + * + * Generated from protobuf enum PROHIBITED_ENUM_CONSTANT = 54; + */ + const PROHIBITED_ENUM_CONSTANT = 54; + /** + * Fields that are not allowed to be selected together were included in + * the SELECT clause. + * + * Generated from protobuf enum PROHIBITED_FIELD_COMBINATION_IN_SELECT_CLAUSE = 31; + */ + const PROHIBITED_FIELD_COMBINATION_IN_SELECT_CLAUSE = 31; + /** + * A field that is not orderable was included in the ORDER BY clause. + * + * Generated from protobuf enum PROHIBITED_FIELD_IN_ORDER_BY_CLAUSE = 40; + */ + const PROHIBITED_FIELD_IN_ORDER_BY_CLAUSE = 40; + /** + * A field that is not selectable was included in the SELECT clause. + * + * Generated from protobuf enum PROHIBITED_FIELD_IN_SELECT_CLAUSE = 23; + */ + const PROHIBITED_FIELD_IN_SELECT_CLAUSE = 23; + /** + * A field that is not filterable was included in the WHERE clause. + * + * Generated from protobuf enum PROHIBITED_FIELD_IN_WHERE_CLAUSE = 24; + */ + const PROHIBITED_FIELD_IN_WHERE_CLAUSE = 24; + /** + * Resource type specified in the FROM clause is not supported by this + * service. + * + * Generated from protobuf enum PROHIBITED_RESOURCE_TYPE_IN_FROM_CLAUSE = 43; + */ + const PROHIBITED_RESOURCE_TYPE_IN_FROM_CLAUSE = 43; + /** + * A field that comes from an incompatible resource was included in the + * SELECT clause. + * + * Generated from protobuf enum PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE = 48; + */ + const PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE = 48; + /** + * A metric incompatible with the main resource or other selected + * segmenting resources was included in the SELECT or WHERE clause. + * + * Generated from protobuf enum PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 49; + */ + const PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 49; + /** + * A segment incompatible with the main resource or other selected + * segmenting resources was included in the SELECT or WHERE clause. + * + * Generated from protobuf enum PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE = 51; + */ + const PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE = 51; + /** + * A segment in the SELECT clause is incompatible with a metric in the + * SELECT or WHERE clause. + * + * Generated from protobuf enum PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 53; + */ + const PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE = 53; + /** + * The value passed to the limit clause is too low. + * + * Generated from protobuf enum LIMIT_VALUE_TOO_LOW = 25; + */ + const LIMIT_VALUE_TOO_LOW = 25; + /** + * Query has a string containing a newline character. + * + * Generated from protobuf enum PROHIBITED_NEWLINE_IN_STRING = 8; + */ + const PROHIBITED_NEWLINE_IN_STRING = 8; + /** + * List contains values of different types. + * + * Generated from protobuf enum PROHIBITED_VALUE_COMBINATION_IN_LIST = 10; + */ + const PROHIBITED_VALUE_COMBINATION_IN_LIST = 10; + /** + * The values passed to the BETWEEN operator are not of the same type. + * + * Generated from protobuf enum PROHIBITED_VALUE_COMBINATION_WITH_BETWEEN_OPERATOR = 21; + */ + const PROHIBITED_VALUE_COMBINATION_WITH_BETWEEN_OPERATOR = 21; + /** + * Query contains unterminated string. + * + * Generated from protobuf enum STRING_NOT_TERMINATED = 6; + */ + const STRING_NOT_TERMINATED = 6; + /** + * Too many segments are specified in SELECT clause. + * + * Generated from protobuf enum TOO_MANY_SEGMENTS = 34; + */ + const TOO_MANY_SEGMENTS = 34; + /** + * Query is incomplete and cannot be parsed. + * + * Generated from protobuf enum UNEXPECTED_END_OF_QUERY = 9; + */ + const UNEXPECTED_END_OF_QUERY = 9; + /** + * FROM clause cannot be specified in this query. + * + * Generated from protobuf enum UNEXPECTED_FROM_CLAUSE = 47; + */ + const UNEXPECTED_FROM_CLAUSE = 47; + /** + * Query contains one or more unrecognized fields. + * + * Generated from protobuf enum UNRECOGNIZED_FIELD = 32; + */ + const UNRECOGNIZED_FIELD = 32; + /** + * Query has an unexpected extra part. + * + * Generated from protobuf enum UNEXPECTED_INPUT = 11; + */ + const UNEXPECTED_INPUT = 11; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/QuotaErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/QuotaErrorEnum.php new file mode 100644 index 000000000..d2f889d72 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/QuotaErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.QuotaErrorEnum + */ +class QuotaErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\QuotaError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/QuotaErrorEnum_QuotaError.php b/src/Google/Ads/GoogleAds/V0/Errors/QuotaErrorEnum_QuotaError.php new file mode 100644 index 000000000..433b2fa55 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/QuotaErrorEnum_QuotaError.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Errors\QuotaErrorEnum\QuotaError + */ +class QuotaErrorEnum_QuotaError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Too many requests. + * + * Generated from protobuf enum RESOURCE_EXHAUSTED = 2; + */ + const RESOURCE_EXHAUSTED = 2; + /** + * Access is prohibited. + * + * Generated from protobuf enum ACCESS_PROHIBITED = 3; + */ + const ACCESS_PROHIBITED = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/RangeErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/RangeErrorEnum.php new file mode 100644 index 000000000..fc404ddb8 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/RangeErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.RangeErrorEnum + */ +class RangeErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\RangeError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/RangeErrorEnum_RangeError.php b/src/Google/Ads/GoogleAds/V0/Errors/RangeErrorEnum_RangeError.php new file mode 100644 index 000000000..781bcee40 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/RangeErrorEnum_RangeError.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Errors\RangeErrorEnum\RangeError + */ +class RangeErrorEnum_RangeError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Too low. + * + * Generated from protobuf enum TOO_LOW = 2; + */ + const TOO_LOW = 2; + /** + * Too high. + * + * Generated from protobuf enum TOO_HIGH = 3; + */ + const TOO_HIGH = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/RecommendationErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/RecommendationErrorEnum.php new file mode 100644 index 000000000..c678e6143 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/RecommendationErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.RecommendationErrorEnum + */ +class RecommendationErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\RecommendationError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/RecommendationErrorEnum_RecommendationError.php b/src/Google/Ads/GoogleAds/V0/Errors/RecommendationErrorEnum_RecommendationError.php new file mode 100644 index 000000000..209680896 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/RecommendationErrorEnum_RecommendationError.php @@ -0,0 +1,66 @@ +Google\Ads\Googleads\V0\Errors\RecommendationErrorEnum\RecommendationError + */ +class RecommendationErrorEnum_RecommendationError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The specified budget amount is too low e.g. lower than minimum currency + * unit or lower than ad group minimum cost-per-click. + * + * Generated from protobuf enum BUDGET_AMOUNT_TOO_SMALL = 2; + */ + const BUDGET_AMOUNT_TOO_SMALL = 2; + /** + * The specified budget amount is too large. + * + * Generated from protobuf enum BUDGET_AMOUNT_TOO_LARGE = 3; + */ + const BUDGET_AMOUNT_TOO_LARGE = 3; + /** + * The specified budget amount is not a valid amount. e.g. not a multiple + * of minimum currency unit. + * + * Generated from protobuf enum INVALID_BUDGET_AMOUNT = 4; + */ + const INVALID_BUDGET_AMOUNT = 4; + /** + * The specified keyword or ad violates ad policy. + * + * Generated from protobuf enum POLICY_ERROR = 5; + */ + const POLICY_ERROR = 5; + /** + * The specified bid amount is not valid. e.g. too many fractional digits, + * or negative amount. + * + * Generated from protobuf enum INVALID_BID_AMOUNT = 6; + */ + const INVALID_BID_AMOUNT = 6; + /** + * The number of keywords in ad group have reached the maximum allowed. + * + * Generated from protobuf enum ADGROUP_KEYWORD_LIMIT = 7; + */ + const ADGROUP_KEYWORD_LIMIT = 7; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/RegionCodeErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/RegionCodeErrorEnum.php new file mode 100644 index 000000000..aa4fe9b89 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/RegionCodeErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.RegionCodeErrorEnum + */ +class RegionCodeErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\RegionCodeError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/RegionCodeErrorEnum_RegionCodeError.php b/src/Google/Ads/GoogleAds/V0/Errors/RegionCodeErrorEnum_RegionCodeError.php new file mode 100644 index 000000000..cc58dcc3a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/RegionCodeErrorEnum_RegionCodeError.php @@ -0,0 +1,33 @@ +Google\Ads\Googleads\V0\Errors\RegionCodeErrorEnum\RegionCodeError + */ +class RegionCodeErrorEnum_RegionCodeError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Invalid region code. + * + * Generated from protobuf enum INVALID_REGION_CODE = 2; + */ + const INVALID_REGION_CODE = 2; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/RequestErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/RequestErrorEnum.php new file mode 100644 index 000000000..fd4bb49ea --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/RequestErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.RequestErrorEnum + */ +class RequestErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\RequestError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/RequestErrorEnum_RequestError.php b/src/Google/Ads/GoogleAds/V0/Errors/RequestErrorEnum_RequestError.php new file mode 100644 index 000000000..d6113c935 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/RequestErrorEnum_RequestError.php @@ -0,0 +1,120 @@ +Google\Ads\Googleads\V0\Errors\RequestErrorEnum\RequestError + */ +class RequestErrorEnum_RequestError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Resource name is required for this request. + * + * Generated from protobuf enum RESOURCE_NAME_MISSING = 3; + */ + const RESOURCE_NAME_MISSING = 3; + /** + * Resource name provided is malformed. + * + * Generated from protobuf enum RESOURCE_NAME_MALFORMED = 4; + */ + const RESOURCE_NAME_MALFORMED = 4; + /** + * Resource name provided is malformed. + * + * Generated from protobuf enum BAD_RESOURCE_ID = 17; + */ + const BAD_RESOURCE_ID = 17; + /** + * Customer ID is invalid. + * + * Generated from protobuf enum INVALID_CUSTOMER_ID = 16; + */ + const INVALID_CUSTOMER_ID = 16; + /** + * Mutate operation should have either create, update, or remove specified. + * + * Generated from protobuf enum OPERATION_REQUIRED = 5; + */ + const OPERATION_REQUIRED = 5; + /** + * Requested resource not found. + * + * Generated from protobuf enum RESOURCE_NOT_FOUND = 6; + */ + const RESOURCE_NOT_FOUND = 6; + /** + * Next page token specified in user request is invalid. + * + * Generated from protobuf enum INVALID_PAGE_TOKEN = 7; + */ + const INVALID_PAGE_TOKEN = 7; + /** + * Next page token specified in user request has expired. + * + * Generated from protobuf enum EXPIRED_PAGE_TOKEN = 8; + */ + const EXPIRED_PAGE_TOKEN = 8; + /** + * Required field is missing. + * + * Generated from protobuf enum REQUIRED_FIELD_MISSING = 9; + */ + const REQUIRED_FIELD_MISSING = 9; + /** + * The field cannot be modified because it's immutable. It's also possible + * that the field can be modified using 'create' operation but not 'update'. + * + * Generated from protobuf enum IMMUTABLE_FIELD = 11; + */ + const IMMUTABLE_FIELD = 11; + /** + * Received too many entries in request. + * + * Generated from protobuf enum TOO_MANY_MUTATE_OPERATIONS = 13; + */ + const TOO_MANY_MUTATE_OPERATIONS = 13; + /** + * Request cannot be executed by a manager account. + * + * Generated from protobuf enum CANNOT_BE_EXECUTED_BY_MANAGER_ACCOUNT = 14; + */ + const CANNOT_BE_EXECUTED_BY_MANAGER_ACCOUNT = 14; + /** + * Mutate request was attempting to modify a readonly field. + * For instance, Budget fields can be requested for Ad Group, + * but are read-only for adGroups:mutate. + * + * Generated from protobuf enum CANNOT_MODIFY_FOREIGN_FIELD = 15; + */ + const CANNOT_MODIFY_FOREIGN_FIELD = 15; + /** + * Enum value is not permitted. + * + * Generated from protobuf enum INVALID_ENUM_VALUE = 18; + */ + const INVALID_ENUM_VALUE = 18; + /** + * The developer-token parameter is required for all requests. + * + * Generated from protobuf enum DEVELOPER_TOKEN_PARAMETER_MISSING = 19; + */ + const DEVELOPER_TOKEN_PARAMETER_MISSING = 19; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ResourceAccessDeniedErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/ResourceAccessDeniedErrorEnum.php new file mode 100644 index 000000000..afa8a3979 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ResourceAccessDeniedErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.ResourceAccessDeniedErrorEnum + */ +class ResourceAccessDeniedErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\ResourceAccessDeniedError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ResourceAccessDeniedErrorEnum_ResourceAccessDeniedError.php b/src/Google/Ads/GoogleAds/V0/Errors/ResourceAccessDeniedErrorEnum_ResourceAccessDeniedError.php new file mode 100644 index 000000000..29305b787 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ResourceAccessDeniedErrorEnum_ResourceAccessDeniedError.php @@ -0,0 +1,33 @@ +Google\Ads\Googleads\V0\Errors\ResourceAccessDeniedErrorEnum\ResourceAccessDeniedError + */ +class ResourceAccessDeniedErrorEnum_ResourceAccessDeniedError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * User did not have write access. + * + * Generated from protobuf enum WRITE_ACCESS_DENIED = 3; + */ + const WRITE_ACCESS_DENIED = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ResourceCountLimitExceededErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/ResourceCountLimitExceededErrorEnum.php new file mode 100644 index 000000000..93e79ac29 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ResourceCountLimitExceededErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.ResourceCountLimitExceededErrorEnum + */ +class ResourceCountLimitExceededErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\ResourceCountLimitExceededError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/ResourceCountLimitExceededErrorEnum_ResourceCountLimitExceededError.php b/src/Google/Ads/GoogleAds/V0/Errors/ResourceCountLimitExceededErrorEnum_ResourceCountLimitExceededError.php new file mode 100644 index 000000000..ab8a164ef --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/ResourceCountLimitExceededErrorEnum_ResourceCountLimitExceededError.php @@ -0,0 +1,88 @@ +Google\Ads\Googleads\V0\Errors\ResourceCountLimitExceededErrorEnum\ResourceCountLimitExceededError + */ +class ResourceCountLimitExceededErrorEnum_ResourceCountLimitExceededError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Indicates that this request would exceed the number of allowed resources + * for the AdWords account. The exact resource type and limit being checked + * can be inferred from accountLimitType. + * + * Generated from protobuf enum ACCOUNT_LIMIT = 2; + */ + const ACCOUNT_LIMIT = 2; + /** + * Indicates that this request would exceed the number of allowed resources + * in a Campaign. The exact resource type and limit being checked can be + * inferred from accountLimitType, and the numeric id of the + * Campaign involved is given by enclosingId. + * + * Generated from protobuf enum CAMPAIGN_LIMIT = 3; + */ + const CAMPAIGN_LIMIT = 3; + /** + * Indicates that this request would exceed the number of allowed resources + * in an ad group. The exact resource type and limit being checked can be + * inferred from accountLimitType, and the numeric id of the + * ad group involved is given by enclosingId. + * + * Generated from protobuf enum ADGROUP_LIMIT = 4; + */ + const ADGROUP_LIMIT = 4; + /** + * Indicates that this request would exceed the number of allowed resources + * in an ad group ad. The exact resource type and limit being checked can + * be inferred from accountLimitType, and the enclosingId + * contains the ad group id followed by the ad id, separated by a single + * comma (,). + * + * Generated from protobuf enum AD_GROUP_AD_LIMIT = 5; + */ + const AD_GROUP_AD_LIMIT = 5; + /** + * Indicates that this request would exceed the number of allowed resources + * in an ad group criterion. The exact resource type and limit being checked + * can be inferred from accountLimitType, and the + * enclosingId contains the ad group id followed by the + * criterion id, separated by a single comma (,). + * + * Generated from protobuf enum AD_GROUP_CRITERION_LIMIT = 6; + */ + const AD_GROUP_CRITERION_LIMIT = 6; + /** + * Indicates that this request would exceed the number of allowed resources + * in this shared set. The exact resource type and limit being checked can + * be inferred from accountLimitType, and the numeric id of the + * shared set involved is given by enclosingId. + * + * Generated from protobuf enum SHARED_SET_LIMIT = 7; + */ + const SHARED_SET_LIMIT = 7; + /** + * Exceeds a limit related to a matching function. + * + * Generated from protobuf enum MATCHING_FUNCTION_LIMIT = 8; + */ + const MATCHING_FUNCTION_LIMIT = 8; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/SettingErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/SettingErrorEnum.php new file mode 100644 index 000000000..365eb6054 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/SettingErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.SettingErrorEnum + */ +class SettingErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\SettingError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/SettingErrorEnum_SettingError.php b/src/Google/Ads/GoogleAds/V0/Errors/SettingErrorEnum_SettingError.php new file mode 100644 index 000000000..b9a42e9d5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/SettingErrorEnum_SettingError.php @@ -0,0 +1,139 @@ +Google\Ads\Googleads\V0\Errors\SettingErrorEnum\SettingError + */ +class SettingErrorEnum_SettingError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The campaign setting is not available for this AdWords account. + * + * Generated from protobuf enum SETTING_TYPE_IS_NOT_AVAILABLE = 3; + */ + const SETTING_TYPE_IS_NOT_AVAILABLE = 3; + /** + * The setting is not compatible with the campaign. + * + * Generated from protobuf enum SETTING_TYPE_IS_NOT_COMPATIBLE_WITH_CAMPAIGN = 4; + */ + const SETTING_TYPE_IS_NOT_COMPATIBLE_WITH_CAMPAIGN = 4; + /** + * The supplied TargetingSetting contains an invalid CriterionTypeGroup. See + * CriterionTypeGroup documentation for CriterionTypeGroups allowed + * in Campaign or AdGroup TargetingSettings. + * + * Generated from protobuf enum TARGETING_SETTING_CONTAINS_INVALID_CRITERION_TYPE_GROUP = 5; + */ + const TARGETING_SETTING_CONTAINS_INVALID_CRITERION_TYPE_GROUP = 5; + /** + * TargetingSetting must not explicitly + * set any of the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, + * PARENT, INCOME_RANGE) to false (it's okay to not set them at all, in + * which case the system will set them to true automatically). + * + * Generated from protobuf enum TARGETING_SETTING_DEMOGRAPHIC_CRITERION_TYPE_GROUPS_MUST_BE_SET_TO_TARGET_ALL = 6; + */ + const TARGETING_SETTING_DEMOGRAPHIC_CRITERION_TYPE_GROUPS_MUST_BE_SET_TO_TARGET_ALL = 6; + /** + * TargetingSetting cannot change any of + * the Demographic CriterionTypeGroups (AGE_RANGE, GENDER, PARENT, + * INCOME_RANGE) from true to false. + * + * Generated from protobuf enum TARGETING_SETTING_CANNOT_CHANGE_TARGET_ALL_TO_FALSE_FOR_DEMOGRAPHIC_CRITERION_TYPE_GROUP = 7; + */ + const TARGETING_SETTING_CANNOT_CHANGE_TARGET_ALL_TO_FALSE_FOR_DEMOGRAPHIC_CRITERION_TYPE_GROUP = 7; + /** + * At least one feed id should be present. + * + * Generated from protobuf enum DYNAMIC_SEARCH_ADS_SETTING_AT_LEAST_ONE_FEED_ID_MUST_BE_PRESENT = 8; + */ + const DYNAMIC_SEARCH_ADS_SETTING_AT_LEAST_ONE_FEED_ID_MUST_BE_PRESENT = 8; + /** + * The supplied DynamicSearchAdsSetting contains an invalid domain name. + * + * Generated from protobuf enum DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_DOMAIN_NAME = 9; + */ + const DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_DOMAIN_NAME = 9; + /** + * The supplied DynamicSearchAdsSetting contains a subdomain name. + * + * Generated from protobuf enum DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_SUBDOMAIN_NAME = 10; + */ + const DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_SUBDOMAIN_NAME = 10; + /** + * The supplied DynamicSearchAdsSetting contains an invalid language code. + * + * Generated from protobuf enum DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_LANGUAGE_CODE = 11; + */ + const DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_LANGUAGE_CODE = 11; + /** + * TargetingSettings in search campaigns should not have + * CriterionTypeGroup.PLACEMENT set to targetAll. + * + * Generated from protobuf enum TARGET_ALL_IS_NOT_ALLOWED_FOR_PLACEMENT_IN_SEARCH_CAMPAIGN = 12; + */ + const TARGET_ALL_IS_NOT_ALLOWED_FOR_PLACEMENT_IN_SEARCH_CAMPAIGN = 12; + /** + * Duplicate description in universal app setting description field. + * + * Generated from protobuf enum UNIVERSAL_APP_CAMPAIGN_SETTING_DUPLICATE_DESCRIPTION = 13; + */ + const UNIVERSAL_APP_CAMPAIGN_SETTING_DUPLICATE_DESCRIPTION = 13; + /** + * Description line width is too long in universal app setting description + * field. + * + * Generated from protobuf enum UNIVERSAL_APP_CAMPAIGN_SETTING_DESCRIPTION_LINE_WIDTH_TOO_LONG = 14; + */ + const UNIVERSAL_APP_CAMPAIGN_SETTING_DESCRIPTION_LINE_WIDTH_TOO_LONG = 14; + /** + * Universal app setting appId field cannot be modified for COMPLETE + * campaigns. + * + * Generated from protobuf enum UNIVERSAL_APP_CAMPAIGN_SETTING_APP_ID_CANNOT_BE_MODIFIED = 15; + */ + const UNIVERSAL_APP_CAMPAIGN_SETTING_APP_ID_CANNOT_BE_MODIFIED = 15; + /** + * YoutubeVideoMediaIds in universal app setting cannot exceed size limit. + * + * Generated from protobuf enum TOO_MANY_YOUTUBE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 16; + */ + const TOO_MANY_YOUTUBE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 16; + /** + * ImageMediaIds in universal app setting cannot exceed size limit. + * + * Generated from protobuf enum TOO_MANY_IMAGE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 17; + */ + const TOO_MANY_IMAGE_MEDIA_IDS_IN_UNIVERSAL_APP_CAMPAIGN = 17; + /** + * Media is incompatible for universal app campaign. + * + * Generated from protobuf enum MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN = 18; + */ + const MEDIA_INCOMPATIBLE_FOR_UNIVERSAL_APP_CAMPAIGN = 18; + /** + * Too many exclamation marks in universal app campaign ad text ideas. + * + * Generated from protobuf enum TOO_MANY_EXCLAMATION_MARKS = 19; + */ + const TOO_MANY_EXCLAMATION_MARKS = 19; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/StringFormatErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/StringFormatErrorEnum.php new file mode 100644 index 000000000..c3da35b10 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/StringFormatErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.StringFormatErrorEnum + */ +class StringFormatErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\StringFormatError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/StringFormatErrorEnum_StringFormatError.php b/src/Google/Ads/GoogleAds/V0/Errors/StringFormatErrorEnum_StringFormatError.php new file mode 100644 index 000000000..a7a7a1329 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/StringFormatErrorEnum_StringFormatError.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Errors\StringFormatErrorEnum\StringFormatError + */ +class StringFormatErrorEnum_StringFormatError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The input string value contains disallowed characters. + * + * Generated from protobuf enum ILLEGAL_CHARS = 2; + */ + const ILLEGAL_CHARS = 2; + /** + * The input string value is invalid for the associated field. + * + * Generated from protobuf enum INVALID_FORMAT = 3; + */ + const INVALID_FORMAT = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/StringLengthErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/StringLengthErrorEnum.php new file mode 100644 index 000000000..f3d9b1120 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/StringLengthErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.StringLengthErrorEnum + */ +class StringLengthErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\StringLengthError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/StringLengthErrorEnum_StringLengthError.php b/src/Google/Ads/GoogleAds/V0/Errors/StringLengthErrorEnum_StringLengthError.php new file mode 100644 index 000000000..e275327af --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/StringLengthErrorEnum_StringLengthError.php @@ -0,0 +1,39 @@ +Google\Ads\Googleads\V0\Errors\StringLengthErrorEnum\StringLengthError + */ +class StringLengthErrorEnum_StringLengthError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * Too short. + * + * Generated from protobuf enum TOO_SHORT = 2; + */ + const TOO_SHORT = 2; + /** + * Too long. + * + * Generated from protobuf enum TOO_LONG = 3; + */ + const TOO_LONG = 3; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/UrlFieldErrorEnum.php b/src/Google/Ads/GoogleAds/V0/Errors/UrlFieldErrorEnum.php new file mode 100644 index 000000000..0236d32b1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/UrlFieldErrorEnum.php @@ -0,0 +1,25 @@ +google.ads.googleads.v0.errors.UrlFieldErrorEnum + */ +class UrlFieldErrorEnum extends \Google\Protobuf\Internal\Message +{ + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Errors\UrlFieldError::initOnce(); + parent::__construct(); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Errors/UrlFieldErrorEnum_UrlFieldError.php b/src/Google/Ads/GoogleAds/V0/Errors/UrlFieldErrorEnum_UrlFieldError.php new file mode 100644 index 000000000..2ab3171c3 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Errors/UrlFieldErrorEnum_UrlFieldError.php @@ -0,0 +1,304 @@ +Google\Ads\Googleads\V0\Errors\UrlFieldErrorEnum\UrlFieldError + */ +class UrlFieldErrorEnum_UrlFieldError +{ + /** + * Enum unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The received error code is not known in this version. + * + * Generated from protobuf enum UNKNOWN = 1; + */ + const UNKNOWN = 1; + /** + * The tracking url template is invalid. + * + * Generated from protobuf enum INVALID_TRACKING_URL_TEMPLATE = 2; + */ + const INVALID_TRACKING_URL_TEMPLATE = 2; + /** + * The tracking url template contains invalid tag. + * + * Generated from protobuf enum INVALID_TAG_IN_TRACKING_URL_TEMPLATE = 3; + */ + const INVALID_TAG_IN_TRACKING_URL_TEMPLATE = 3; + /** + * The tracking url template must contain at least one tag (e.g. {lpurl}), + * This applies only to tracking url template associated with website ads or + * product ads. + * + * Generated from protobuf enum MISSING_TRACKING_URL_TEMPLATE_TAG = 4; + */ + const MISSING_TRACKING_URL_TEMPLATE_TAG = 4; + /** + * The tracking url template must start with a valid protocol (or lpurl + * tag). + * + * Generated from protobuf enum MISSING_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 5; + */ + const MISSING_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 5; + /** + * The tracking url template starts with an invalid protocol. + * + * Generated from protobuf enum INVALID_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 6; + */ + const INVALID_PROTOCOL_IN_TRACKING_URL_TEMPLATE = 6; + /** + * The tracking url template contains illegal characters. + * + * Generated from protobuf enum MALFORMED_TRACKING_URL_TEMPLATE = 7; + */ + const MALFORMED_TRACKING_URL_TEMPLATE = 7; + /** + * The tracking url template must contain a host name (or lpurl tag). + * + * Generated from protobuf enum MISSING_HOST_IN_TRACKING_URL_TEMPLATE = 8; + */ + const MISSING_HOST_IN_TRACKING_URL_TEMPLATE = 8; + /** + * The tracking url template has an invalid or missing top level domain + * extension. + * + * Generated from protobuf enum INVALID_TLD_IN_TRACKING_URL_TEMPLATE = 9; + */ + const INVALID_TLD_IN_TRACKING_URL_TEMPLATE = 9; + /** + * The tracking url template contains nested occurrences of the same + * conditional tag (i.e. {ifmobile:{ifmobile:x}}). + * + * Generated from protobuf enum REDUNDANT_NESTED_TRACKING_URL_TEMPLATE_TAG = 10; + */ + const REDUNDANT_NESTED_TRACKING_URL_TEMPLATE_TAG = 10; + /** + * The final url is invalid. + * + * Generated from protobuf enum INVALID_FINAL_URL = 11; + */ + const INVALID_FINAL_URL = 11; + /** + * The final url contains invalid tag. + * + * Generated from protobuf enum INVALID_TAG_IN_FINAL_URL = 12; + */ + const INVALID_TAG_IN_FINAL_URL = 12; + /** + * The final url contains nested occurrences of the same conditional tag + * (i.e. {ifmobile:{ifmobile:x}}). + * + * Generated from protobuf enum REDUNDANT_NESTED_FINAL_URL_TAG = 13; + */ + const REDUNDANT_NESTED_FINAL_URL_TAG = 13; + /** + * The final url must start with a valid protocol. + * + * Generated from protobuf enum MISSING_PROTOCOL_IN_FINAL_URL = 14; + */ + const MISSING_PROTOCOL_IN_FINAL_URL = 14; + /** + * The final url starts with an invalid protocol. + * + * Generated from protobuf enum INVALID_PROTOCOL_IN_FINAL_URL = 15; + */ + const INVALID_PROTOCOL_IN_FINAL_URL = 15; + /** + * The final url contains illegal characters. + * + * Generated from protobuf enum MALFORMED_FINAL_URL = 16; + */ + const MALFORMED_FINAL_URL = 16; + /** + * The final url must contain a host name. + * + * Generated from protobuf enum MISSING_HOST_IN_FINAL_URL = 17; + */ + const MISSING_HOST_IN_FINAL_URL = 17; + /** + * The tracking url template has an invalid or missing top level domain + * extension. + * + * Generated from protobuf enum INVALID_TLD_IN_FINAL_URL = 18; + */ + const INVALID_TLD_IN_FINAL_URL = 18; + /** + * The final mobile url is invalid. + * + * Generated from protobuf enum INVALID_FINAL_MOBILE_URL = 19; + */ + const INVALID_FINAL_MOBILE_URL = 19; + /** + * The final mobile url contains invalid tag. + * + * Generated from protobuf enum INVALID_TAG_IN_FINAL_MOBILE_URL = 20; + */ + const INVALID_TAG_IN_FINAL_MOBILE_URL = 20; + /** + * The final mobile url contains nested occurrences of the same conditional + * tag (i.e. {ifmobile:{ifmobile:x}}). + * + * Generated from protobuf enum REDUNDANT_NESTED_FINAL_MOBILE_URL_TAG = 21; + */ + const REDUNDANT_NESTED_FINAL_MOBILE_URL_TAG = 21; + /** + * The final mobile url must start with a valid protocol. + * + * Generated from protobuf enum MISSING_PROTOCOL_IN_FINAL_MOBILE_URL = 22; + */ + const MISSING_PROTOCOL_IN_FINAL_MOBILE_URL = 22; + /** + * The final mobile url starts with an invalid protocol. + * + * Generated from protobuf enum INVALID_PROTOCOL_IN_FINAL_MOBILE_URL = 23; + */ + const INVALID_PROTOCOL_IN_FINAL_MOBILE_URL = 23; + /** + * The final mobile url contains illegal characters. + * + * Generated from protobuf enum MALFORMED_FINAL_MOBILE_URL = 24; + */ + const MALFORMED_FINAL_MOBILE_URL = 24; + /** + * The final mobile url must contain a host name. + * + * Generated from protobuf enum MISSING_HOST_IN_FINAL_MOBILE_URL = 25; + */ + const MISSING_HOST_IN_FINAL_MOBILE_URL = 25; + /** + * The tracking url template has an invalid or missing top level domain + * extension. + * + * Generated from protobuf enum INVALID_TLD_IN_FINAL_MOBILE_URL = 26; + */ + const INVALID_TLD_IN_FINAL_MOBILE_URL = 26; + /** + * The final app url is invalid. + * + * Generated from protobuf enum INVALID_FINAL_APP_URL = 27; + */ + const INVALID_FINAL_APP_URL = 27; + /** + * The final app url contains invalid tag. + * + * Generated from protobuf enum INVALID_TAG_IN_FINAL_APP_URL = 28; + */ + const INVALID_TAG_IN_FINAL_APP_URL = 28; + /** + * The final app url contains nested occurrences of the same conditional tag + * (i.e. {ifmobile:{ifmobile:x}}). + * + * Generated from protobuf enum REDUNDANT_NESTED_FINAL_APP_URL_TAG = 29; + */ + const REDUNDANT_NESTED_FINAL_APP_URL_TAG = 29; + /** + * More than one app url found for the same OS type. + * + * Generated from protobuf enum MULTIPLE_APP_URLS_FOR_OSTYPE = 30; + */ + const MULTIPLE_APP_URLS_FOR_OSTYPE = 30; + /** + * The OS type given for an app url is not valid. + * + * Generated from protobuf enum INVALID_OSTYPE = 31; + */ + const INVALID_OSTYPE = 31; + /** + * The protocol given for an app url is not valid. (E.g. "android-app://") + * + * Generated from protobuf enum INVALID_PROTOCOL_FOR_APP_URL = 32; + */ + const INVALID_PROTOCOL_FOR_APP_URL = 32; + /** + * The package id (app id) given for an app url is not valid. + * + * Generated from protobuf enum INVALID_PACKAGE_ID_FOR_APP_URL = 33; + */ + const INVALID_PACKAGE_ID_FOR_APP_URL = 33; + /** + * The number of url custom parameters for an resource exceeds the maximum + * limit allowed. + * + * Generated from protobuf enum URL_CUSTOM_PARAMETERS_COUNT_EXCEEDS_LIMIT = 34; + */ + const URL_CUSTOM_PARAMETERS_COUNT_EXCEEDS_LIMIT = 34; + /** + * An invalid character appears in the parameter key. + * + * Generated from protobuf enum INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_KEY = 39; + */ + const INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_KEY = 39; + /** + * An invalid character appears in the parameter value. + * + * Generated from protobuf enum INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_VALUE = 40; + */ + const INVALID_CHARACTERS_IN_URL_CUSTOM_PARAMETER_VALUE = 40; + /** + * The url custom parameter value fails url tag validation. + * + * Generated from protobuf enum INVALID_TAG_IN_URL_CUSTOM_PARAMETER_VALUE = 41; + */ + const INVALID_TAG_IN_URL_CUSTOM_PARAMETER_VALUE = 41; + /** + * The custom parameter contains nested occurrences of the same conditional + * tag (i.e. {ifmobile:{ifmobile:x}}). + * + * Generated from protobuf enum REDUNDANT_NESTED_URL_CUSTOM_PARAMETER_TAG = 42; + */ + const REDUNDANT_NESTED_URL_CUSTOM_PARAMETER_TAG = 42; + /** + * The protocol (http:// or https://) is missing. + * + * Generated from protobuf enum MISSING_PROTOCOL = 43; + */ + const MISSING_PROTOCOL = 43; + /** + * The url is invalid. + * + * Generated from protobuf enum INVALID_URL = 44; + */ + const INVALID_URL = 44; + /** + * Destination Url is deprecated. + * + * Generated from protobuf enum DESTINATION_URL_DEPRECATED = 45; + */ + const DESTINATION_URL_DEPRECATED = 45; + /** + * The url contains invalid tag. + * + * Generated from protobuf enum INVALID_TAG_IN_URL = 46; + */ + const INVALID_TAG_IN_URL = 46; + /** + * The url must contain at least one tag (e.g. {lpurl}), This applies only + * to urls associated with website ads or product ads. + * + * Generated from protobuf enum MISSING_URL_TAG = 47; + */ + const MISSING_URL_TAG = 47; + /** + * Duplicate url id. + * + * Generated from protobuf enum DUPLICATE_URL_ID = 48; + */ + const DUPLICATE_URL_ID = 48; + /** + * Invalid url id. + * + * Generated from protobuf enum INVALID_URL_ID = 49; + */ + const INVALID_URL_ID = 49; +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/AdGroup.php b/src/Google/Ads/GoogleAds/V0/Resources/AdGroup.php new file mode 100644 index 000000000..fa94a18c8 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/AdGroup.php @@ -0,0 +1,477 @@ +google.ads.googleads.v0.resources.AdGroup + */ +class AdGroup extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ad group. + * Ad group resource names have the form: + * `customers/{customer_id}/adGroups/{ad_group_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The ID of the ad group. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + */ + private $id = null; + /** + * The name of the ad group. + * This field is required and should not be empty when creating new ad + * groups. + * It must contain fewer than 255 UTF-8 full-width characters. + * It must not contain any null (code point 0x0), NL line feed + * (code point 0xA) or carriage return (code point 0xD) characters. + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + */ + private $name = null; + /** + * The status of the ad group. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupStatusEnum.AdGroupStatus status = 5; + */ + private $status = 0; + /** + * The type of the ad group. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupTypeEnum.AdGroupType type = 12; + */ + private $type = 0; + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 13; + */ + private $tracking_url_template = null; + /** + * The list of mappings used to substitute custom parameter tags in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 6; + */ + private $url_custom_parameters; + /** + * The campaign to which the ad group belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue campaign = 10; + */ + private $campaign = null; + /** + * The maximum CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_micros = 14; + */ + private $cpc_bid_micros = null; + /** + * The maximum CPM (cost-per-thousand viewable impressions) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpm_bid_micros = 15; + */ + private $cpm_bid_micros = null; + /** + * The target cost-per-acquisition (conversion) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpa_bid_micros = 16; + */ + private $cpa_bid_micros = null; + /** + * The CPV (cost-per-view) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpv_bid_micros = 17; + */ + private $cpv_bid_micros = null; + /** + * The target return on ad spend (ROAS) override. If the ad group's campaign + * bidding strategy is a standard Target ROAS strategy, then this field + * overrides the target ROAS specified in the campaign's bidding strategy. + * Otherwise, this value is ignored. + * + * Generated from protobuf field .google.protobuf.DoubleValue target_roas_override = 19; + */ + private $target_roas_override = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\AdGroup::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the ad group. + * Ad group resource names have the form: + * `customers/{customer_id}/adGroups/{ad_group_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the ad group. + * Ad group resource names have the form: + * `customers/{customer_id}/adGroups/{ad_group_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The ID of the ad group. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the ad group. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->id = $var; + + return $this; + } + + /** + * The name of the ad group. + * This field is required and should not be empty when creating new ad + * groups. + * It must contain fewer than 255 UTF-8 full-width characters. + * It must not contain any null (code point 0x0), NL line feed + * (code point 0xA) or carriage return (code point 0xD) characters. + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + * @return \Google\Protobuf\StringValue + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the ad group. + * This field is required and should not be empty when creating new ad + * groups. + * It must contain fewer than 255 UTF-8 full-width characters. + * It must not contain any null (code point 0x0), NL line feed + * (code point 0xA) or carriage return (code point 0xD) characters. + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->name = $var; + + return $this; + } + + /** + * The status of the ad group. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupStatusEnum.AdGroupStatus status = 5; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of the ad group. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupStatusEnum.AdGroupStatus status = 5; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\AdGroupStatusEnum_AdGroupStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The type of the ad group. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupTypeEnum.AdGroupType type = 12; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the ad group. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupTypeEnum.AdGroupType type = 12; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\AdGroupTypeEnum_AdGroupType::class); + $this->type = $var; + + return $this; + } + + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 13; + * @return \Google\Protobuf\StringValue + */ + public function getTrackingUrlTemplate() + { + return $this->tracking_url_template; + } + + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 13; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setTrackingUrlTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->tracking_url_template = $var; + + return $this; + } + + /** + * The list of mappings used to substitute custom parameter tags in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUrlCustomParameters() + { + return $this->url_custom_parameters; + } + + /** + * The list of mappings used to substitute custom parameter tags in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 6; + * @param \Google\Ads\GoogleAds\V0\Common\CustomParameter[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUrlCustomParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Common\CustomParameter::class); + $this->url_custom_parameters = $arr; + + return $this; + } + + /** + * The campaign to which the ad group belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue campaign = 10; + * @return \Google\Protobuf\StringValue + */ + public function getCampaign() + { + return $this->campaign; + } + + /** + * The campaign to which the ad group belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue campaign = 10; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCampaign($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->campaign = $var; + + return $this; + } + + /** + * The maximum CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_micros = 14; + * @return \Google\Protobuf\Int64Value + */ + public function getCpcBidMicros() + { + return $this->cpc_bid_micros; + } + + /** + * The maximum CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_micros = 14; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpcBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpc_bid_micros = $var; + + return $this; + } + + /** + * The maximum CPM (cost-per-thousand viewable impressions) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpm_bid_micros = 15; + * @return \Google\Protobuf\Int64Value + */ + public function getCpmBidMicros() + { + return $this->cpm_bid_micros; + } + + /** + * The maximum CPM (cost-per-thousand viewable impressions) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpm_bid_micros = 15; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpmBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpm_bid_micros = $var; + + return $this; + } + + /** + * The target cost-per-acquisition (conversion) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpa_bid_micros = 16; + * @return \Google\Protobuf\Int64Value + */ + public function getCpaBidMicros() + { + return $this->cpa_bid_micros; + } + + /** + * The target cost-per-acquisition (conversion) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpa_bid_micros = 16; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpaBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpa_bid_micros = $var; + + return $this; + } + + /** + * The CPV (cost-per-view) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpv_bid_micros = 17; + * @return \Google\Protobuf\Int64Value + */ + public function getCpvBidMicros() + { + return $this->cpv_bid_micros; + } + + /** + * The CPV (cost-per-view) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpv_bid_micros = 17; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpvBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpv_bid_micros = $var; + + return $this; + } + + /** + * The target return on ad spend (ROAS) override. If the ad group's campaign + * bidding strategy is a standard Target ROAS strategy, then this field + * overrides the target ROAS specified in the campaign's bidding strategy. + * Otherwise, this value is ignored. + * + * Generated from protobuf field .google.protobuf.DoubleValue target_roas_override = 19; + * @return \Google\Protobuf\DoubleValue + */ + public function getTargetRoasOverride() + { + return $this->target_roas_override; + } + + /** + * The target return on ad spend (ROAS) override. If the ad group's campaign + * bidding strategy is a standard Target ROAS strategy, then this field + * overrides the target ROAS specified in the campaign's bidding strategy. + * Otherwise, this value is ignored. + * + * Generated from protobuf field .google.protobuf.DoubleValue target_roas_override = 19; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setTargetRoasOverride($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->target_roas_override = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/AdGroupAd.php b/src/Google/Ads/GoogleAds/V0/Resources/AdGroupAd.php new file mode 100644 index 000000000..7e6bee4c7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/AdGroupAd.php @@ -0,0 +1,162 @@ +google.ads.googleads.v0.resources.AdGroupAd + */ +class AdGroupAd extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ad. + * Ad group ad resource names have the form: + * `customers/{customer_id}/adGroupAds/{ad_group_id}_{ad_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The status of the ad. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3; + */ + private $status = 0; + /** + * The ad group to which the ad belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 4; + */ + private $ad_group = null; + /** + * The ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Ad ad = 5; + */ + private $ad = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\AdGroupAd::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the ad. + * Ad group ad resource names have the form: + * `customers/{customer_id}/adGroupAds/{ad_group_id}_{ad_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the ad. + * Ad group ad resource names have the form: + * `customers/{customer_id}/adGroupAds/{ad_group_id}_{ad_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The status of the ad. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of the ad. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupAdStatusEnum.AdGroupAdStatus status = 3; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\AdGroupAdStatusEnum_AdGroupAdStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The ad group to which the ad belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 4; + * @return \Google\Protobuf\StringValue + */ + public function getAdGroup() + { + return $this->ad_group; + } + + /** + * The ad group to which the ad belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setAdGroup($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->ad_group = $var; + + return $this; + } + + /** + * The ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Ad ad = 5; + * @return \Google\Ads\GoogleAds\V0\Common\Ad + */ + public function getAd() + { + return $this->ad; + } + + /** + * The ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Ad ad = 5; + * @param \Google\Ads\GoogleAds\V0\Common\Ad $var + * @return $this + */ + public function setAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\Ad::class); + $this->ad = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/AdGroupBidModifier.php b/src/Google/Ads/GoogleAds/V0/Resources/AdGroupBidModifier.php new file mode 100644 index 000000000..3937c488b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/AdGroupBidModifier.php @@ -0,0 +1,278 @@ +google.ads.googleads.v0.resources.AdGroupBidModifier + */ +class AdGroupBidModifier extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ad group bid modifier. + * Ad group bid modifier resource names have the form: + * `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The ad group to which this criterion belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 2; + */ + private $ad_group = null; + /** + * The ID of the criterion to bid modify. + * This field is ignored for mutates. + * + * Generated from protobuf field .google.protobuf.Int64Value criterion_id = 3; + */ + private $criterion_id = null; + /** + * The modifier for the bid when the criterion matches. + * + * Generated from protobuf field .google.protobuf.DoubleValue bid_modifier = 4; + */ + private $bid_modifier = null; + protected $criterion; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the ad group bid modifier. + * Ad group bid modifier resource names have the form: + * `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the ad group bid modifier. + * Ad group bid modifier resource names have the form: + * `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The ad group to which this criterion belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 2; + * @return \Google\Protobuf\StringValue + */ + public function getAdGroup() + { + return $this->ad_group; + } + + /** + * The ad group to which this criterion belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setAdGroup($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->ad_group = $var; + + return $this; + } + + /** + * The ID of the criterion to bid modify. + * This field is ignored for mutates. + * + * Generated from protobuf field .google.protobuf.Int64Value criterion_id = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getCriterionId() + { + return $this->criterion_id; + } + + /** + * The ID of the criterion to bid modify. + * This field is ignored for mutates. + * + * Generated from protobuf field .google.protobuf.Int64Value criterion_id = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCriterionId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->criterion_id = $var; + + return $this; + } + + /** + * The modifier for the bid when the criterion matches. + * + * Generated from protobuf field .google.protobuf.DoubleValue bid_modifier = 4; + * @return \Google\Protobuf\DoubleValue + */ + public function getBidModifier() + { + return $this->bid_modifier; + } + + /** + * The modifier for the bid when the criterion matches. + * + * Generated from protobuf field .google.protobuf.DoubleValue bid_modifier = 4; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setBidModifier($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->bid_modifier = $var; + + return $this; + } + + /** + * Criterion for hotel date selection (default dates vs. user selected). + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelDateSelectionTypeInfo hotel_date_selection_type = 5; + * @return \Google\Ads\GoogleAds\V0\Common\HotelDateSelectionTypeInfo + */ + public function getHotelDateSelectionType() + { + return $this->readOneof(5); + } + + /** + * Criterion for hotel date selection (default dates vs. user selected). + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelDateSelectionTypeInfo hotel_date_selection_type = 5; + * @param \Google\Ads\GoogleAds\V0\Common\HotelDateSelectionTypeInfo $var + * @return $this + */ + public function setHotelDateSelectionType($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\HotelDateSelectionTypeInfo::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Criterion for number of days prior to the stay the booking is being made. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelAdvanceBookingWindowInfo hotel_advance_booking_window = 6; + * @return \Google\Ads\GoogleAds\V0\Common\HotelAdvanceBookingWindowInfo + */ + public function getHotelAdvanceBookingWindow() + { + return $this->readOneof(6); + } + + /** + * Criterion for number of days prior to the stay the booking is being made. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelAdvanceBookingWindowInfo hotel_advance_booking_window = 6; + * @param \Google\Ads\GoogleAds\V0\Common\HotelAdvanceBookingWindowInfo $var + * @return $this + */ + public function setHotelAdvanceBookingWindow($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\HotelAdvanceBookingWindowInfo::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Criterion for length of hotel stay in nights. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelLengthOfStayInfo hotel_length_of_stay = 7; + * @return \Google\Ads\GoogleAds\V0\Common\HotelLengthOfStayInfo + */ + public function getHotelLengthOfStay() + { + return $this->readOneof(7); + } + + /** + * Criterion for length of hotel stay in nights. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelLengthOfStayInfo hotel_length_of_stay = 7; + * @param \Google\Ads\GoogleAds\V0\Common\HotelLengthOfStayInfo $var + * @return $this + */ + public function setHotelLengthOfStay($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\HotelLengthOfStayInfo::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Criterion for day of the week the booking is for. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelCheckInDayInfo hotel_check_in_day = 8; + * @return \Google\Ads\GoogleAds\V0\Common\HotelCheckInDayInfo + */ + public function getHotelCheckInDay() + { + return $this->readOneof(8); + } + + /** + * Criterion for day of the week the booking is for. + * + * Generated from protobuf field .google.ads.googleads.v0.common.HotelCheckInDayInfo hotel_check_in_day = 8; + * @param \Google\Ads\GoogleAds\V0\Common\HotelCheckInDayInfo $var + * @return $this + */ + public function setHotelCheckInDay($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\HotelCheckInDayInfo::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * @return string + */ + public function getCriterion() + { + return $this->whichOneof("criterion"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion.php b/src/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion.php new file mode 100644 index 000000000..0dcd552b4 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion.php @@ -0,0 +1,750 @@ +google.ads.googleads.v0.resources.AdGroupCriterion + */ +class AdGroupCriterion extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ad group criterion. + * Ad group criterion resource names have the form: + * `customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The ID of the criterion. + * This field is ignored for mutates. + * + * Generated from protobuf field .google.protobuf.Int64Value criterion_id = 26; + */ + private $criterion_id = null; + /** + * The status of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupCriterionStatusEnum.AdGroupCriterionStatus status = 3; + */ + private $status = 0; + /** + * Information regarding the quality of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion.QualityInfo quality_info = 4; + */ + private $quality_info = null; + /** + * The ad group to which the criterion belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 5; + */ + private $ad_group = null; + /** + * The type of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType type = 25; + */ + private $type = 0; + /** + * Whether to target (`false`) or exclude (`true`) the criterion. + * This field is immutable. To switch a criterion from positive to negative, + * remove then re-add it. + * + * Generated from protobuf field .google.protobuf.BoolValue negative = 31; + */ + private $negative = null; + /** + * The CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_micros = 16; + */ + private $cpc_bid_micros = null; + /** + * The CPM (cost-per-thousand viewable impressions) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpm_bid_micros = 17; + */ + private $cpm_bid_micros = null; + /** + * The CPV (cost-per-view) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpv_bid_micros = 24; + */ + private $cpv_bid_micros = null; + /** + * The effective CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value effective_cpc_bid_micros = 18; + */ + private $effective_cpc_bid_micros = null; + /** + * The effective CPM (cost-per-thousand viewable impressions) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value effective_cpm_bid_micros = 19; + */ + private $effective_cpm_bid_micros = null; + /** + * The effective CPV (cost-per-view) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value effective_cpv_bid_micros = 20; + */ + private $effective_cpv_bid_micros = null; + /** + * Source of the effective CPC bid. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource effective_cpc_bid_source = 21; + */ + private $effective_cpc_bid_source = 0; + /** + * Source of the effective CPM bid. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource effective_cpm_bid_source = 22; + */ + private $effective_cpm_bid_source = 0; + /** + * Source of the effective CPV bid. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource effective_cpv_bid_source = 23; + */ + private $effective_cpv_bid_source = 0; + /** + * Estimates for criterion bids at various positions. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion.PositionEstimates position_estimates = 10; + */ + private $position_estimates = null; + /** + * The list of possible final URLs after all cross-domain redirects for the + * ad. + * + * Generated from protobuf field repeated .google.protobuf.StringValue final_urls = 11; + */ + private $final_urls; + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 13; + */ + private $tracking_url_template = null; + /** + * The list of mappings used to substitute custom parameter tags in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 14; + */ + private $url_custom_parameters; + protected $criterion; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the ad group criterion. + * Ad group criterion resource names have the form: + * `customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the ad group criterion. + * Ad group criterion resource names have the form: + * `customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The ID of the criterion. + * This field is ignored for mutates. + * + * Generated from protobuf field .google.protobuf.Int64Value criterion_id = 26; + * @return \Google\Protobuf\Int64Value + */ + public function getCriterionId() + { + return $this->criterion_id; + } + + /** + * The ID of the criterion. + * This field is ignored for mutates. + * + * Generated from protobuf field .google.protobuf.Int64Value criterion_id = 26; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCriterionId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->criterion_id = $var; + + return $this; + } + + /** + * The status of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupCriterionStatusEnum.AdGroupCriterionStatus status = 3; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdGroupCriterionStatusEnum.AdGroupCriterionStatus status = 3; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\AdGroupCriterionStatusEnum_AdGroupCriterionStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Information regarding the quality of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion.QualityInfo quality_info = 4; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion_QualityInfo + */ + public function getQualityInfo() + { + return $this->quality_info; + } + + /** + * Information regarding the quality of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion.QualityInfo quality_info = 4; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion_QualityInfo $var + * @return $this + */ + public function setQualityInfo($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion_QualityInfo::class); + $this->quality_info = $var; + + return $this; + } + + /** + * The ad group to which the criterion belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 5; + * @return \Google\Protobuf\StringValue + */ + public function getAdGroup() + { + return $this->ad_group; + } + + /** + * The ad group to which the criterion belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 5; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setAdGroup($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->ad_group = $var; + + return $this; + } + + /** + * The type of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType type = 25; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType type = 25; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\CriterionTypeEnum_CriterionType::class); + $this->type = $var; + + return $this; + } + + /** + * Whether to target (`false`) or exclude (`true`) the criterion. + * This field is immutable. To switch a criterion from positive to negative, + * remove then re-add it. + * + * Generated from protobuf field .google.protobuf.BoolValue negative = 31; + * @return \Google\Protobuf\BoolValue + */ + public function getNegative() + { + return $this->negative; + } + + /** + * Whether to target (`false`) or exclude (`true`) the criterion. + * This field is immutable. To switch a criterion from positive to negative, + * remove then re-add it. + * + * Generated from protobuf field .google.protobuf.BoolValue negative = 31; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setNegative($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->negative = $var; + + return $this; + } + + /** + * The CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_micros = 16; + * @return \Google\Protobuf\Int64Value + */ + public function getCpcBidMicros() + { + return $this->cpc_bid_micros; + } + + /** + * The CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_micros = 16; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpcBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpc_bid_micros = $var; + + return $this; + } + + /** + * The CPM (cost-per-thousand viewable impressions) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpm_bid_micros = 17; + * @return \Google\Protobuf\Int64Value + */ + public function getCpmBidMicros() + { + return $this->cpm_bid_micros; + } + + /** + * The CPM (cost-per-thousand viewable impressions) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpm_bid_micros = 17; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpmBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpm_bid_micros = $var; + + return $this; + } + + /** + * The CPV (cost-per-view) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpv_bid_micros = 24; + * @return \Google\Protobuf\Int64Value + */ + public function getCpvBidMicros() + { + return $this->cpv_bid_micros; + } + + /** + * The CPV (cost-per-view) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value cpv_bid_micros = 24; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpvBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpv_bid_micros = $var; + + return $this; + } + + /** + * The effective CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value effective_cpc_bid_micros = 18; + * @return \Google\Protobuf\Int64Value + */ + public function getEffectiveCpcBidMicros() + { + return $this->effective_cpc_bid_micros; + } + + /** + * The effective CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value effective_cpc_bid_micros = 18; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setEffectiveCpcBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->effective_cpc_bid_micros = $var; + + return $this; + } + + /** + * The effective CPM (cost-per-thousand viewable impressions) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value effective_cpm_bid_micros = 19; + * @return \Google\Protobuf\Int64Value + */ + public function getEffectiveCpmBidMicros() + { + return $this->effective_cpm_bid_micros; + } + + /** + * The effective CPM (cost-per-thousand viewable impressions) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value effective_cpm_bid_micros = 19; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setEffectiveCpmBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->effective_cpm_bid_micros = $var; + + return $this; + } + + /** + * The effective CPV (cost-per-view) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value effective_cpv_bid_micros = 20; + * @return \Google\Protobuf\Int64Value + */ + public function getEffectiveCpvBidMicros() + { + return $this->effective_cpv_bid_micros; + } + + /** + * The effective CPV (cost-per-view) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value effective_cpv_bid_micros = 20; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setEffectiveCpvBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->effective_cpv_bid_micros = $var; + + return $this; + } + + /** + * Source of the effective CPC bid. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource effective_cpc_bid_source = 21; + * @return int + */ + public function getEffectiveCpcBidSource() + { + return $this->effective_cpc_bid_source; + } + + /** + * Source of the effective CPC bid. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource effective_cpc_bid_source = 21; + * @param int $var + * @return $this + */ + public function setEffectiveCpcBidSource($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\BiddingSourceEnum_BiddingSource::class); + $this->effective_cpc_bid_source = $var; + + return $this; + } + + /** + * Source of the effective CPM bid. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource effective_cpm_bid_source = 22; + * @return int + */ + public function getEffectiveCpmBidSource() + { + return $this->effective_cpm_bid_source; + } + + /** + * Source of the effective CPM bid. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource effective_cpm_bid_source = 22; + * @param int $var + * @return $this + */ + public function setEffectiveCpmBidSource($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\BiddingSourceEnum_BiddingSource::class); + $this->effective_cpm_bid_source = $var; + + return $this; + } + + /** + * Source of the effective CPV bid. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource effective_cpv_bid_source = 23; + * @return int + */ + public function getEffectiveCpvBidSource() + { + return $this->effective_cpv_bid_source; + } + + /** + * Source of the effective CPV bid. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingSourceEnum.BiddingSource effective_cpv_bid_source = 23; + * @param int $var + * @return $this + */ + public function setEffectiveCpvBidSource($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\BiddingSourceEnum_BiddingSource::class); + $this->effective_cpv_bid_source = $var; + + return $this; + } + + /** + * Estimates for criterion bids at various positions. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion.PositionEstimates position_estimates = 10; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion_PositionEstimates + */ + public function getPositionEstimates() + { + return $this->position_estimates; + } + + /** + * Estimates for criterion bids at various positions. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion.PositionEstimates position_estimates = 10; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion_PositionEstimates $var + * @return $this + */ + public function setPositionEstimates($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion_PositionEstimates::class); + $this->position_estimates = $var; + + return $this; + } + + /** + * The list of possible final URLs after all cross-domain redirects for the + * ad. + * + * Generated from protobuf field repeated .google.protobuf.StringValue final_urls = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFinalUrls() + { + return $this->final_urls; + } + + /** + * The list of possible final URLs after all cross-domain redirects for the + * ad. + * + * Generated from protobuf field repeated .google.protobuf.StringValue final_urls = 11; + * @param \Google\Protobuf\StringValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFinalUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\StringValue::class); + $this->final_urls = $arr; + + return $this; + } + + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 13; + * @return \Google\Protobuf\StringValue + */ + public function getTrackingUrlTemplate() + { + return $this->tracking_url_template; + } + + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 13; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setTrackingUrlTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->tracking_url_template = $var; + + return $this; + } + + /** + * The list of mappings used to substitute custom parameter tags in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUrlCustomParameters() + { + return $this->url_custom_parameters; + } + + /** + * The list of mappings used to substitute custom parameter tags in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 14; + * @param \Google\Ads\GoogleAds\V0\Common\CustomParameter[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUrlCustomParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Common\CustomParameter::class); + $this->url_custom_parameters = $arr; + + return $this; + } + + /** + * Keyword. + * + * Generated from protobuf field .google.ads.googleads.v0.common.KeywordInfo keyword = 27; + * @return \Google\Ads\GoogleAds\V0\Common\KeywordInfo + */ + public function getKeyword() + { + return $this->readOneof(27); + } + + /** + * Keyword. + * + * Generated from protobuf field .google.ads.googleads.v0.common.KeywordInfo keyword = 27; + * @param \Google\Ads\GoogleAds\V0\Common\KeywordInfo $var + * @return $this + */ + public function setKeyword($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\KeywordInfo::class); + $this->writeOneof(27, $var); + + return $this; + } + + /** + * Listing group. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ListingGroupInfo listing_group = 32; + * @return \Google\Ads\GoogleAds\V0\Common\ListingGroupInfo + */ + public function getListingGroup() + { + return $this->readOneof(32); + } + + /** + * Listing group. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ListingGroupInfo listing_group = 32; + * @param \Google\Ads\GoogleAds\V0\Common\ListingGroupInfo $var + * @return $this + */ + public function setListingGroup($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\ListingGroupInfo::class); + $this->writeOneof(32, $var); + + return $this; + } + + /** + * @return string + */ + public function getCriterion() + { + return $this->whichOneof("criterion"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion_PositionEstimates.php b/src/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion_PositionEstimates.php new file mode 100644 index 000000000..5c2fdca17 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion_PositionEstimates.php @@ -0,0 +1,130 @@ +google.ads.googleads.v0.resources.AdGroupCriterion.PositionEstimates + */ +class AdGroupCriterion_PositionEstimates extends \Google\Protobuf\Internal\Message +{ + /** + * The estimate of the CPC bid required for ad to be shown on first + * page of search results. + * + * Generated from protobuf field .google.protobuf.Int64Value first_page_cpc_micros = 1; + */ + private $first_page_cpc_micros = null; + /** + * The estimate of the CPC bid required for ad to be displayed in first + * position, at the top of the first page of search results. + * + * Generated from protobuf field .google.protobuf.Int64Value first_position_cpc_micros = 2; + */ + private $first_position_cpc_micros = null; + /** + * The estimate of the CPC bid required for ad to be displayed at the top + * of the first page of search results. + * + * Generated from protobuf field .google.protobuf.Int64Value top_of_page_cpc_micros = 3; + */ + private $top_of_page_cpc_micros = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion::initOnce(); + parent::__construct(); + } + + /** + * The estimate of the CPC bid required for ad to be shown on first + * page of search results. + * + * Generated from protobuf field .google.protobuf.Int64Value first_page_cpc_micros = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getFirstPageCpcMicros() + { + return $this->first_page_cpc_micros; + } + + /** + * The estimate of the CPC bid required for ad to be shown on first + * page of search results. + * + * Generated from protobuf field .google.protobuf.Int64Value first_page_cpc_micros = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setFirstPageCpcMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->first_page_cpc_micros = $var; + + return $this; + } + + /** + * The estimate of the CPC bid required for ad to be displayed in first + * position, at the top of the first page of search results. + * + * Generated from protobuf field .google.protobuf.Int64Value first_position_cpc_micros = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getFirstPositionCpcMicros() + { + return $this->first_position_cpc_micros; + } + + /** + * The estimate of the CPC bid required for ad to be displayed in first + * position, at the top of the first page of search results. + * + * Generated from protobuf field .google.protobuf.Int64Value first_position_cpc_micros = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setFirstPositionCpcMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->first_position_cpc_micros = $var; + + return $this; + } + + /** + * The estimate of the CPC bid required for ad to be displayed at the top + * of the first page of search results. + * + * Generated from protobuf field .google.protobuf.Int64Value top_of_page_cpc_micros = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getTopOfPageCpcMicros() + { + return $this->top_of_page_cpc_micros; + } + + /** + * The estimate of the CPC bid required for ad to be displayed at the top + * of the first page of search results. + * + * Generated from protobuf field .google.protobuf.Int64Value top_of_page_cpc_micros = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setTopOfPageCpcMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->top_of_page_cpc_micros = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion_QualityInfo.php b/src/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion_QualityInfo.php new file mode 100644 index 000000000..9f7818495 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/AdGroupCriterion_QualityInfo.php @@ -0,0 +1,159 @@ +google.ads.googleads.v0.resources.AdGroupCriterion.QualityInfo + */ +class AdGroupCriterion_QualityInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The quality score. + * This field may not be populated if Google does not have enough + * information to determine a value. + * + * Generated from protobuf field .google.protobuf.Int32Value quality_score = 1; + */ + private $quality_score = null; + /** + * The performance of the ad compared to other advertisers. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket creative_quality_score = 2; + */ + private $creative_quality_score = 0; + /** + * The quality score of the landing page. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket post_click_quality_score = 3; + */ + private $post_click_quality_score = 0; + /** + * The click-through rate compared to that of other advertisers. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket search_predicted_ctr = 4; + */ + private $search_predicted_ctr = 0; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion::initOnce(); + parent::__construct(); + } + + /** + * The quality score. + * This field may not be populated if Google does not have enough + * information to determine a value. + * + * Generated from protobuf field .google.protobuf.Int32Value quality_score = 1; + * @return \Google\Protobuf\Int32Value + */ + public function getQualityScore() + { + return $this->quality_score; + } + + /** + * The quality score. + * This field may not be populated if Google does not have enough + * information to determine a value. + * + * Generated from protobuf field .google.protobuf.Int32Value quality_score = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setQualityScore($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->quality_score = $var; + + return $this; + } + + /** + * The performance of the ad compared to other advertisers. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket creative_quality_score = 2; + * @return int + */ + public function getCreativeQualityScore() + { + return $this->creative_quality_score; + } + + /** + * The performance of the ad compared to other advertisers. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket creative_quality_score = 2; + * @param int $var + * @return $this + */ + public function setCreativeQualityScore($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\QualityScoreBucketEnum_QualityScoreBucket::class); + $this->creative_quality_score = $var; + + return $this; + } + + /** + * The quality score of the landing page. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket post_click_quality_score = 3; + * @return int + */ + public function getPostClickQualityScore() + { + return $this->post_click_quality_score; + } + + /** + * The quality score of the landing page. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket post_click_quality_score = 3; + * @param int $var + * @return $this + */ + public function setPostClickQualityScore($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\QualityScoreBucketEnum_QualityScoreBucket::class); + $this->post_click_quality_score = $var; + + return $this; + } + + /** + * The click-through rate compared to that of other advertisers. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket search_predicted_ctr = 4; + * @return int + */ + public function getSearchPredictedCtr() + { + return $this->search_predicted_ctr; + } + + /** + * The click-through rate compared to that of other advertisers. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.QualityScoreBucketEnum.QualityScoreBucket search_predicted_ctr = 4; + * @param int $var + * @return $this + */ + public function setSearchPredictedCtr($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\QualityScoreBucketEnum_QualityScoreBucket::class); + $this->search_predicted_ctr = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/BiddingStrategy.php b/src/Google/Ads/GoogleAds/V0/Resources/BiddingStrategy.php new file mode 100644 index 000000000..d5b29bce0 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/BiddingStrategy.php @@ -0,0 +1,353 @@ +google.ads.googleads.v0.resources.BiddingStrategy + */ +class BiddingStrategy extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the bidding strategy. + * Bidding strategy resource names have the form: + * `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The ID of the bidding strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + */ + private $id = null; + /** + * The name of the bidding strategy. + * All bidding strategies within an account must be named distinctly. + * The length of this string should be between 1 and 255, inclusive, + * in UTF-8 bytes, (trimmed). + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + */ + private $name = null; + /** + * The type of the bidding strategy. + * Create a bidding strategy by setting the bidding scheme. + * This field is read-only. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingStrategyTypeEnum.BiddingStrategyType type = 5; + */ + private $type = 0; + protected $scheme; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\BiddingStrategy::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the bidding strategy. + * Bidding strategy resource names have the form: + * `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the bidding strategy. + * Bidding strategy resource names have the form: + * `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The ID of the bidding strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the bidding strategy. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->id = $var; + + return $this; + } + + /** + * The name of the bidding strategy. + * All bidding strategies within an account must be named distinctly. + * The length of this string should be between 1 and 255, inclusive, + * in UTF-8 bytes, (trimmed). + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + * @return \Google\Protobuf\StringValue + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the bidding strategy. + * All bidding strategies within an account must be named distinctly. + * The length of this string should be between 1 and 255, inclusive, + * in UTF-8 bytes, (trimmed). + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->name = $var; + + return $this; + } + + /** + * The type of the bidding strategy. + * Create a bidding strategy by setting the bidding scheme. + * This field is read-only. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingStrategyTypeEnum.BiddingStrategyType type = 5; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the bidding strategy. + * Create a bidding strategy by setting the bidding scheme. + * This field is read-only. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingStrategyTypeEnum.BiddingStrategyType type = 5; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\BiddingStrategyTypeEnum_BiddingStrategyType::class); + $this->type = $var; + + return $this; + } + + /** + * A bidding strategy that raises bids for clicks that seem more likely to + * lead to a conversion and lowers them for clicks where they seem less + * likely. + * + * Generated from protobuf field .google.ads.googleads.v0.common.EnhancedCpc enhanced_cpc = 7; + * @return \Google\Ads\GoogleAds\V0\Common\EnhancedCpc + */ + public function getEnhancedCpc() + { + return $this->readOneof(7); + } + + /** + * A bidding strategy that raises bids for clicks that seem more likely to + * lead to a conversion and lowers them for clicks where they seem less + * likely. + * + * Generated from protobuf field .google.ads.googleads.v0.common.EnhancedCpc enhanced_cpc = 7; + * @param \Google\Ads\GoogleAds\V0\Common\EnhancedCpc $var + * @return $this + */ + public function setEnhancedCpc($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\EnhancedCpc::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * A bidding strategy that sets max CPC bids to target impressions on + * page one or page one promoted slots on google.com. + * + * Generated from protobuf field .google.ads.googleads.v0.common.PageOnePromoted page_one_promoted = 8; + * @return \Google\Ads\GoogleAds\V0\Common\PageOnePromoted + */ + public function getPageOnePromoted() + { + return $this->readOneof(8); + } + + /** + * A bidding strategy that sets max CPC bids to target impressions on + * page one or page one promoted slots on google.com. + * + * Generated from protobuf field .google.ads.googleads.v0.common.PageOnePromoted page_one_promoted = 8; + * @param \Google\Ads\GoogleAds\V0\Common\PageOnePromoted $var + * @return $this + */ + public function setPageOnePromoted($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\PageOnePromoted::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * A bidding strategy that sets bids to help get as many conversions as + * possible at the target cost-per-acquisition (CPA) you set. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetCpa target_cpa = 9; + * @return \Google\Ads\GoogleAds\V0\Common\TargetCpa + */ + public function getTargetCpa() + { + return $this->readOneof(9); + } + + /** + * A bidding strategy that sets bids to help get as many conversions as + * possible at the target cost-per-acquisition (CPA) you set. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetCpa target_cpa = 9; + * @param \Google\Ads\GoogleAds\V0\Common\TargetCpa $var + * @return $this + */ + public function setTargetCpa($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\TargetCpa::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * A bidding strategy that sets bids based on the target fraction of + * auctions where the advertiser should outrank a specific competitor. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetOutrankShare target_outrank_share = 10; + * @return \Google\Ads\GoogleAds\V0\Common\TargetOutrankShare + */ + public function getTargetOutrankShare() + { + return $this->readOneof(10); + } + + /** + * A bidding strategy that sets bids based on the target fraction of + * auctions where the advertiser should outrank a specific competitor. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetOutrankShare target_outrank_share = 10; + * @param \Google\Ads\GoogleAds\V0\Common\TargetOutrankShare $var + * @return $this + */ + public function setTargetOutrankShare($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\TargetOutrankShare::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * A bidding strategy that helps you maximize revenue while averaging a + * specific target Return On Ad Spend (ROAS). + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetRoas target_roas = 11; + * @return \Google\Ads\GoogleAds\V0\Common\TargetRoas + */ + public function getTargetRoas() + { + return $this->readOneof(11); + } + + /** + * A bidding strategy that helps you maximize revenue while averaging a + * specific target Return On Ad Spend (ROAS). + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetRoas target_roas = 11; + * @param \Google\Ads\GoogleAds\V0\Common\TargetRoas $var + * @return $this + */ + public function setTargetRoas($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\TargetRoas::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * A bid strategy that sets your bids to help get as many clicks as + * possible within your budget. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetSpend target_spend = 12; + * @return \Google\Ads\GoogleAds\V0\Common\TargetSpend + */ + public function getTargetSpend() + { + return $this->readOneof(12); + } + + /** + * A bid strategy that sets your bids to help get as many clicks as + * possible within your budget. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetSpend target_spend = 12; + * @param \Google\Ads\GoogleAds\V0\Common\TargetSpend $var + * @return $this + */ + public function setTargetSpend($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\TargetSpend::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * @return string + */ + public function getScheme() + { + return $this->whichOneof("scheme"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Campaign.php b/src/Google/Ads/GoogleAds/V0/Resources/Campaign.php new file mode 100644 index 000000000..b160b9491 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Campaign.php @@ -0,0 +1,869 @@ +google.ads.googleads.v0.resources.Campaign + */ +class Campaign extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the campaign. + * Campaign resource names have the form: + * `customers/{customer_id}/campaigns/{campaign_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The ID of the campaign. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + */ + private $id = null; + /** + * The name of the campaign. + * This field is required and should not be empty when creating new + * campaigns. + * It must not contain any null (code point 0x0), NL line feed + * (code point 0xA) or carriage return (code point 0xD) characters. + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + */ + private $name = null; + /** + * The status of the campaign. + * When a new campaign is added, the status defaults to ENABLED. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CampaignStatusEnum.CampaignStatus status = 5; + */ + private $status = 0; + /** + * The ad serving status of the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21; + */ + private $serving_status = 0; + /** + * The ad serving optimization status of the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdServingOptimizationStatusEnum.AdServingOptimizationStatus ad_serving_optimization_status = 8; + */ + private $ad_serving_optimization_status = 0; + /** + * The primary serving target for ads within the campaign. + * The targeting options can be refined in `network_settings`. + * Can be set only when creating campaigns. + * After the campaign is created, the field can not be changed. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9; + */ + private $advertising_channel_type = 0; + /** + * Optional refinement to `advertising_channel_type`. + * Must be a valid sub-type of the parent channel type. + * Can be set only when creating campaigns. + * After campaign is created, the field can not be changed. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 10; + */ + private $advertising_channel_sub_type = 0; + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 11; + */ + private $tracking_url_template = null; + /** + * The list of mappings used to substitute custom parameter tags in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 12; + */ + private $url_custom_parameters; + /** + * The network settings for the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign.NetworkSettings network_settings = 14; + */ + private $network_settings = null; + /** + * The hotel setting for the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign.HotelSettingInfo hotel_setting = 32; + */ + private $hotel_setting = null; + /** + * The setting for controlling Dynamic Search Ads (DSA). + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign.DynamicSearchAdsSetting dynamic_search_ads_setting = 33; + */ + private $dynamic_search_ads_setting = null; + /** + * The budget of the campaign. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue campaign_budget = 6; + */ + private $campaign_budget = null; + /** + * The type of bidding strategy. + * A bidding strategy can be created by setting either the bidding scheme to + * create a standard bidding strategy or the `bidding_strategy` field to + * create a portfolio bidding strategy. + * This field is read-only. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingStrategyTypeEnum.BiddingStrategyType bidding_strategy_type = 22; + */ + private $bidding_strategy_type = 0; + /** + * The date when campaign started. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue start_date = 19; + */ + private $start_date = null; + /** + * The date when campaign ended. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue end_date = 20; + */ + private $end_date = null; + protected $campaign_bidding_strategy; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Campaign::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the campaign. + * Campaign resource names have the form: + * `customers/{customer_id}/campaigns/{campaign_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the campaign. + * Campaign resource names have the form: + * `customers/{customer_id}/campaigns/{campaign_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The ID of the campaign. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the campaign. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->id = $var; + + return $this; + } + + /** + * The name of the campaign. + * This field is required and should not be empty when creating new + * campaigns. + * It must not contain any null (code point 0x0), NL line feed + * (code point 0xA) or carriage return (code point 0xD) characters. + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + * @return \Google\Protobuf\StringValue + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the campaign. + * This field is required and should not be empty when creating new + * campaigns. + * It must not contain any null (code point 0x0), NL line feed + * (code point 0xA) or carriage return (code point 0xD) characters. + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->name = $var; + + return $this; + } + + /** + * The status of the campaign. + * When a new campaign is added, the status defaults to ENABLED. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CampaignStatusEnum.CampaignStatus status = 5; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of the campaign. + * When a new campaign is added, the status defaults to ENABLED. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CampaignStatusEnum.CampaignStatus status = 5; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\CampaignStatusEnum_CampaignStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The ad serving status of the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21; + * @return int + */ + public function getServingStatus() + { + return $this->serving_status; + } + + /** + * The ad serving status of the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CampaignServingStatusEnum.CampaignServingStatus serving_status = 21; + * @param int $var + * @return $this + */ + public function setServingStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\CampaignServingStatusEnum_CampaignServingStatus::class); + $this->serving_status = $var; + + return $this; + } + + /** + * The ad serving optimization status of the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdServingOptimizationStatusEnum.AdServingOptimizationStatus ad_serving_optimization_status = 8; + * @return int + */ + public function getAdServingOptimizationStatus() + { + return $this->ad_serving_optimization_status; + } + + /** + * The ad serving optimization status of the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdServingOptimizationStatusEnum.AdServingOptimizationStatus ad_serving_optimization_status = 8; + * @param int $var + * @return $this + */ + public function setAdServingOptimizationStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\AdServingOptimizationStatusEnum_AdServingOptimizationStatus::class); + $this->ad_serving_optimization_status = $var; + + return $this; + } + + /** + * The primary serving target for ads within the campaign. + * The targeting options can be refined in `network_settings`. + * Can be set only when creating campaigns. + * After the campaign is created, the field can not be changed. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9; + * @return int + */ + public function getAdvertisingChannelType() + { + return $this->advertising_channel_type; + } + + /** + * The primary serving target for ads within the campaign. + * The targeting options can be refined in `network_settings`. + * Can be set only when creating campaigns. + * After the campaign is created, the field can not be changed. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType advertising_channel_type = 9; + * @param int $var + * @return $this + */ + public function setAdvertisingChannelType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\AdvertisingChannelTypeEnum_AdvertisingChannelType::class); + $this->advertising_channel_type = $var; + + return $this; + } + + /** + * Optional refinement to `advertising_channel_type`. + * Must be a valid sub-type of the parent channel type. + * Can be set only when creating campaigns. + * After campaign is created, the field can not be changed. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 10; + * @return int + */ + public function getAdvertisingChannelSubType() + { + return $this->advertising_channel_sub_type; + } + + /** + * Optional refinement to `advertising_channel_type`. + * Must be a valid sub-type of the parent channel type. + * Can be set only when creating campaigns. + * After campaign is created, the field can not be changed. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType advertising_channel_sub_type = 10; + * @param int $var + * @return $this + */ + public function setAdvertisingChannelSubType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\AdvertisingChannelSubTypeEnum_AdvertisingChannelSubType::class); + $this->advertising_channel_sub_type = $var; + + return $this; + } + + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 11; + * @return \Google\Protobuf\StringValue + */ + public function getTrackingUrlTemplate() + { + return $this->tracking_url_template; + } + + /** + * The URL template for constructing a tracking URL. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 11; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setTrackingUrlTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->tracking_url_template = $var; + + return $this; + } + + /** + * The list of mappings used to substitute custom parameter tags in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUrlCustomParameters() + { + return $this->url_custom_parameters; + } + + /** + * The list of mappings used to substitute custom parameter tags in a + * `tracking_url_template`, `final_urls`, or `mobile_final_urls`. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.common.CustomParameter url_custom_parameters = 12; + * @param \Google\Ads\GoogleAds\V0\Common\CustomParameter[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUrlCustomParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Common\CustomParameter::class); + $this->url_custom_parameters = $arr; + + return $this; + } + + /** + * The network settings for the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign.NetworkSettings network_settings = 14; + * @return \Google\Ads\GoogleAds\V0\Resources\Campaign_NetworkSettings + */ + public function getNetworkSettings() + { + return $this->network_settings; + } + + /** + * The network settings for the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign.NetworkSettings network_settings = 14; + * @param \Google\Ads\GoogleAds\V0\Resources\Campaign_NetworkSettings $var + * @return $this + */ + public function setNetworkSettings($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Campaign_NetworkSettings::class); + $this->network_settings = $var; + + return $this; + } + + /** + * The hotel setting for the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign.HotelSettingInfo hotel_setting = 32; + * @return \Google\Ads\GoogleAds\V0\Resources\Campaign_HotelSettingInfo + */ + public function getHotelSetting() + { + return $this->hotel_setting; + } + + /** + * The hotel setting for the campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign.HotelSettingInfo hotel_setting = 32; + * @param \Google\Ads\GoogleAds\V0\Resources\Campaign_HotelSettingInfo $var + * @return $this + */ + public function setHotelSetting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Campaign_HotelSettingInfo::class); + $this->hotel_setting = $var; + + return $this; + } + + /** + * The setting for controlling Dynamic Search Ads (DSA). + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign.DynamicSearchAdsSetting dynamic_search_ads_setting = 33; + * @return \Google\Ads\GoogleAds\V0\Resources\Campaign_DynamicSearchAdsSetting + */ + public function getDynamicSearchAdsSetting() + { + return $this->dynamic_search_ads_setting; + } + + /** + * The setting for controlling Dynamic Search Ads (DSA). + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign.DynamicSearchAdsSetting dynamic_search_ads_setting = 33; + * @param \Google\Ads\GoogleAds\V0\Resources\Campaign_DynamicSearchAdsSetting $var + * @return $this + */ + public function setDynamicSearchAdsSetting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Campaign_DynamicSearchAdsSetting::class); + $this->dynamic_search_ads_setting = $var; + + return $this; + } + + /** + * The budget of the campaign. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue campaign_budget = 6; + * @return \Google\Protobuf\StringValue + */ + public function getCampaignBudget() + { + return $this->campaign_budget; + } + + /** + * The budget of the campaign. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue campaign_budget = 6; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCampaignBudget($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->campaign_budget = $var; + + return $this; + } + + /** + * The type of bidding strategy. + * A bidding strategy can be created by setting either the bidding scheme to + * create a standard bidding strategy or the `bidding_strategy` field to + * create a portfolio bidding strategy. + * This field is read-only. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingStrategyTypeEnum.BiddingStrategyType bidding_strategy_type = 22; + * @return int + */ + public function getBiddingStrategyType() + { + return $this->bidding_strategy_type; + } + + /** + * The type of bidding strategy. + * A bidding strategy can be created by setting either the bidding scheme to + * create a standard bidding strategy or the `bidding_strategy` field to + * create a portfolio bidding strategy. + * This field is read-only. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BiddingStrategyTypeEnum.BiddingStrategyType bidding_strategy_type = 22; + * @param int $var + * @return $this + */ + public function setBiddingStrategyType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\BiddingStrategyTypeEnum_BiddingStrategyType::class); + $this->bidding_strategy_type = $var; + + return $this; + } + + /** + * The date when campaign started. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue start_date = 19; + * @return \Google\Protobuf\StringValue + */ + public function getStartDate() + { + return $this->start_date; + } + + /** + * The date when campaign started. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue start_date = 19; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->start_date = $var; + + return $this; + } + + /** + * The date when campaign ended. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue end_date = 20; + * @return \Google\Protobuf\StringValue + */ + public function getEndDate() + { + return $this->end_date; + } + + /** + * The date when campaign ended. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue end_date = 20; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->end_date = $var; + + return $this; + } + + /** + * Portfolio bidding strategy used by campaign. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue bidding_strategy = 23; + * @return \Google\Protobuf\StringValue + */ + public function getBiddingStrategy() + { + return $this->readOneof(23); + } + + /** + * Portfolio bidding strategy used by campaign. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue bidding_strategy = 23; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setBiddingStrategy($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->writeOneof(23, $var); + + return $this; + } + + /** + * Standard Manual CPC bidding strategy. + * Manual click-based bidding where user pays per click. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ManualCpc manual_cpc = 24; + * @return \Google\Ads\GoogleAds\V0\Common\ManualCpc + */ + public function getManualCpc() + { + return $this->readOneof(24); + } + + /** + * Standard Manual CPC bidding strategy. + * Manual click-based bidding where user pays per click. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ManualCpc manual_cpc = 24; + * @param \Google\Ads\GoogleAds\V0\Common\ManualCpc $var + * @return $this + */ + public function setManualCpc($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\ManualCpc::class); + $this->writeOneof(24, $var); + + return $this; + } + + /** + * Standard Manual CPM bidding strategy. + * Manual impression-based bidding where user pays per thousand + * impressions. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ManualCpm manual_cpm = 25; + * @return \Google\Ads\GoogleAds\V0\Common\ManualCpm + */ + public function getManualCpm() + { + return $this->readOneof(25); + } + + /** + * Standard Manual CPM bidding strategy. + * Manual impression-based bidding where user pays per thousand + * impressions. + * + * Generated from protobuf field .google.ads.googleads.v0.common.ManualCpm manual_cpm = 25; + * @param \Google\Ads\GoogleAds\V0\Common\ManualCpm $var + * @return $this + */ + public function setManualCpm($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\ManualCpm::class); + $this->writeOneof(25, $var); + + return $this; + } + + /** + * Standard Maximize Conversions bidding strategy that automatically + * maximizes number of conversions given a daily budget. + * + * Generated from protobuf field .google.ads.googleads.v0.common.MaximizeConversions maximize_conversions = 30; + * @return \Google\Ads\GoogleAds\V0\Common\MaximizeConversions + */ + public function getMaximizeConversions() + { + return $this->readOneof(30); + } + + /** + * Standard Maximize Conversions bidding strategy that automatically + * maximizes number of conversions given a daily budget. + * + * Generated from protobuf field .google.ads.googleads.v0.common.MaximizeConversions maximize_conversions = 30; + * @param \Google\Ads\GoogleAds\V0\Common\MaximizeConversions $var + * @return $this + */ + public function setMaximizeConversions($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\MaximizeConversions::class); + $this->writeOneof(30, $var); + + return $this; + } + + /** + * Standard Maximize Conversion Value bidding strategy that automatically + * sets bids to maximize revenue while spending your budget. + * + * Generated from protobuf field .google.ads.googleads.v0.common.MaximizeConversionValue maximize_conversion_value = 31; + * @return \Google\Ads\GoogleAds\V0\Common\MaximizeConversionValue + */ + public function getMaximizeConversionValue() + { + return $this->readOneof(31); + } + + /** + * Standard Maximize Conversion Value bidding strategy that automatically + * sets bids to maximize revenue while spending your budget. + * + * Generated from protobuf field .google.ads.googleads.v0.common.MaximizeConversionValue maximize_conversion_value = 31; + * @param \Google\Ads\GoogleAds\V0\Common\MaximizeConversionValue $var + * @return $this + */ + public function setMaximizeConversionValue($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\MaximizeConversionValue::class); + $this->writeOneof(31, $var); + + return $this; + } + + /** + * Standard Target CPA bidding strategy that automatically sets bids to + * help get as many conversions as possible at the target + * cost-per-acquisition (CPA) you set. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetCpa target_cpa = 26; + * @return \Google\Ads\GoogleAds\V0\Common\TargetCpa + */ + public function getTargetCpa() + { + return $this->readOneof(26); + } + + /** + * Standard Target CPA bidding strategy that automatically sets bids to + * help get as many conversions as possible at the target + * cost-per-acquisition (CPA) you set. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetCpa target_cpa = 26; + * @param \Google\Ads\GoogleAds\V0\Common\TargetCpa $var + * @return $this + */ + public function setTargetCpa($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\TargetCpa::class); + $this->writeOneof(26, $var); + + return $this; + } + + /** + * Standard Target ROAS bidding strategy that automatically maximizes + * revenue while averaging a specific target return on ad spend (ROAS). + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetRoas target_roas = 29; + * @return \Google\Ads\GoogleAds\V0\Common\TargetRoas + */ + public function getTargetRoas() + { + return $this->readOneof(29); + } + + /** + * Standard Target ROAS bidding strategy that automatically maximizes + * revenue while averaging a specific target return on ad spend (ROAS). + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetRoas target_roas = 29; + * @param \Google\Ads\GoogleAds\V0\Common\TargetRoas $var + * @return $this + */ + public function setTargetRoas($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\TargetRoas::class); + $this->writeOneof(29, $var); + + return $this; + } + + /** + * Standard Target Spend bidding strategy that automatically sets your bids + * to help get as many clicks as possible within your budget. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetSpend target_spend = 27; + * @return \Google\Ads\GoogleAds\V0\Common\TargetSpend + */ + public function getTargetSpend() + { + return $this->readOneof(27); + } + + /** + * Standard Target Spend bidding strategy that automatically sets your bids + * to help get as many clicks as possible within your budget. + * + * Generated from protobuf field .google.ads.googleads.v0.common.TargetSpend target_spend = 27; + * @param \Google\Ads\GoogleAds\V0\Common\TargetSpend $var + * @return $this + */ + public function setTargetSpend($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\TargetSpend::class); + $this->writeOneof(27, $var); + + return $this; + } + + /** + * @return string + */ + public function getCampaignBiddingStrategy() + { + return $this->whichOneof("campaign_bidding_strategy"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/CampaignBudget.php b/src/Google/Ads/GoogleAds/V0/Resources/CampaignBudget.php new file mode 100644 index 000000000..5b94088ba --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/CampaignBudget.php @@ -0,0 +1,365 @@ +google.ads.googleads.v0.resources.CampaignBudget + */ +class CampaignBudget extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the campaign budget. + * Campaign budget resource names have the form: + * `customers/{customer_id}/campaignBudgets/{budget_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The ID of the campaign budget. + * A campaign budget is created using the CampaignBudgetService create + * operation and is assigned a budget ID. A budget ID can be shared across + * different campaigns; the system will then allocate the campaign budget + * among different campaigns to get optimum results. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + */ + private $id = null; + /** + * The name of the campaign budget. + * When creating a campaign budget through CampaignBudgetService, every + * explicitly shared campaign budget must have a non-null, non-empty name. + * Campaign budgets that are not explicitly shared derive their name from the + * attached campaign's name. + * The length of this string must be between 1 and 255, inclusive, + * in UTF-8 bytes, (trimmed). + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + */ + private $name = null; + /** + * The amount of the budget, in the local currency for the account. + * Amount is specified in micros, where one million is equivalent to one + * currency unit. + * + * Generated from protobuf field .google.protobuf.Int64Value amount_micros = 5; + */ + private $amount_micros = null; + /** + * The status of this campaign budget. This field is read-only. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BudgetStatusEnum.BudgetStatus status = 6; + */ + private $status = 0; + /** + * The delivery method that determines the rate at which the campaign budget + * is spent. + * Defaults to STANDARD if unspecified in a create operation. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BudgetDeliveryMethodEnum.BudgetDeliveryMethod delivery_method = 7; + */ + private $delivery_method = 0; + /** + * Whether the budget is explicitly shared. This field is set to false by + * default. + * If true, the budget was created with the purpose of sharing + * across one or more campaigns. + * If false, the budget was created with the intention of only being used + * with a single campaign. The budget's name and status will stay in sync + * with the campaign's name and status. Attempting to share the budget with a + * second campaign will result in an error. + * A non-shared budget can become an explicitly shared. The same operation + * must + * also assign the budget a name. + * A shared campaign budget can never become non-shared. + * + * Generated from protobuf field .google.protobuf.BoolValue explicitly_shared = 8; + */ + private $explicitly_shared = null; + /** + * The number of campaigns actively using the budget. + * This field is read-only. + * + * Generated from protobuf field .google.protobuf.Int64Value reference_count = 9; + */ + private $reference_count = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\CampaignBudget::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the campaign budget. + * Campaign budget resource names have the form: + * `customers/{customer_id}/campaignBudgets/{budget_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the campaign budget. + * Campaign budget resource names have the form: + * `customers/{customer_id}/campaignBudgets/{budget_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The ID of the campaign budget. + * A campaign budget is created using the CampaignBudgetService create + * operation and is assigned a budget ID. A budget ID can be shared across + * different campaigns; the system will then allocate the campaign budget + * among different campaigns to get optimum results. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the campaign budget. + * A campaign budget is created using the CampaignBudgetService create + * operation and is assigned a budget ID. A budget ID can be shared across + * different campaigns; the system will then allocate the campaign budget + * among different campaigns to get optimum results. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->id = $var; + + return $this; + } + + /** + * The name of the campaign budget. + * When creating a campaign budget through CampaignBudgetService, every + * explicitly shared campaign budget must have a non-null, non-empty name. + * Campaign budgets that are not explicitly shared derive their name from the + * attached campaign's name. + * The length of this string must be between 1 and 255, inclusive, + * in UTF-8 bytes, (trimmed). + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + * @return \Google\Protobuf\StringValue + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the campaign budget. + * When creating a campaign budget through CampaignBudgetService, every + * explicitly shared campaign budget must have a non-null, non-empty name. + * Campaign budgets that are not explicitly shared derive their name from the + * attached campaign's name. + * The length of this string must be between 1 and 255, inclusive, + * in UTF-8 bytes, (trimmed). + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->name = $var; + + return $this; + } + + /** + * The amount of the budget, in the local currency for the account. + * Amount is specified in micros, where one million is equivalent to one + * currency unit. + * + * Generated from protobuf field .google.protobuf.Int64Value amount_micros = 5; + * @return \Google\Protobuf\Int64Value + */ + public function getAmountMicros() + { + return $this->amount_micros; + } + + /** + * The amount of the budget, in the local currency for the account. + * Amount is specified in micros, where one million is equivalent to one + * currency unit. + * + * Generated from protobuf field .google.protobuf.Int64Value amount_micros = 5; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setAmountMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->amount_micros = $var; + + return $this; + } + + /** + * The status of this campaign budget. This field is read-only. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BudgetStatusEnum.BudgetStatus status = 6; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of this campaign budget. This field is read-only. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BudgetStatusEnum.BudgetStatus status = 6; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\BudgetStatusEnum_BudgetStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The delivery method that determines the rate at which the campaign budget + * is spent. + * Defaults to STANDARD if unspecified in a create operation. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BudgetDeliveryMethodEnum.BudgetDeliveryMethod delivery_method = 7; + * @return int + */ + public function getDeliveryMethod() + { + return $this->delivery_method; + } + + /** + * The delivery method that determines the rate at which the campaign budget + * is spent. + * Defaults to STANDARD if unspecified in a create operation. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.BudgetDeliveryMethodEnum.BudgetDeliveryMethod delivery_method = 7; + * @param int $var + * @return $this + */ + public function setDeliveryMethod($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\BudgetDeliveryMethodEnum_BudgetDeliveryMethod::class); + $this->delivery_method = $var; + + return $this; + } + + /** + * Whether the budget is explicitly shared. This field is set to false by + * default. + * If true, the budget was created with the purpose of sharing + * across one or more campaigns. + * If false, the budget was created with the intention of only being used + * with a single campaign. The budget's name and status will stay in sync + * with the campaign's name and status. Attempting to share the budget with a + * second campaign will result in an error. + * A non-shared budget can become an explicitly shared. The same operation + * must + * also assign the budget a name. + * A shared campaign budget can never become non-shared. + * + * Generated from protobuf field .google.protobuf.BoolValue explicitly_shared = 8; + * @return \Google\Protobuf\BoolValue + */ + public function getExplicitlyShared() + { + return $this->explicitly_shared; + } + + /** + * Whether the budget is explicitly shared. This field is set to false by + * default. + * If true, the budget was created with the purpose of sharing + * across one or more campaigns. + * If false, the budget was created with the intention of only being used + * with a single campaign. The budget's name and status will stay in sync + * with the campaign's name and status. Attempting to share the budget with a + * second campaign will result in an error. + * A non-shared budget can become an explicitly shared. The same operation + * must + * also assign the budget a name. + * A shared campaign budget can never become non-shared. + * + * Generated from protobuf field .google.protobuf.BoolValue explicitly_shared = 8; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setExplicitlyShared($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->explicitly_shared = $var; + + return $this; + } + + /** + * The number of campaigns actively using the budget. + * This field is read-only. + * + * Generated from protobuf field .google.protobuf.Int64Value reference_count = 9; + * @return \Google\Protobuf\Int64Value + */ + public function getReferenceCount() + { + return $this->reference_count; + } + + /** + * The number of campaigns actively using the budget. + * This field is read-only. + * + * Generated from protobuf field .google.protobuf.Int64Value reference_count = 9; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setReferenceCount($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->reference_count = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/CampaignCriterion.php b/src/Google/Ads/GoogleAds/V0/Resources/CampaignCriterion.php new file mode 100644 index 000000000..a63f6bd57 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/CampaignCriterion.php @@ -0,0 +1,325 @@ +google.ads.googleads.v0.resources.CampaignCriterion + */ +class CampaignCriterion extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the campaign criterion. + * Campaign criterion resource names have the form: + * `customers/{customer_id}/campaignCriteria/{campaign_id}_{criterion_id} + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The campaign to which the criterion belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue campaign = 4; + */ + private $campaign = null; + /** + * The ID of the criterion. + * This field is ignored during mutate. + * + * Generated from protobuf field .google.protobuf.Int64Value criterion_id = 5; + */ + private $criterion_id = null; + /** + * The modifier for the bids when the criterion matches. + * Allowable modifier values depend on the criterion: + * - 0.1 - 10.0: Location + * - 0.1 - 4.0: Platform (mobile). Use 0 to opt out of mobile. + * + * Generated from protobuf field .google.protobuf.FloatValue bid_modifier = 14; + */ + private $bid_modifier = null; + /** + * Whether to target (`false`) or exclude (`true`) the criterion. + * + * Generated from protobuf field .google.protobuf.BoolValue negative = 7; + */ + private $negative = null; + /** + * The type of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType type = 6; + */ + private $type = 0; + protected $criterion; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\CampaignCriterion::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the campaign criterion. + * Campaign criterion resource names have the form: + * `customers/{customer_id}/campaignCriteria/{campaign_id}_{criterion_id} + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the campaign criterion. + * Campaign criterion resource names have the form: + * `customers/{customer_id}/campaignCriteria/{campaign_id}_{criterion_id} + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The campaign to which the criterion belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue campaign = 4; + * @return \Google\Protobuf\StringValue + */ + public function getCampaign() + { + return $this->campaign; + } + + /** + * The campaign to which the criterion belongs. + * This field must not be used in WHERE clauses. + * + * Generated from protobuf field .google.protobuf.StringValue campaign = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCampaign($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->campaign = $var; + + return $this; + } + + /** + * The ID of the criterion. + * This field is ignored during mutate. + * + * Generated from protobuf field .google.protobuf.Int64Value criterion_id = 5; + * @return \Google\Protobuf\Int64Value + */ + public function getCriterionId() + { + return $this->criterion_id; + } + + /** + * The ID of the criterion. + * This field is ignored during mutate. + * + * Generated from protobuf field .google.protobuf.Int64Value criterion_id = 5; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCriterionId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->criterion_id = $var; + + return $this; + } + + /** + * The modifier for the bids when the criterion matches. + * Allowable modifier values depend on the criterion: + * - 0.1 - 10.0: Location + * - 0.1 - 4.0: Platform (mobile). Use 0 to opt out of mobile. + * + * Generated from protobuf field .google.protobuf.FloatValue bid_modifier = 14; + * @return \Google\Protobuf\FloatValue + */ + public function getBidModifier() + { + return $this->bid_modifier; + } + + /** + * The modifier for the bids when the criterion matches. + * Allowable modifier values depend on the criterion: + * - 0.1 - 10.0: Location + * - 0.1 - 4.0: Platform (mobile). Use 0 to opt out of mobile. + * + * Generated from protobuf field .google.protobuf.FloatValue bid_modifier = 14; + * @param \Google\Protobuf\FloatValue $var + * @return $this + */ + public function setBidModifier($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FloatValue::class); + $this->bid_modifier = $var; + + return $this; + } + + /** + * Whether to target (`false`) or exclude (`true`) the criterion. + * + * Generated from protobuf field .google.protobuf.BoolValue negative = 7; + * @return \Google\Protobuf\BoolValue + */ + public function getNegative() + { + return $this->negative; + } + + /** + * Whether to target (`false`) or exclude (`true`) the criterion. + * + * Generated from protobuf field .google.protobuf.BoolValue negative = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setNegative($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->negative = $var; + + return $this; + } + + /** + * The type of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType type = 6; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.CriterionTypeEnum.CriterionType type = 6; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\CriterionTypeEnum_CriterionType::class); + $this->type = $var; + + return $this; + } + + /** + * Keyword. + * + * Generated from protobuf field .google.ads.googleads.v0.common.KeywordInfo keyword = 8; + * @return \Google\Ads\GoogleAds\V0\Common\KeywordInfo + */ + public function getKeyword() + { + return $this->readOneof(8); + } + + /** + * Keyword. + * + * Generated from protobuf field .google.ads.googleads.v0.common.KeywordInfo keyword = 8; + * @param \Google\Ads\GoogleAds\V0\Common\KeywordInfo $var + * @return $this + */ + public function setKeyword($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\KeywordInfo::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Location. + * + * Generated from protobuf field .google.ads.googleads.v0.common.LocationInfo location = 12; + * @return \Google\Ads\GoogleAds\V0\Common\LocationInfo + */ + public function getLocation() + { + return $this->readOneof(12); + } + + /** + * Location. + * + * Generated from protobuf field .google.ads.googleads.v0.common.LocationInfo location = 12; + * @param \Google\Ads\GoogleAds\V0\Common\LocationInfo $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\LocationInfo::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Platform. + * + * Generated from protobuf field .google.ads.googleads.v0.common.PlatformInfo platform = 13; + * @return \Google\Ads\GoogleAds\V0\Common\PlatformInfo + */ + public function getPlatform() + { + return $this->readOneof(13); + } + + /** + * Platform. + * + * Generated from protobuf field .google.ads.googleads.v0.common.PlatformInfo platform = 13; + * @param \Google\Ads\GoogleAds\V0\Common\PlatformInfo $var + * @return $this + */ + public function setPlatform($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\PlatformInfo::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * @return string + */ + public function getCriterion() + { + return $this->whichOneof("criterion"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Campaign_DynamicSearchAdsSetting.php b/src/Google/Ads/GoogleAds/V0/Resources/Campaign_DynamicSearchAdsSetting.php new file mode 100644 index 000000000..b520982b5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Campaign_DynamicSearchAdsSetting.php @@ -0,0 +1,156 @@ +google.ads.googleads.v0.resources.Campaign.DynamicSearchAdsSetting + */ +class Campaign_DynamicSearchAdsSetting extends \Google\Protobuf\Internal\Message +{ + /** + * The Internet domain name that this setting represents, e.g., "google.com" + * or "www.google.com". + * + * Generated from protobuf field .google.protobuf.StringValue domain_name = 1; + */ + private $domain_name = null; + /** + * The language code specifying the language of the domain, e.g., "en". + * + * Generated from protobuf field .google.protobuf.StringValue language_code = 2; + */ + private $language_code = null; + /** + * Whether the campaign uses advertiser supplied URLs exclusively. + * + * Generated from protobuf field .google.protobuf.BoolValue use_supplied_urls_only = 3; + */ + private $use_supplied_urls_only = null; + /** + * The list of page feeds associated with the campaign. + * + * Generated from protobuf field repeated .google.protobuf.Int64Value feed_ids = 4; + */ + private $feed_ids; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Campaign::initOnce(); + parent::__construct(); + } + + /** + * The Internet domain name that this setting represents, e.g., "google.com" + * or "www.google.com". + * + * Generated from protobuf field .google.protobuf.StringValue domain_name = 1; + * @return \Google\Protobuf\StringValue + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * The Internet domain name that this setting represents, e.g., "google.com" + * or "www.google.com". + * + * Generated from protobuf field .google.protobuf.StringValue domain_name = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDomainName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->domain_name = $var; + + return $this; + } + + /** + * The language code specifying the language of the domain, e.g., "en". + * + * Generated from protobuf field .google.protobuf.StringValue language_code = 2; + * @return \Google\Protobuf\StringValue + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language code specifying the language of the domain, e.g., "en". + * + * Generated from protobuf field .google.protobuf.StringValue language_code = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->language_code = $var; + + return $this; + } + + /** + * Whether the campaign uses advertiser supplied URLs exclusively. + * + * Generated from protobuf field .google.protobuf.BoolValue use_supplied_urls_only = 3; + * @return \Google\Protobuf\BoolValue + */ + public function getUseSuppliedUrlsOnly() + { + return $this->use_supplied_urls_only; + } + + /** + * Whether the campaign uses advertiser supplied URLs exclusively. + * + * Generated from protobuf field .google.protobuf.BoolValue use_supplied_urls_only = 3; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setUseSuppliedUrlsOnly($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->use_supplied_urls_only = $var; + + return $this; + } + + /** + * The list of page feeds associated with the campaign. + * + * Generated from protobuf field repeated .google.protobuf.Int64Value feed_ids = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFeedIds() + { + return $this->feed_ids; + } + + /** + * The list of page feeds associated with the campaign. + * + * Generated from protobuf field repeated .google.protobuf.Int64Value feed_ids = 4; + * @param \Google\Protobuf\Int64Value[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFeedIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Int64Value::class); + $this->feed_ids = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Campaign_HotelSettingInfo.php b/src/Google/Ads/GoogleAds/V0/Resources/Campaign_HotelSettingInfo.php new file mode 100644 index 000000000..0cb72b570 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Campaign_HotelSettingInfo.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.resources.Campaign.HotelSettingInfo + */ +class Campaign_HotelSettingInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The linked Hotel Center account. + * + * Generated from protobuf field .google.protobuf.Int64Value hotel_center_id = 1; + */ + private $hotel_center_id = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Campaign::initOnce(); + parent::__construct(); + } + + /** + * The linked Hotel Center account. + * + * Generated from protobuf field .google.protobuf.Int64Value hotel_center_id = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getHotelCenterId() + { + return $this->hotel_center_id; + } + + /** + * The linked Hotel Center account. + * + * Generated from protobuf field .google.protobuf.Int64Value hotel_center_id = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setHotelCenterId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->hotel_center_id = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Campaign_NetworkSettings.php b/src/Google/Ads/GoogleAds/V0/Resources/Campaign_NetworkSettings.php new file mode 100644 index 000000000..5765c7276 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Campaign_NetworkSettings.php @@ -0,0 +1,162 @@ +google.ads.googleads.v0.resources.Campaign.NetworkSettings + */ +class Campaign_NetworkSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Whether ads will be served with google.com search results. + * + * Generated from protobuf field .google.protobuf.BoolValue target_google_search = 1; + */ + private $target_google_search = null; + /** + * Whether ads will be served on partner sites in the Google Search Network + * (requires `target_google_search` to also be `true`). + * + * Generated from protobuf field .google.protobuf.BoolValue target_search_network = 2; + */ + private $target_search_network = null; + /** + * Whether ads will be served on specified placements in the Google Display + * Network. Placements are specified using the Placement criterion. + * + * Generated from protobuf field .google.protobuf.BoolValue target_content_network = 3; + */ + private $target_content_network = null; + /** + * Whether ads will be served on the Google Partner Network. + * This is available only to some select Google partner accounts. + * + * Generated from protobuf field .google.protobuf.BoolValue target_partner_search_network = 4; + */ + private $target_partner_search_network = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Campaign::initOnce(); + parent::__construct(); + } + + /** + * Whether ads will be served with google.com search results. + * + * Generated from protobuf field .google.protobuf.BoolValue target_google_search = 1; + * @return \Google\Protobuf\BoolValue + */ + public function getTargetGoogleSearch() + { + return $this->target_google_search; + } + + /** + * Whether ads will be served with google.com search results. + * + * Generated from protobuf field .google.protobuf.BoolValue target_google_search = 1; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setTargetGoogleSearch($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->target_google_search = $var; + + return $this; + } + + /** + * Whether ads will be served on partner sites in the Google Search Network + * (requires `target_google_search` to also be `true`). + * + * Generated from protobuf field .google.protobuf.BoolValue target_search_network = 2; + * @return \Google\Protobuf\BoolValue + */ + public function getTargetSearchNetwork() + { + return $this->target_search_network; + } + + /** + * Whether ads will be served on partner sites in the Google Search Network + * (requires `target_google_search` to also be `true`). + * + * Generated from protobuf field .google.protobuf.BoolValue target_search_network = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setTargetSearchNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->target_search_network = $var; + + return $this; + } + + /** + * Whether ads will be served on specified placements in the Google Display + * Network. Placements are specified using the Placement criterion. + * + * Generated from protobuf field .google.protobuf.BoolValue target_content_network = 3; + * @return \Google\Protobuf\BoolValue + */ + public function getTargetContentNetwork() + { + return $this->target_content_network; + } + + /** + * Whether ads will be served on specified placements in the Google Display + * Network. Placements are specified using the Placement criterion. + * + * Generated from protobuf field .google.protobuf.BoolValue target_content_network = 3; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setTargetContentNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->target_content_network = $var; + + return $this; + } + + /** + * Whether ads will be served on the Google Partner Network. + * This is available only to some select Google partner accounts. + * + * Generated from protobuf field .google.protobuf.BoolValue target_partner_search_network = 4; + * @return \Google\Protobuf\BoolValue + */ + public function getTargetPartnerSearchNetwork() + { + return $this->target_partner_search_network; + } + + /** + * Whether ads will be served on the Google Partner Network. + * This is available only to some select Google partner accounts. + * + * Generated from protobuf field .google.protobuf.BoolValue target_partner_search_network = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setTargetPartnerSearchNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->target_partner_search_network = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Customer.php b/src/Google/Ads/GoogleAds/V0/Resources/Customer.php new file mode 100644 index 000000000..85f4f8b42 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Customer.php @@ -0,0 +1,299 @@ +google.ads.googleads.v0.resources.Customer + */ +class Customer extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the customer. + * Customer resource names have the form: + * `customers/{customer_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The ID of the customer. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + */ + private $id = null; + /** + * Optional, non-unique descriptive name of the customer. + * + * Generated from protobuf field .google.protobuf.StringValue descriptive_name = 4; + */ + private $descriptive_name = null; + /** + * The currency in which the account operates. + * A subset of the currency codes from the ISO 4217 standard is + * supported. + * + * Generated from protobuf field .google.protobuf.StringValue currency_code = 5; + */ + private $currency_code = null; + /** + * The local timezone ID of the customer. + * + * Generated from protobuf field .google.protobuf.StringValue time_zone = 6; + */ + private $time_zone = null; + /** + * The URL template for constructing a tracking URL out of parameters. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 7; + */ + private $tracking_url_template = null; + /** + * Whether auto-tagging is enabled for the customer. + * + * Generated from protobuf field .google.protobuf.BoolValue auto_tagging_enabled = 8; + */ + private $auto_tagging_enabled = null; + /** + * Whether the Customer has a Partners program badge. If the Customer is not + * associated with the Partners program, this will be false. For more + * information, see https://support.google.com/partners/answer/3125774 + * + * Generated from protobuf field .google.protobuf.BoolValue has_partners_badge = 9; + */ + private $has_partners_badge = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Customer::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the customer. + * Customer resource names have the form: + * `customers/{customer_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the customer. + * Customer resource names have the form: + * `customers/{customer_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The ID of the customer. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the customer. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->id = $var; + + return $this; + } + + /** + * Optional, non-unique descriptive name of the customer. + * + * Generated from protobuf field .google.protobuf.StringValue descriptive_name = 4; + * @return \Google\Protobuf\StringValue + */ + public function getDescriptiveName() + { + return $this->descriptive_name; + } + + /** + * Optional, non-unique descriptive name of the customer. + * + * Generated from protobuf field .google.protobuf.StringValue descriptive_name = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDescriptiveName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->descriptive_name = $var; + + return $this; + } + + /** + * The currency in which the account operates. + * A subset of the currency codes from the ISO 4217 standard is + * supported. + * + * Generated from protobuf field .google.protobuf.StringValue currency_code = 5; + * @return \Google\Protobuf\StringValue + */ + public function getCurrencyCode() + { + return $this->currency_code; + } + + /** + * The currency in which the account operates. + * A subset of the currency codes from the ISO 4217 standard is + * supported. + * + * Generated from protobuf field .google.protobuf.StringValue currency_code = 5; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCurrencyCode($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->currency_code = $var; + + return $this; + } + + /** + * The local timezone ID of the customer. + * + * Generated from protobuf field .google.protobuf.StringValue time_zone = 6; + * @return \Google\Protobuf\StringValue + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * The local timezone ID of the customer. + * + * Generated from protobuf field .google.protobuf.StringValue time_zone = 6; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->time_zone = $var; + + return $this; + } + + /** + * The URL template for constructing a tracking URL out of parameters. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 7; + * @return \Google\Protobuf\StringValue + */ + public function getTrackingUrlTemplate() + { + return $this->tracking_url_template; + } + + /** + * The URL template for constructing a tracking URL out of parameters. + * + * Generated from protobuf field .google.protobuf.StringValue tracking_url_template = 7; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setTrackingUrlTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->tracking_url_template = $var; + + return $this; + } + + /** + * Whether auto-tagging is enabled for the customer. + * + * Generated from protobuf field .google.protobuf.BoolValue auto_tagging_enabled = 8; + * @return \Google\Protobuf\BoolValue + */ + public function getAutoTaggingEnabled() + { + return $this->auto_tagging_enabled; + } + + /** + * Whether auto-tagging is enabled for the customer. + * + * Generated from protobuf field .google.protobuf.BoolValue auto_tagging_enabled = 8; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setAutoTaggingEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->auto_tagging_enabled = $var; + + return $this; + } + + /** + * Whether the Customer has a Partners program badge. If the Customer is not + * associated with the Partners program, this will be false. For more + * information, see https://support.google.com/partners/answer/3125774 + * + * Generated from protobuf field .google.protobuf.BoolValue has_partners_badge = 9; + * @return \Google\Protobuf\BoolValue + */ + public function getHasPartnersBadge() + { + return $this->has_partners_badge; + } + + /** + * Whether the Customer has a Partners program badge. If the Customer is not + * associated with the Partners program, this will be false. For more + * information, see https://support.google.com/partners/answer/3125774 + * + * Generated from protobuf field .google.protobuf.BoolValue has_partners_badge = 9; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setHasPartnersBadge($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->has_partners_badge = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/GeoTargetConstant.php b/src/Google/Ads/GoogleAds/V0/Resources/GeoTargetConstant.php new file mode 100644 index 000000000..b986cc6f9 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/GeoTargetConstant.php @@ -0,0 +1,191 @@ +google.ads.googleads.v0.resources.GeoTargetConstant + */ +class GeoTargetConstant extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the geo target constant. + * Geo target constant resource names have the form: + * `geoTargetConstants/{geo_target_constant_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The ID of the geo target constant. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + */ + private $id = null; + /** + * Geo target constant English name. + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + */ + private $name = null; + /** + * The ISO-3166-1 alpha-2 country code that is associated with the target. + * + * Generated from protobuf field .google.protobuf.StringValue country_code = 5; + */ + private $country_code = null; + /** + * Geo target constant target type. + * + * Generated from protobuf field .google.protobuf.StringValue target_type = 6; + */ + private $target_type = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\GeoTargetConstant::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the geo target constant. + * Geo target constant resource names have the form: + * `geoTargetConstants/{geo_target_constant_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the geo target constant. + * Geo target constant resource names have the form: + * `geoTargetConstants/{geo_target_constant_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The ID of the geo target constant. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the geo target constant. + * + * Generated from protobuf field .google.protobuf.Int64Value id = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->id = $var; + + return $this; + } + + /** + * Geo target constant English name. + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + * @return \Google\Protobuf\StringValue + */ + public function getName() + { + return $this->name; + } + + /** + * Geo target constant English name. + * + * Generated from protobuf field .google.protobuf.StringValue name = 4; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->name = $var; + + return $this; + } + + /** + * The ISO-3166-1 alpha-2 country code that is associated with the target. + * + * Generated from protobuf field .google.protobuf.StringValue country_code = 5; + * @return \Google\Protobuf\StringValue + */ + public function getCountryCode() + { + return $this->country_code; + } + + /** + * The ISO-3166-1 alpha-2 country code that is associated with the target. + * + * Generated from protobuf field .google.protobuf.StringValue country_code = 5; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCountryCode($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->country_code = $var; + + return $this; + } + + /** + * Geo target constant target type. + * + * Generated from protobuf field .google.protobuf.StringValue target_type = 6; + * @return \Google\Protobuf\StringValue + */ + public function getTargetType() + { + return $this->target_type; + } + + /** + * Geo target constant target type. + * + * Generated from protobuf field .google.protobuf.StringValue target_type = 6; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setTargetType($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->target_type = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/GoogleAdsField.php b/src/Google/Ads/GoogleAds/V0/Resources/GoogleAdsField.php new file mode 100644 index 000000000..73cac9b58 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/GoogleAdsField.php @@ -0,0 +1,521 @@ +google.ads.googleads.v0.resources.GoogleAdsField + */ +class GoogleAdsField extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the artifact. + * Artifact resource names have the form: + * `googleAdsFields/{name}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The name of the artifact. + * + * Generated from protobuf field .google.protobuf.StringValue name = 2; + */ + private $name = null; + /** + * The category of the artifact. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.GoogleAdsFieldCategoryEnum.GoogleAdsFieldCategory category = 3; + */ + private $category = 0; + /** + * Whether the artifact can be used in a SELECT clause in search + * queries. + * + * Generated from protobuf field .google.protobuf.BoolValue selectable = 4; + */ + private $selectable = null; + /** + * Whether the artifact can be used in a WHERE clause in search + * queries. + * + * Generated from protobuf field .google.protobuf.BoolValue filterable = 5; + */ + private $filterable = null; + /** + * Whether the artifact can be used in a ORDER BY clause in search + * queries. + * + * Generated from protobuf field .google.protobuf.BoolValue sortable = 6; + */ + private $sortable = null; + /** + * The names of all resources, segments, and metrics that are selectable with + * the described artifact. + * + * Generated from protobuf field repeated .google.protobuf.StringValue selectable_with = 7; + */ + private $selectable_with; + /** + * The names of all resources that are selectable with the described + * artifact. Fields from these resources do not segment metrics when included + * in search queries. + * This field is only set for artifacts whose category is RESOURCE. + * + * Generated from protobuf field repeated .google.protobuf.StringValue attribute_resources = 8; + */ + private $attribute_resources; + /** + * The names of all metrics that are selectable with the described artifact. + * This field is only set for artifacts whose category is either RESOURCE or + * SEGMENT. + * + * Generated from protobuf field repeated .google.protobuf.StringValue metrics = 9; + */ + private $metrics; + /** + * The names of all artifacts, whether a segment or another resource, that + * segment metrics when included in search queries. + * This field is only set for artifacts of category RESOURCE, SEGMENT or + * METRIC. + * + * Generated from protobuf field repeated .google.protobuf.StringValue segments = 10; + */ + private $segments; + /** + * Values the artifact can assume if it is a field of type ENUM. + * This field is only set for artifacts of category SEGMENT or ATTRIBUTE. + * + * Generated from protobuf field repeated .google.protobuf.StringValue enum_values = 11; + */ + private $enum_values; + /** + * This field determines the operators that can be used with the artifact + * in WHERE clauses. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.GoogleAdsFieldDataTypeEnum.GoogleAdsFieldDataType data_type = 12; + */ + private $data_type = 0; + /** + * The URL of proto describing the artifact's data type. + * + * Generated from protobuf field .google.protobuf.StringValue type_url = 13; + */ + private $type_url = null; + /** + * Whether the field artifact is repeated. + * + * Generated from protobuf field .google.protobuf.BoolValue is_repeated = 14; + */ + private $is_repeated = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\GoogleAdsField::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the artifact. + * Artifact resource names have the form: + * `googleAdsFields/{name}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the artifact. + * Artifact resource names have the form: + * `googleAdsFields/{name}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The name of the artifact. + * + * Generated from protobuf field .google.protobuf.StringValue name = 2; + * @return \Google\Protobuf\StringValue + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the artifact. + * + * Generated from protobuf field .google.protobuf.StringValue name = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->name = $var; + + return $this; + } + + /** + * The category of the artifact. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.GoogleAdsFieldCategoryEnum.GoogleAdsFieldCategory category = 3; + * @return int + */ + public function getCategory() + { + return $this->category; + } + + /** + * The category of the artifact. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.GoogleAdsFieldCategoryEnum.GoogleAdsFieldCategory category = 3; + * @param int $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\GoogleAdsFieldCategoryEnum_GoogleAdsFieldCategory::class); + $this->category = $var; + + return $this; + } + + /** + * Whether the artifact can be used in a SELECT clause in search + * queries. + * + * Generated from protobuf field .google.protobuf.BoolValue selectable = 4; + * @return \Google\Protobuf\BoolValue + */ + public function getSelectable() + { + return $this->selectable; + } + + /** + * Whether the artifact can be used in a SELECT clause in search + * queries. + * + * Generated from protobuf field .google.protobuf.BoolValue selectable = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSelectable($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->selectable = $var; + + return $this; + } + + /** + * Whether the artifact can be used in a WHERE clause in search + * queries. + * + * Generated from protobuf field .google.protobuf.BoolValue filterable = 5; + * @return \Google\Protobuf\BoolValue + */ + public function getFilterable() + { + return $this->filterable; + } + + /** + * Whether the artifact can be used in a WHERE clause in search + * queries. + * + * Generated from protobuf field .google.protobuf.BoolValue filterable = 5; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setFilterable($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->filterable = $var; + + return $this; + } + + /** + * Whether the artifact can be used in a ORDER BY clause in search + * queries. + * + * Generated from protobuf field .google.protobuf.BoolValue sortable = 6; + * @return \Google\Protobuf\BoolValue + */ + public function getSortable() + { + return $this->sortable; + } + + /** + * Whether the artifact can be used in a ORDER BY clause in search + * queries. + * + * Generated from protobuf field .google.protobuf.BoolValue sortable = 6; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSortable($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->sortable = $var; + + return $this; + } + + /** + * The names of all resources, segments, and metrics that are selectable with + * the described artifact. + * + * Generated from protobuf field repeated .google.protobuf.StringValue selectable_with = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSelectableWith() + { + return $this->selectable_with; + } + + /** + * The names of all resources, segments, and metrics that are selectable with + * the described artifact. + * + * Generated from protobuf field repeated .google.protobuf.StringValue selectable_with = 7; + * @param \Google\Protobuf\StringValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSelectableWith($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\StringValue::class); + $this->selectable_with = $arr; + + return $this; + } + + /** + * The names of all resources that are selectable with the described + * artifact. Fields from these resources do not segment metrics when included + * in search queries. + * This field is only set for artifacts whose category is RESOURCE. + * + * Generated from protobuf field repeated .google.protobuf.StringValue attribute_resources = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributeResources() + { + return $this->attribute_resources; + } + + /** + * The names of all resources that are selectable with the described + * artifact. Fields from these resources do not segment metrics when included + * in search queries. + * This field is only set for artifacts whose category is RESOURCE. + * + * Generated from protobuf field repeated .google.protobuf.StringValue attribute_resources = 8; + * @param \Google\Protobuf\StringValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributeResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\StringValue::class); + $this->attribute_resources = $arr; + + return $this; + } + + /** + * The names of all metrics that are selectable with the described artifact. + * This field is only set for artifacts whose category is either RESOURCE or + * SEGMENT. + * + * Generated from protobuf field repeated .google.protobuf.StringValue metrics = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * The names of all metrics that are selectable with the described artifact. + * This field is only set for artifacts whose category is either RESOURCE or + * SEGMENT. + * + * Generated from protobuf field repeated .google.protobuf.StringValue metrics = 9; + * @param \Google\Protobuf\StringValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\StringValue::class); + $this->metrics = $arr; + + return $this; + } + + /** + * The names of all artifacts, whether a segment or another resource, that + * segment metrics when included in search queries. + * This field is only set for artifacts of category RESOURCE, SEGMENT or + * METRIC. + * + * Generated from protobuf field repeated .google.protobuf.StringValue segments = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSegments() + { + return $this->segments; + } + + /** + * The names of all artifacts, whether a segment or another resource, that + * segment metrics when included in search queries. + * This field is only set for artifacts of category RESOURCE, SEGMENT or + * METRIC. + * + * Generated from protobuf field repeated .google.protobuf.StringValue segments = 10; + * @param \Google\Protobuf\StringValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\StringValue::class); + $this->segments = $arr; + + return $this; + } + + /** + * Values the artifact can assume if it is a field of type ENUM. + * This field is only set for artifacts of category SEGMENT or ATTRIBUTE. + * + * Generated from protobuf field repeated .google.protobuf.StringValue enum_values = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnumValues() + { + return $this->enum_values; + } + + /** + * Values the artifact can assume if it is a field of type ENUM. + * This field is only set for artifacts of category SEGMENT or ATTRIBUTE. + * + * Generated from protobuf field repeated .google.protobuf.StringValue enum_values = 11; + * @param \Google\Protobuf\StringValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnumValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\StringValue::class); + $this->enum_values = $arr; + + return $this; + } + + /** + * This field determines the operators that can be used with the artifact + * in WHERE clauses. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.GoogleAdsFieldDataTypeEnum.GoogleAdsFieldDataType data_type = 12; + * @return int + */ + public function getDataType() + { + return $this->data_type; + } + + /** + * This field determines the operators that can be used with the artifact + * in WHERE clauses. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.GoogleAdsFieldDataTypeEnum.GoogleAdsFieldDataType data_type = 12; + * @param int $var + * @return $this + */ + public function setDataType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\GoogleAdsFieldDataTypeEnum_GoogleAdsFieldDataType::class); + $this->data_type = $var; + + return $this; + } + + /** + * The URL of proto describing the artifact's data type. + * + * Generated from protobuf field .google.protobuf.StringValue type_url = 13; + * @return \Google\Protobuf\StringValue + */ + public function getTypeUrl() + { + return $this->type_url; + } + + /** + * The URL of proto describing the artifact's data type. + * + * Generated from protobuf field .google.protobuf.StringValue type_url = 13; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setTypeUrl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->type_url = $var; + + return $this; + } + + /** + * Whether the field artifact is repeated. + * + * Generated from protobuf field .google.protobuf.BoolValue is_repeated = 14; + * @return \Google\Protobuf\BoolValue + */ + public function getIsRepeated() + { + return $this->is_repeated; + } + + /** + * Whether the field artifact is repeated. + * + * Generated from protobuf field .google.protobuf.BoolValue is_repeated = 14; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setIsRepeated($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->is_repeated = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/KeywordView.php b/src/Google/Ads/GoogleAds/V0/Resources/KeywordView.php new file mode 100644 index 000000000..62bf4244d --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/KeywordView.php @@ -0,0 +1,63 @@ +google.ads.googleads.v0.resources.KeywordView + */ +class KeywordView extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the keyword view. + * Keyword view resource names have the form: + * `customers/{customer_id}/keywordViews/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\KeywordView::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the keyword view. + * Keyword view resource names have the form: + * `customers/{customer_id}/keywordViews/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the keyword view. + * Keyword view resource names have the form: + * `customers/{customer_id}/keywordViews/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Recommendation.php b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation.php new file mode 100644 index 000000000..77706d032 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation.php @@ -0,0 +1,372 @@ +google.ads.googleads.v0.resources.Recommendation + */ +class Recommendation extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the recommendation. + * `customers/{customer_id}/recommendations/{recommendation_id}` + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + /** + * The type of recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.RecommendationTypeEnum.RecommendationType type = 2; + */ + private $type = 0; + /** + * The impact on account performance as a result of applying the + * recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationImpact impact = 3; + */ + private $impact = null; + /** + * The budget targeted by this recommendation. This will be set only when + * the recommendation affects a single campaign budget. + * This field must not be used in WHERE clauses. + * This field will be set for the following recommendation types: + * CAMPAIGN_BUDGET + * + * Generated from protobuf field .google.protobuf.StringValue campaign_budget = 5; + */ + private $campaign_budget = null; + /** + * The campaign targeted by this recommendation. This will be set only when + * the recommendation affects a single campaign. + * This field must not be used in WHERE clauses. + * This field will be set for the following recommendation types: + * KEYWORD, TEXT_AD, TARGET_CPA_OPT_IN + * + * Generated from protobuf field .google.protobuf.StringValue campaign = 6; + */ + private $campaign = null; + /** + * The ad group targeted by this recommendation. This will be set only when + * the recommendation affects a single ad group. + * This field must not be used in WHERE clauses. + * This field will be set for the following recommendation types: + * KEYWORD, TEXT_AD + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 7; + */ + private $ad_group = null; + protected $recommendation; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Recommendation::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the recommendation. + * `customers/{customer_id}/recommendations/{recommendation_id}` + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the recommendation. + * `customers/{customer_id}/recommendations/{recommendation_id}` + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The type of recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.RecommendationTypeEnum.RecommendationType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.RecommendationTypeEnum.RecommendationType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\RecommendationTypeEnum_RecommendationType::class); + $this->type = $var; + + return $this; + } + + /** + * The impact on account performance as a result of applying the + * recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationImpact impact = 3; + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationImpact + */ + public function getImpact() + { + return $this->impact; + } + + /** + * The impact on account performance as a result of applying the + * recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationImpact impact = 3; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationImpact $var + * @return $this + */ + public function setImpact($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationImpact::class); + $this->impact = $var; + + return $this; + } + + /** + * The budget targeted by this recommendation. This will be set only when + * the recommendation affects a single campaign budget. + * This field must not be used in WHERE clauses. + * This field will be set for the following recommendation types: + * CAMPAIGN_BUDGET + * + * Generated from protobuf field .google.protobuf.StringValue campaign_budget = 5; + * @return \Google\Protobuf\StringValue + */ + public function getCampaignBudget() + { + return $this->campaign_budget; + } + + /** + * The budget targeted by this recommendation. This will be set only when + * the recommendation affects a single campaign budget. + * This field must not be used in WHERE clauses. + * This field will be set for the following recommendation types: + * CAMPAIGN_BUDGET + * + * Generated from protobuf field .google.protobuf.StringValue campaign_budget = 5; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCampaignBudget($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->campaign_budget = $var; + + return $this; + } + + /** + * The campaign targeted by this recommendation. This will be set only when + * the recommendation affects a single campaign. + * This field must not be used in WHERE clauses. + * This field will be set for the following recommendation types: + * KEYWORD, TEXT_AD, TARGET_CPA_OPT_IN + * + * Generated from protobuf field .google.protobuf.StringValue campaign = 6; + * @return \Google\Protobuf\StringValue + */ + public function getCampaign() + { + return $this->campaign; + } + + /** + * The campaign targeted by this recommendation. This will be set only when + * the recommendation affects a single campaign. + * This field must not be used in WHERE clauses. + * This field will be set for the following recommendation types: + * KEYWORD, TEXT_AD, TARGET_CPA_OPT_IN + * + * Generated from protobuf field .google.protobuf.StringValue campaign = 6; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCampaign($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->campaign = $var; + + return $this; + } + + /** + * The ad group targeted by this recommendation. This will be set only when + * the recommendation affects a single ad group. + * This field must not be used in WHERE clauses. + * This field will be set for the following recommendation types: + * KEYWORD, TEXT_AD + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 7; + * @return \Google\Protobuf\StringValue + */ + public function getAdGroup() + { + return $this->ad_group; + } + + /** + * The ad group targeted by this recommendation. This will be set only when + * the recommendation affects a single ad group. + * This field must not be used in WHERE clauses. + * This field will be set for the following recommendation types: + * KEYWORD, TEXT_AD + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 7; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setAdGroup($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->ad_group = $var; + + return $this; + } + + /** + * The campaign budget recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.CampaignBudgetRecommendation campaign_budget_recommendation = 4; + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation_CampaignBudgetRecommendation + */ + public function getCampaignBudgetRecommendation() + { + return $this->readOneof(4); + } + + /** + * The campaign budget recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.CampaignBudgetRecommendation campaign_budget_recommendation = 4; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_CampaignBudgetRecommendation $var + * @return $this + */ + public function setCampaignBudgetRecommendation($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Recommendation_CampaignBudgetRecommendation::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The keyword recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.KeywordRecommendation keyword_recommendation = 8; + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation_KeywordRecommendation + */ + public function getKeywordRecommendation() + { + return $this->readOneof(8); + } + + /** + * The keyword recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.KeywordRecommendation keyword_recommendation = 8; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_KeywordRecommendation $var + * @return $this + */ + public function setKeywordRecommendation($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Recommendation_KeywordRecommendation::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Add expanded text ad recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.TextAdRecommendation text_ad_recommendation = 9; + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation_TextAdRecommendation + */ + public function getTextAdRecommendation() + { + return $this->readOneof(9); + } + + /** + * Add expanded text ad recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.TextAdRecommendation text_ad_recommendation = 9; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_TextAdRecommendation $var + * @return $this + */ + public function setTextAdRecommendation($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Recommendation_TextAdRecommendation::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * The TargetCPA opt-in recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.TargetCpaOptInRecommendation target_cpa_opt_in_recommendation = 10; + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation_TargetCpaOptInRecommendation + */ + public function getTargetCpaOptInRecommendation() + { + return $this->readOneof(10); + } + + /** + * The TargetCPA opt-in recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.TargetCpaOptInRecommendation target_cpa_opt_in_recommendation = 10; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_TargetCpaOptInRecommendation $var + * @return $this + */ + public function setTargetCpaOptInRecommendation($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Recommendation_TargetCpaOptInRecommendation::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * @return string + */ + public function getRecommendation() + { + return $this->whichOneof("recommendation"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_CampaignBudgetRecommendation.php b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_CampaignBudgetRecommendation.php new file mode 100644 index 000000000..3781d07e1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_CampaignBudgetRecommendation.php @@ -0,0 +1,124 @@ +google.ads.googleads.v0.resources.Recommendation.CampaignBudgetRecommendation + */ +class Recommendation_CampaignBudgetRecommendation extends \Google\Protobuf\Internal\Message +{ + /** + * The current budget amount in micros. + * + * Generated from protobuf field .google.protobuf.Int64Value current_budget_amount_micros = 1; + */ + private $current_budget_amount_micros = null; + /** + * The recommended budget amount in micros. + * + * Generated from protobuf field .google.protobuf.Int64Value recommended_budget_amount_micros = 2; + */ + private $recommended_budget_amount_micros = null; + /** + * The budget amounts and associated impact estimates for some values of + * possible budget amounts. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.resources.Recommendation.CampaignBudgetRecommendation.CampaignBudgetRecommendationOption budget_options = 3; + */ + private $budget_options; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Recommendation::initOnce(); + parent::__construct(); + } + + /** + * The current budget amount in micros. + * + * Generated from protobuf field .google.protobuf.Int64Value current_budget_amount_micros = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getCurrentBudgetAmountMicros() + { + return $this->current_budget_amount_micros; + } + + /** + * The current budget amount in micros. + * + * Generated from protobuf field .google.protobuf.Int64Value current_budget_amount_micros = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCurrentBudgetAmountMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->current_budget_amount_micros = $var; + + return $this; + } + + /** + * The recommended budget amount in micros. + * + * Generated from protobuf field .google.protobuf.Int64Value recommended_budget_amount_micros = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getRecommendedBudgetAmountMicros() + { + return $this->recommended_budget_amount_micros; + } + + /** + * The recommended budget amount in micros. + * + * Generated from protobuf field .google.protobuf.Int64Value recommended_budget_amount_micros = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setRecommendedBudgetAmountMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->recommended_budget_amount_micros = $var; + + return $this; + } + + /** + * The budget amounts and associated impact estimates for some values of + * possible budget amounts. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.resources.Recommendation.CampaignBudgetRecommendation.CampaignBudgetRecommendationOption budget_options = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBudgetOptions() + { + return $this->budget_options; + } + + /** + * The budget amounts and associated impact estimates for some values of + * possible budget amounts. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.resources.Recommendation.CampaignBudgetRecommendation.CampaignBudgetRecommendationOption budget_options = 3; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_CampaignBudgetRecommendation_CampaignBudgetRecommendationOption[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBudgetOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Resources\Recommendation_CampaignBudgetRecommendation_CampaignBudgetRecommendationOption::class); + $this->budget_options = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_CampaignBudgetRecommendation_CampaignBudgetRecommendationOption.php b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_CampaignBudgetRecommendation_CampaignBudgetRecommendationOption.php new file mode 100644 index 000000000..441834ed1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_CampaignBudgetRecommendation_CampaignBudgetRecommendationOption.php @@ -0,0 +1,92 @@ +google.ads.googleads.v0.resources.Recommendation.CampaignBudgetRecommendation.CampaignBudgetRecommendationOption + */ +class Recommendation_CampaignBudgetRecommendation_CampaignBudgetRecommendationOption extends \Google\Protobuf\Internal\Message +{ + /** + * The budget amount for this option. + * + * Generated from protobuf field .google.protobuf.Int64Value budget_amount_micros = 1; + */ + private $budget_amount_micros = null; + /** + * The impact estimate if budget is changed to amount specified in this + * option. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationImpact impact = 2; + */ + private $impact = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Recommendation::initOnce(); + parent::__construct(); + } + + /** + * The budget amount for this option. + * + * Generated from protobuf field .google.protobuf.Int64Value budget_amount_micros = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getBudgetAmountMicros() + { + return $this->budget_amount_micros; + } + + /** + * The budget amount for this option. + * + * Generated from protobuf field .google.protobuf.Int64Value budget_amount_micros = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setBudgetAmountMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->budget_amount_micros = $var; + + return $this; + } + + /** + * The impact estimate if budget is changed to amount specified in this + * option. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationImpact impact = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationImpact + */ + public function getImpact() + { + return $this->impact; + } + + /** + * The impact estimate if budget is changed to amount specified in this + * option. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationImpact impact = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationImpact $var + * @return $this + */ + public function setImpact($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationImpact::class); + $this->impact = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_KeywordRecommendation.php b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_KeywordRecommendation.php new file mode 100644 index 000000000..d8ce90ed2 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_KeywordRecommendation.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.resources.Recommendation.KeywordRecommendation + */ +class Recommendation_KeywordRecommendation extends \Google\Protobuf\Internal\Message +{ + /** + * The recommended keyword. + * + * Generated from protobuf field .google.ads.googleads.v0.common.KeywordInfo keyword = 1; + */ + private $keyword = null; + /** + * The recommended CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value recommended_cpc_bid_micros = 2; + */ + private $recommended_cpc_bid_micros = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Recommendation::initOnce(); + parent::__construct(); + } + + /** + * The recommended keyword. + * + * Generated from protobuf field .google.ads.googleads.v0.common.KeywordInfo keyword = 1; + * @return \Google\Ads\GoogleAds\V0\Common\KeywordInfo + */ + public function getKeyword() + { + return $this->keyword; + } + + /** + * The recommended keyword. + * + * Generated from protobuf field .google.ads.googleads.v0.common.KeywordInfo keyword = 1; + * @param \Google\Ads\GoogleAds\V0\Common\KeywordInfo $var + * @return $this + */ + public function setKeyword($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\KeywordInfo::class); + $this->keyword = $var; + + return $this; + } + + /** + * The recommended CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value recommended_cpc_bid_micros = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getRecommendedCpcBidMicros() + { + return $this->recommended_cpc_bid_micros; + } + + /** + * The recommended CPC (cost-per-click) bid. + * + * Generated from protobuf field .google.protobuf.Int64Value recommended_cpc_bid_micros = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setRecommendedCpcBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->recommended_cpc_bid_micros = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_RecommendationImpact.php b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_RecommendationImpact.php new file mode 100644 index 000000000..1eecd6ce5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_RecommendationImpact.php @@ -0,0 +1,90 @@ +google.ads.googleads.v0.resources.Recommendation.RecommendationImpact + */ +class Recommendation_RecommendationImpact extends \Google\Protobuf\Internal\Message +{ + /** + * Base metrics at the time the recommendation was generated. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationMetrics base_metrics = 1; + */ + private $base_metrics = null; + /** + * Estimated metrics if the recommendation is applied. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationMetrics potential_metrics = 2; + */ + private $potential_metrics = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Recommendation::initOnce(); + parent::__construct(); + } + + /** + * Base metrics at the time the recommendation was generated. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationMetrics base_metrics = 1; + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationMetrics + */ + public function getBaseMetrics() + { + return $this->base_metrics; + } + + /** + * Base metrics at the time the recommendation was generated. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationMetrics base_metrics = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationMetrics $var + * @return $this + */ + public function setBaseMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationMetrics::class); + $this->base_metrics = $var; + + return $this; + } + + /** + * Estimated metrics if the recommendation is applied. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationMetrics potential_metrics = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationMetrics + */ + public function getPotentialMetrics() + { + return $this->potential_metrics; + } + + /** + * Estimated metrics if the recommendation is applied. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationMetrics potential_metrics = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationMetrics $var + * @return $this + */ + public function setPotentialMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationMetrics::class); + $this->potential_metrics = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_RecommendationMetrics.php b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_RecommendationMetrics.php new file mode 100644 index 000000000..ddd4913ba --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_RecommendationMetrics.php @@ -0,0 +1,186 @@ +google.ads.googleads.v0.resources.Recommendation.RecommendationMetrics + */ +class Recommendation_RecommendationMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Number of ad impressions. + * + * Generated from protobuf field .google.protobuf.DoubleValue impressions = 1; + */ + private $impressions = null; + /** + * Number of ad clicks. + * + * Generated from protobuf field .google.protobuf.DoubleValue clicks = 2; + */ + private $clicks = null; + /** + * Cost (in micros) for advertising, in the local currency for the account. + * + * Generated from protobuf field .google.protobuf.Int64Value cost_micros = 3; + */ + private $cost_micros = null; + /** + * Number of conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversions = 4; + */ + private $conversions = null; + /** + * Number of video views for a video ad campaign. + * + * Generated from protobuf field .google.protobuf.DoubleValue video_views = 5; + */ + private $video_views = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Recommendation::initOnce(); + parent::__construct(); + } + + /** + * Number of ad impressions. + * + * Generated from protobuf field .google.protobuf.DoubleValue impressions = 1; + * @return \Google\Protobuf\DoubleValue + */ + public function getImpressions() + { + return $this->impressions; + } + + /** + * Number of ad impressions. + * + * Generated from protobuf field .google.protobuf.DoubleValue impressions = 1; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setImpressions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->impressions = $var; + + return $this; + } + + /** + * Number of ad clicks. + * + * Generated from protobuf field .google.protobuf.DoubleValue clicks = 2; + * @return \Google\Protobuf\DoubleValue + */ + public function getClicks() + { + return $this->clicks; + } + + /** + * Number of ad clicks. + * + * Generated from protobuf field .google.protobuf.DoubleValue clicks = 2; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setClicks($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->clicks = $var; + + return $this; + } + + /** + * Cost (in micros) for advertising, in the local currency for the account. + * + * Generated from protobuf field .google.protobuf.Int64Value cost_micros = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getCostMicros() + { + return $this->cost_micros; + } + + /** + * Cost (in micros) for advertising, in the local currency for the account. + * + * Generated from protobuf field .google.protobuf.Int64Value cost_micros = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCostMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cost_micros = $var; + + return $this; + } + + /** + * Number of conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversions = 4; + * @return \Google\Protobuf\DoubleValue + */ + public function getConversions() + { + return $this->conversions; + } + + /** + * Number of conversions. + * + * Generated from protobuf field .google.protobuf.DoubleValue conversions = 4; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setConversions($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->conversions = $var; + + return $this; + } + + /** + * Number of video views for a video ad campaign. + * + * Generated from protobuf field .google.protobuf.DoubleValue video_views = 5; + * @return \Google\Protobuf\DoubleValue + */ + public function getVideoViews() + { + return $this->video_views; + } + + /** + * Number of video views for a video ad campaign. + * + * Generated from protobuf field .google.protobuf.DoubleValue video_views = 5; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setVideoViews($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->video_views = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_TargetCpaOptInRecommendation.php b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_TargetCpaOptInRecommendation.php new file mode 100644 index 000000000..d43dd09f4 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_TargetCpaOptInRecommendation.php @@ -0,0 +1,92 @@ +google.ads.googleads.v0.resources.Recommendation.TargetCpaOptInRecommendation + */ +class Recommendation_TargetCpaOptInRecommendation extends \Google\Protobuf\Internal\Message +{ + /** + * The available goals and corresponding options for Target CPA strategy. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption options = 1; + */ + private $options; + /** + * The recommended average CPA target. See required budget amount and impact + * of using this recommendation in options list. + * + * Generated from protobuf field .google.protobuf.Int64Value recommended_target_cpa_micros = 2; + */ + private $recommended_target_cpa_micros = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Recommendation::initOnce(); + parent::__construct(); + } + + /** + * The available goals and corresponding options for Target CPA strategy. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption options = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOptions() + { + return $this->options; + } + + /** + * The available goals and corresponding options for Target CPA strategy. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption options = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_TargetCpaOptInRecommendation_TargetCpaOptInRecommendationOption[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Resources\Recommendation_TargetCpaOptInRecommendation_TargetCpaOptInRecommendationOption::class); + $this->options = $arr; + + return $this; + } + + /** + * The recommended average CPA target. See required budget amount and impact + * of using this recommendation in options list. + * + * Generated from protobuf field .google.protobuf.Int64Value recommended_target_cpa_micros = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getRecommendedTargetCpaMicros() + { + return $this->recommended_target_cpa_micros; + } + + /** + * The recommended average CPA target. See required budget amount and impact + * of using this recommendation in options list. + * + * Generated from protobuf field .google.protobuf.Int64Value recommended_target_cpa_micros = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setRecommendedTargetCpaMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->recommended_target_cpa_micros = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_TargetCpaOptInRecommendation_TargetCpaOptInRecommendationOption.php b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_TargetCpaOptInRecommendation_TargetCpaOptInRecommendationOption.php new file mode 100644 index 000000000..fe5e1028b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_TargetCpaOptInRecommendation_TargetCpaOptInRecommendationOption.php @@ -0,0 +1,162 @@ +google.ads.googleads.v0.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption + */ +class Recommendation_TargetCpaOptInRecommendation_TargetCpaOptInRecommendationOption extends \Google\Protobuf\Internal\Message +{ + /** + * The goal achieved by this option. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.TargetCpaOptInRecommendationGoalEnum.TargetCpaOptInRecommendationGoal goal = 1; + */ + private $goal = 0; + /** + * Average CPA target. + * + * Generated from protobuf field .google.protobuf.Int64Value target_cpa_micros = 2; + */ + private $target_cpa_micros = null; + /** + * The minimum campaign budget, in local currency for the account, + * required to achieve the target CPA. + * Amount is specified in micros, where one million is equivalent to one + * currency unit. + * + * Generated from protobuf field .google.protobuf.Int64Value required_campaign_budget_amount_micros = 3; + */ + private $required_campaign_budget_amount_micros = null; + /** + * The impact estimate if this option is selected. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationImpact impact = 4; + */ + private $impact = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Recommendation::initOnce(); + parent::__construct(); + } + + /** + * The goal achieved by this option. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.TargetCpaOptInRecommendationGoalEnum.TargetCpaOptInRecommendationGoal goal = 1; + * @return int + */ + public function getGoal() + { + return $this->goal; + } + + /** + * The goal achieved by this option. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.TargetCpaOptInRecommendationGoalEnum.TargetCpaOptInRecommendationGoal goal = 1; + * @param int $var + * @return $this + */ + public function setGoal($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\TargetCpaOptInRecommendationGoalEnum_TargetCpaOptInRecommendationGoal::class); + $this->goal = $var; + + return $this; + } + + /** + * Average CPA target. + * + * Generated from protobuf field .google.protobuf.Int64Value target_cpa_micros = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getTargetCpaMicros() + { + return $this->target_cpa_micros; + } + + /** + * Average CPA target. + * + * Generated from protobuf field .google.protobuf.Int64Value target_cpa_micros = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setTargetCpaMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->target_cpa_micros = $var; + + return $this; + } + + /** + * The minimum campaign budget, in local currency for the account, + * required to achieve the target CPA. + * Amount is specified in micros, where one million is equivalent to one + * currency unit. + * + * Generated from protobuf field .google.protobuf.Int64Value required_campaign_budget_amount_micros = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getRequiredCampaignBudgetAmountMicros() + { + return $this->required_campaign_budget_amount_micros; + } + + /** + * The minimum campaign budget, in local currency for the account, + * required to achieve the target CPA. + * Amount is specified in micros, where one million is equivalent to one + * currency unit. + * + * Generated from protobuf field .google.protobuf.Int64Value required_campaign_budget_amount_micros = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setRequiredCampaignBudgetAmountMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->required_campaign_budget_amount_micros = $var; + + return $this; + } + + /** + * The impact estimate if this option is selected. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationImpact impact = 4; + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationImpact + */ + public function getImpact() + { + return $this->impact; + } + + /** + * The impact estimate if this option is selected. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation.RecommendationImpact impact = 4; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationImpact $var + * @return $this + */ + public function setImpact($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Recommendation_RecommendationImpact::class); + $this->impact = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_TextAdRecommendation.php b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_TextAdRecommendation.php new file mode 100644 index 000000000..50ca9c7ce --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Resources/Recommendation_TextAdRecommendation.php @@ -0,0 +1,130 @@ +google.ads.googleads.v0.resources.Recommendation.TextAdRecommendation + */ +class Recommendation_TextAdRecommendation extends \Google\Protobuf\Internal\Message +{ + /** + * Recommended ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Ad ad = 1; + */ + private $ad = null; + /** + * Creation date of the recommended ad. + * YYYY-MM-DD format, e.g., 2018-04-17. + * + * Generated from protobuf field .google.protobuf.StringValue creation_date = 2; + */ + private $creation_date = null; + /** + * Date, if present, is the earliest when the recommendation will be auto + * applied. + * YYYY-MM-DD format, e.g., 2018-04-17. + * + * Generated from protobuf field .google.protobuf.StringValue auto_apply_date = 3; + */ + private $auto_apply_date = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Resources\Recommendation::initOnce(); + parent::__construct(); + } + + /** + * Recommended ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Ad ad = 1; + * @return \Google\Ads\GoogleAds\V0\Common\Ad + */ + public function getAd() + { + return $this->ad; + } + + /** + * Recommended ad. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Ad ad = 1; + * @param \Google\Ads\GoogleAds\V0\Common\Ad $var + * @return $this + */ + public function setAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\Ad::class); + $this->ad = $var; + + return $this; + } + + /** + * Creation date of the recommended ad. + * YYYY-MM-DD format, e.g., 2018-04-17. + * + * Generated from protobuf field .google.protobuf.StringValue creation_date = 2; + * @return \Google\Protobuf\StringValue + */ + public function getCreationDate() + { + return $this->creation_date; + } + + /** + * Creation date of the recommended ad. + * YYYY-MM-DD format, e.g., 2018-04-17. + * + * Generated from protobuf field .google.protobuf.StringValue creation_date = 2; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setCreationDate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->creation_date = $var; + + return $this; + } + + /** + * Date, if present, is the earliest when the recommendation will be auto + * applied. + * YYYY-MM-DD format, e.g., 2018-04-17. + * + * Generated from protobuf field .google.protobuf.StringValue auto_apply_date = 3; + * @return \Google\Protobuf\StringValue + */ + public function getAutoApplyDate() + { + return $this->auto_apply_date; + } + + /** + * Date, if present, is the earliest when the recommendation will be auto + * applied. + * YYYY-MM-DD format, e.g., 2018-04-17. + * + * Generated from protobuf field .google.protobuf.StringValue auto_apply_date = 3; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setAutoApplyDate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->auto_apply_date = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/AdGroupAdOperation.php b/src/Google/Ads/GoogleAds/V0/Services/AdGroupAdOperation.php new file mode 100644 index 000000000..5be2a8a3f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/AdGroupAdOperation.php @@ -0,0 +1,148 @@ +google.ads.googleads.v0.services.AdGroupAdOperation + */ +class AdGroupAdOperation extends \Google\Protobuf\Internal\Message +{ + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + */ + private $update_mask = null; + protected $operation; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupAdService::initOnce(); + parent::__construct(); + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @return \Google\Protobuf\FieldMask + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Create operation: No resource name is expected for the new ad. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupAd create = 1; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupAd + */ + public function getCreate() + { + return $this->readOneof(1); + } + + /** + * Create operation: No resource name is expected for the new ad. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupAd create = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupAd $var + * @return $this + */ + public function setCreate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupAd::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Update operation: The ad is expected to have a valid resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupAd update = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupAd + */ + public function getUpdate() + { + return $this->readOneof(2); + } + + /** + * Update operation: The ad is expected to have a valid resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupAd update = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupAd $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupAd::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Remove operation: A resource name for the removed ad is expected, + * in this format: + * `customers/{customer_id}/adGroupAds/{ad_group_id}_{ad_id}` + * + * Generated from protobuf field string remove = 3; + * @return string + */ + public function getRemove() + { + return $this->readOneof(3); + } + + /** + * Remove operation: A resource name for the removed ad is expected, + * in this format: + * `customers/{customer_id}/adGroupAds/{ad_group_id}_{ad_id}` + * + * Generated from protobuf field string remove = 3; + * @param string $var + * @return $this + */ + public function setRemove($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/AdGroupAdServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/AdGroupAdServiceClient.php new file mode 100644 index 000000000..e71072ed6 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/AdGroupAdServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.AdGroupAdService/GetAdGroupAd', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\AdGroupAd', 'decode'], + $metadata, $options); + } + + /** + * Creates, updates, or removes ads. Operation statuses are returned. + * @param \Google\Ads\GoogleAds\V0\Services\MutateAdGroupAdsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function MutateAdGroupAds(\Google\Ads\GoogleAds\V0\Services\MutateAdGroupAdsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.ads.googleads.v0.services.AdGroupAdService/MutateAdGroupAds', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\MutateAdGroupAdsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierOperation.php b/src/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierOperation.php new file mode 100644 index 000000000..21fed2bcc --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierOperation.php @@ -0,0 +1,152 @@ +google.ads.googleads.v0.services.AdGroupBidModifierOperation + */ +class AdGroupBidModifierOperation extends \Google\Protobuf\Internal\Message +{ + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + */ + private $update_mask = null; + protected $operation; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupBidModifierService::initOnce(); + parent::__construct(); + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @return \Google\Protobuf\FieldMask + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Create operation: No resource name is expected for the new ad group bid + * modifier. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupBidModifier create = 1; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier + */ + public function getCreate() + { + return $this->readOneof(1); + } + + /** + * Create operation: No resource name is expected for the new ad group bid + * modifier. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupBidModifier create = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier $var + * @return $this + */ + public function setCreate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Update operation: The ad group bid modifier is expected to have a valid + * resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupBidModifier update = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier + */ + public function getUpdate() + { + return $this->readOneof(2); + } + + /** + * Update operation: The ad group bid modifier is expected to have a valid + * resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupBidModifier update = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Remove operation: A resource name for the removed ad group bid modifier + * is expected, in this format: + * `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string remove = 3; + * @return string + */ + public function getRemove() + { + return $this->readOneof(3); + } + + /** + * Remove operation: A resource name for the removed ad group bid modifier + * is expected, in this format: + * `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string remove = 3; + * @param string $var + * @return $this + */ + public function setRemove($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierServiceClient.php new file mode 100644 index 000000000..6b4a817fb --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.AdGroupBidModifierService/GetAdGroupBidModifier', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier', 'decode'], + $metadata, $options); + } + + /** + * Creates, updates, or removes ad group bid modifiers. + * Operation statuses are returned. + * @param \Google\Ads\GoogleAds\V0\Services\MutateAdGroupBidModifiersRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function MutateAdGroupBidModifiers(\Google\Ads\GoogleAds\V0\Services\MutateAdGroupBidModifiersRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.ads.googleads.v0.services.AdGroupBidModifierService/MutateAdGroupBidModifiers', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\MutateAdGroupBidModifiersResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionOperation.php b/src/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionOperation.php new file mode 100644 index 000000000..5a053aba2 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionOperation.php @@ -0,0 +1,150 @@ +google.ads.googleads.v0.services.AdGroupCriterionOperation + */ +class AdGroupCriterionOperation extends \Google\Protobuf\Internal\Message +{ + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + */ + private $update_mask = null; + protected $operation; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupCriterionService::initOnce(); + parent::__construct(); + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @return \Google\Protobuf\FieldMask + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Create operation: No resource name is expected for the new criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion create = 1; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion + */ + public function getCreate() + { + return $this->readOneof(1); + } + + /** + * Create operation: No resource name is expected for the new criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion create = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion $var + * @return $this + */ + public function setCreate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Update operation: The criterion is expected to have a valid resource + * name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion update = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion + */ + public function getUpdate() + { + return $this->readOneof(2); + } + + /** + * Update operation: The criterion is expected to have a valid resource + * name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion update = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Remove operation: A resource name for the removed criterion is expected, + * in this format: + * `customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string remove = 3; + * @return string + */ + public function getRemove() + { + return $this->readOneof(3); + } + + /** + * Remove operation: A resource name for the removed criterion is expected, + * in this format: + * `customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}` + * + * Generated from protobuf field string remove = 3; + * @param string $var + * @return $this + */ + public function setRemove($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionServiceClient.php new file mode 100644 index 000000000..ec4cb83cb --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.AdGroupCriterionService/GetAdGroupCriterion', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion', 'decode'], + $metadata, $options); + } + + /** + * Creates, updates, or removes criteria. Operation statuses are returned. + * @param \Google\Ads\GoogleAds\V0\Services\MutateAdGroupCriteriaRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function MutateAdGroupCriteria(\Google\Ads\GoogleAds\V0\Services\MutateAdGroupCriteriaRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.ads.googleads.v0.services.AdGroupCriterionService/MutateAdGroupCriteria', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\MutateAdGroupCriteriaResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/AdGroupOperation.php b/src/Google/Ads/GoogleAds/V0/Services/AdGroupOperation.php new file mode 100644 index 000000000..05a1c519c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/AdGroupOperation.php @@ -0,0 +1,148 @@ +google.ads.googleads.v0.services.AdGroupOperation + */ +class AdGroupOperation extends \Google\Protobuf\Internal\Message +{ + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + */ + private $update_mask = null; + protected $operation; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupService::initOnce(); + parent::__construct(); + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @return \Google\Protobuf\FieldMask + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Create operation: No resource name is expected for the new ad group. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroup create = 1; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroup + */ + public function getCreate() + { + return $this->readOneof(1); + } + + /** + * Create operation: No resource name is expected for the new ad group. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroup create = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroup $var + * @return $this + */ + public function setCreate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroup::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Update operation: The ad group is expected to have a valid resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroup update = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroup + */ + public function getUpdate() + { + return $this->readOneof(2); + } + + /** + * Update operation: The ad group is expected to have a valid resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroup update = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroup $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroup::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Remove operation: A resource name for the removed ad group is expected, + * in this format: + * `customers/{customer_id}/adGroups/{ad_group_id}` + * + * Generated from protobuf field string remove = 3; + * @return string + */ + public function getRemove() + { + return $this->readOneof(3); + } + + /** + * Remove operation: A resource name for the removed ad group is expected, + * in this format: + * `customers/{customer_id}/adGroups/{ad_group_id}` + * + * Generated from protobuf field string remove = 3; + * @param string $var + * @return $this + */ + public function setRemove($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/AdGroupServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/AdGroupServiceClient.php new file mode 100644 index 000000000..e53921658 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/AdGroupServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.AdGroupService/GetAdGroup', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\AdGroup', 'decode'], + $metadata, $options); + } + + /** + * Creates, updates, or removes ad groups. Operation statuses are returned. + * @param \Google\Ads\GoogleAds\V0\Services\MutateAdGroupsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function MutateAdGroups(\Google\Ads\GoogleAds\V0\Services\MutateAdGroupsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.ads.googleads.v0.services.AdGroupService/MutateAdGroups', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\MutateAdGroupsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation.php b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation.php new file mode 100644 index 000000000..79b72c3bf --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation.php @@ -0,0 +1,176 @@ +google.ads.googleads.v0.services.ApplyRecommendationOperation + */ +class ApplyRecommendationOperation extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the recommendation to apply. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + protected $apply_parameters; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\RecommendationService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the recommendation to apply. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the recommendation to apply. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * Optional parameters to use when applying a campaign budget + * recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.services.ApplyRecommendationOperation.CampaignBudgetParameters campaign_budget = 2; + * @return \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_CampaignBudgetParameters + */ + public function getCampaignBudget() + { + return $this->readOneof(2); + } + + /** + * Optional parameters to use when applying a campaign budget + * recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.services.ApplyRecommendationOperation.CampaignBudgetParameters campaign_budget = 2; + * @param \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_CampaignBudgetParameters $var + * @return $this + */ + public function setCampaignBudget($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_CampaignBudgetParameters::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional parameters to use when applying a text ad recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.services.ApplyRecommendationOperation.TextAdParameters text_ad = 3; + * @return \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_TextAdParameters + */ + public function getTextAd() + { + return $this->readOneof(3); + } + + /** + * Optional parameters to use when applying a text ad recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.services.ApplyRecommendationOperation.TextAdParameters text_ad = 3; + * @param \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_TextAdParameters $var + * @return $this + */ + public function setTextAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_TextAdParameters::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional parameters to use when applying keyword recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.services.ApplyRecommendationOperation.KeywordParameters keyword = 4; + * @return \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_KeywordParameters + */ + public function getKeyword() + { + return $this->readOneof(4); + } + + /** + * Optional parameters to use when applying keyword recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.services.ApplyRecommendationOperation.KeywordParameters keyword = 4; + * @param \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_KeywordParameters $var + * @return $this + */ + public function setKeyword($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_KeywordParameters::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional parameters to use when applying target CPA opt-in + * recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.services.ApplyRecommendationOperation.TargetCpaOptInParameters target_cpa_opt_in = 5; + * @return \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_TargetCpaOptInParameters + */ + public function getTargetCpaOptIn() + { + return $this->readOneof(5); + } + + /** + * Optional parameters to use when applying target CPA opt-in + * recommendation. + * + * Generated from protobuf field .google.ads.googleads.v0.services.ApplyRecommendationOperation.TargetCpaOptInParameters target_cpa_opt_in = 5; + * @param \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_TargetCpaOptInParameters $var + * @return $this + */ + public function setTargetCpaOptIn($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation_TargetCpaOptInParameters::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getApplyParameters() + { + return $this->whichOneof("apply_parameters"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_CampaignBudgetParameters.php b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_CampaignBudgetParameters.php new file mode 100644 index 000000000..528fb7986 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_CampaignBudgetParameters.php @@ -0,0 +1,60 @@ +google.ads.googleads.v0.services.ApplyRecommendationOperation.CampaignBudgetParameters + */ +class ApplyRecommendationOperation_CampaignBudgetParameters extends \Google\Protobuf\Internal\Message +{ + /** + * New budget amount to set for target budget resource. This is a required + * field. + * + * Generated from protobuf field .google.protobuf.Int64Value new_budget_amount_micros = 1; + */ + private $new_budget_amount_micros = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\RecommendationService::initOnce(); + parent::__construct(); + } + + /** + * New budget amount to set for target budget resource. This is a required + * field. + * + * Generated from protobuf field .google.protobuf.Int64Value new_budget_amount_micros = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getNewBudgetAmountMicros() + { + return $this->new_budget_amount_micros; + } + + /** + * New budget amount to set for target budget resource. This is a required + * field. + * + * Generated from protobuf field .google.protobuf.Int64Value new_budget_amount_micros = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setNewBudgetAmountMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->new_budget_amount_micros = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_KeywordParameters.php b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_KeywordParameters.php new file mode 100644 index 000000000..f721ed21d --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_KeywordParameters.php @@ -0,0 +1,124 @@ +google.ads.googleads.v0.services.ApplyRecommendationOperation.KeywordParameters + */ +class ApplyRecommendationOperation_KeywordParameters extends \Google\Protobuf\Internal\Message +{ + /** + * The ad group resource to add keyword to. This is a required field. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 1; + */ + private $ad_group = null; + /** + * The match type of the keyword. This is a required field. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2; + */ + private $match_type = 0; + /** + * Optional, CPC bid to set for the keyword. If not set, keyword will use + * bid based on bidding strategy used by target ad group. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_micros = 3; + */ + private $cpc_bid_micros = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\RecommendationService::initOnce(); + parent::__construct(); + } + + /** + * The ad group resource to add keyword to. This is a required field. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 1; + * @return \Google\Protobuf\StringValue + */ + public function getAdGroup() + { + return $this->ad_group; + } + + /** + * The ad group resource to add keyword to. This is a required field. + * + * Generated from protobuf field .google.protobuf.StringValue ad_group = 1; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setAdGroup($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->ad_group = $var; + + return $this; + } + + /** + * The match type of the keyword. This is a required field. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2; + * @return int + */ + public function getMatchType() + { + return $this->match_type; + } + + /** + * The match type of the keyword. This is a required field. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2; + * @param int $var + * @return $this + */ + public function setMatchType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\KeywordMatchTypeEnum_KeywordMatchType::class); + $this->match_type = $var; + + return $this; + } + + /** + * Optional, CPC bid to set for the keyword. If not set, keyword will use + * bid based on bidding strategy used by target ad group. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_micros = 3; + * @return \Google\Protobuf\Int64Value + */ + public function getCpcBidMicros() + { + return $this->cpc_bid_micros; + } + + /** + * Optional, CPC bid to set for the keyword. If not set, keyword will use + * bid based on bidding strategy used by target ad group. + * + * Generated from protobuf field .google.protobuf.Int64Value cpc_bid_micros = 3; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setCpcBidMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->cpc_bid_micros = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_TargetCpaOptInParameters.php b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_TargetCpaOptInParameters.php new file mode 100644 index 000000000..c856fbfa6 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_TargetCpaOptInParameters.php @@ -0,0 +1,92 @@ +google.ads.googleads.v0.services.ApplyRecommendationOperation.TargetCpaOptInParameters + */ +class ApplyRecommendationOperation_TargetCpaOptInParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Average CPA to use for Target CPA bidding strategy. This is a required + * field. + * + * Generated from protobuf field .google.protobuf.Int64Value target_cpa_micros = 1; + */ + private $target_cpa_micros = null; + /** + * Optional, budget amount to set for the campaign. + * + * Generated from protobuf field .google.protobuf.Int64Value new_campaign_budget_amount_micros = 2; + */ + private $new_campaign_budget_amount_micros = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\RecommendationService::initOnce(); + parent::__construct(); + } + + /** + * Average CPA to use for Target CPA bidding strategy. This is a required + * field. + * + * Generated from protobuf field .google.protobuf.Int64Value target_cpa_micros = 1; + * @return \Google\Protobuf\Int64Value + */ + public function getTargetCpaMicros() + { + return $this->target_cpa_micros; + } + + /** + * Average CPA to use for Target CPA bidding strategy. This is a required + * field. + * + * Generated from protobuf field .google.protobuf.Int64Value target_cpa_micros = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setTargetCpaMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->target_cpa_micros = $var; + + return $this; + } + + /** + * Optional, budget amount to set for the campaign. + * + * Generated from protobuf field .google.protobuf.Int64Value new_campaign_budget_amount_micros = 2; + * @return \Google\Protobuf\Int64Value + */ + public function getNewCampaignBudgetAmountMicros() + { + return $this->new_campaign_budget_amount_micros; + } + + /** + * Optional, budget amount to set for the campaign. + * + * Generated from protobuf field .google.protobuf.Int64Value new_campaign_budget_amount_micros = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setNewCampaignBudgetAmountMicros($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->new_campaign_budget_amount_micros = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_TextAdParameters.php b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_TextAdParameters.php new file mode 100644 index 000000000..139d91965 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationOperation_TextAdParameters.php @@ -0,0 +1,60 @@ +google.ads.googleads.v0.services.ApplyRecommendationOperation.TextAdParameters + */ +class ApplyRecommendationOperation_TextAdParameters extends \Google\Protobuf\Internal\Message +{ + /** + * New ad to add to recommended ad group. All necessary fields need to be + * set in this message. This is a required field. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Ad ad = 1; + */ + private $ad = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\RecommendationService::initOnce(); + parent::__construct(); + } + + /** + * New ad to add to recommended ad group. All necessary fields need to be + * set in this message. This is a required field. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Ad ad = 1; + * @return \Google\Ads\GoogleAds\V0\Common\Ad + */ + public function getAd() + { + return $this->ad; + } + + /** + * New ad to add to recommended ad group. All necessary fields need to be + * set in this message. This is a required field. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Ad ad = 1; + * @param \Google\Ads\GoogleAds\V0\Common\Ad $var + * @return $this + */ + public function setAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\Ad::class); + $this->ad = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationRequest.php b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationRequest.php new file mode 100644 index 000000000..ae0a0be03 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationRequest.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.services.ApplyRecommendationRequest + */ +class ApplyRecommendationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the customer with the recommendation. + * + * Generated from protobuf field string customer_id = 1; + */ + private $customer_id = ''; + /** + * The list of operations to apply recommendations. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.ApplyRecommendationOperation operations = 2; + */ + private $operations; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\RecommendationService::initOnce(); + parent::__construct(); + } + + /** + * The ID of the customer with the recommendation. + * + * Generated from protobuf field string customer_id = 1; + * @return string + */ + public function getCustomerId() + { + return $this->customer_id; + } + + /** + * The ID of the customer with the recommendation. + * + * Generated from protobuf field string customer_id = 1; + * @param string $var + * @return $this + */ + public function setCustomerId($var) + { + GPBUtil::checkString($var, True); + $this->customer_id = $var; + + return $this; + } + + /** + * The list of operations to apply recommendations. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.ApplyRecommendationOperation operations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperations() + { + return $this->operations; + } + + /** + * The list of operations to apply recommendations. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.ApplyRecommendationOperation operations = 2; + * @param \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationOperation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationResponse.php b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationResponse.php new file mode 100644 index 000000000..f8fa53dcd --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationResponse.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.ApplyRecommendationResponse + */ +class ApplyRecommendationResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Results of operations to apply recommendations. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.ApplyRecommendationResult results = 1; + */ + private $results; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\RecommendationService::initOnce(); + parent::__construct(); + } + + /** + * Results of operations to apply recommendations. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.ApplyRecommendationResult results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * Results of operations to apply recommendations. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.ApplyRecommendationResult results = 1; + * @param \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationResult[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationResult.php b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationResult.php new file mode 100644 index 000000000..81206ff73 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/ApplyRecommendationResult.php @@ -0,0 +1,86 @@ +google.ads.googleads.v0.services.ApplyRecommendationResult + */ +class ApplyRecommendationResult extends \Google\Protobuf\Internal\Message +{ + protected $result; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\RecommendationService::initOnce(); + parent::__construct(); + } + + /** + * Returned for successful applies. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->readOneof(1); + } + + /** + * Returned for successful applies. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Returned for failed operations. + * + * Generated from protobuf field .google.rpc.Status status = 2; + * @return \Google\Rpc\Status + */ + public function getStatus() + { + return $this->readOneof(2); + } + + /** + * Returned for failed operations. + * + * Generated from protobuf field .google.rpc.Status status = 2; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/BiddingStrategyOperation.php b/src/Google/Ads/GoogleAds/V0/Services/BiddingStrategyOperation.php new file mode 100644 index 000000000..84fc3e575 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/BiddingStrategyOperation.php @@ -0,0 +1,152 @@ +google.ads.googleads.v0.services.BiddingStrategyOperation + */ +class BiddingStrategyOperation extends \Google\Protobuf\Internal\Message +{ + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + */ + private $update_mask = null; + protected $operation; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\BiddingStrategyService::initOnce(); + parent::__construct(); + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @return \Google\Protobuf\FieldMask + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Create operation: No resource name is expected for the new bidding + * strategy. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.BiddingStrategy create = 1; + * @return \Google\Ads\GoogleAds\V0\Resources\BiddingStrategy + */ + public function getCreate() + { + return $this->readOneof(1); + } + + /** + * Create operation: No resource name is expected for the new bidding + * strategy. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.BiddingStrategy create = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\BiddingStrategy $var + * @return $this + */ + public function setCreate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\BiddingStrategy::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Update operation: The bidding strategy is expected to have a valid + * resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.BiddingStrategy update = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\BiddingStrategy + */ + public function getUpdate() + { + return $this->readOneof(2); + } + + /** + * Update operation: The bidding strategy is expected to have a valid + * resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.BiddingStrategy update = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\BiddingStrategy $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\BiddingStrategy::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Remove operation: A resource name for the removed bidding strategy is + * expected, in this format: + * `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + * + * Generated from protobuf field string remove = 3; + * @return string + */ + public function getRemove() + { + return $this->readOneof(3); + } + + /** + * Remove operation: A resource name for the removed bidding strategy is + * expected, in this format: + * `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + * + * Generated from protobuf field string remove = 3; + * @param string $var + * @return $this + */ + public function setRemove($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/BiddingStrategyServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/BiddingStrategyServiceClient.php new file mode 100644 index 000000000..957eda03b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/BiddingStrategyServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.BiddingStrategyService/GetBiddingStrategy', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\BiddingStrategy', 'decode'], + $metadata, $options); + } + + /** + * Creates, updates, or removes bidding strategies. Operation statuses are + * returned. + * @param \Google\Ads\GoogleAds\V0\Services\MutateBiddingStrategiesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function MutateBiddingStrategies(\Google\Ads\GoogleAds\V0\Services\MutateBiddingStrategiesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.ads.googleads.v0.services.BiddingStrategyService/MutateBiddingStrategies', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\MutateBiddingStrategiesResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/CampaignBudgetOperation.php b/src/Google/Ads/GoogleAds/V0/Services/CampaignBudgetOperation.php new file mode 100644 index 000000000..ef1090c1e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/CampaignBudgetOperation.php @@ -0,0 +1,150 @@ +google.ads.googleads.v0.services.CampaignBudgetOperation + */ +class CampaignBudgetOperation extends \Google\Protobuf\Internal\Message +{ + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + */ + private $update_mask = null; + protected $operation; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignBudgetService::initOnce(); + parent::__construct(); + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @return \Google\Protobuf\FieldMask + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Create operation: No resource name is expected for the new budget. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignBudget create = 1; + * @return \Google\Ads\GoogleAds\V0\Resources\CampaignBudget + */ + public function getCreate() + { + return $this->readOneof(1); + } + + /** + * Create operation: No resource name is expected for the new budget. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignBudget create = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\CampaignBudget $var + * @return $this + */ + public function setCreate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\CampaignBudget::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Update operation: The campaign budget is expected to have a valid + * resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignBudget update = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\CampaignBudget + */ + public function getUpdate() + { + return $this->readOneof(2); + } + + /** + * Update operation: The campaign budget is expected to have a valid + * resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignBudget update = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\CampaignBudget $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\CampaignBudget::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Remove operation: A resource name for the removed budget is expected, in + * this format: + * `customers/{customer_id}/campaignBudgets/{budget_id}` + * + * Generated from protobuf field string remove = 3; + * @return string + */ + public function getRemove() + { + return $this->readOneof(3); + } + + /** + * Remove operation: A resource name for the removed budget is expected, in + * this format: + * `customers/{customer_id}/campaignBudgets/{budget_id}` + * + * Generated from protobuf field string remove = 3; + * @param string $var + * @return $this + */ + public function setRemove($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/CampaignBudgetServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/CampaignBudgetServiceClient.php new file mode 100644 index 000000000..976efbb49 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/CampaignBudgetServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.CampaignBudgetService/GetCampaignBudget', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\CampaignBudget', 'decode'], + $metadata, $options); + } + + /** + * Creates, updates, or removes campaign budgets. Operation statuses are + * returned. + * @param \Google\Ads\GoogleAds\V0\Services\MutateCampaignBudgetsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function MutateCampaignBudgets(\Google\Ads\GoogleAds\V0\Services\MutateCampaignBudgetsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.ads.googleads.v0.services.CampaignBudgetService/MutateCampaignBudgets', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\MutateCampaignBudgetsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/CampaignCriterionOperation.php b/src/Google/Ads/GoogleAds/V0/Services/CampaignCriterionOperation.php new file mode 100644 index 000000000..18eb62630 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/CampaignCriterionOperation.php @@ -0,0 +1,150 @@ +google.ads.googleads.v0.services.CampaignCriterionOperation + */ +class CampaignCriterionOperation extends \Google\Protobuf\Internal\Message +{ + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + */ + private $update_mask = null; + protected $operation; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignCriterionService::initOnce(); + parent::__construct(); + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @return \Google\Protobuf\FieldMask + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Create operation: No resource name is expected for the new criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignCriterion create = 1; + * @return \Google\Ads\GoogleAds\V0\Resources\CampaignCriterion + */ + public function getCreate() + { + return $this->readOneof(1); + } + + /** + * Create operation: No resource name is expected for the new criterion. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignCriterion create = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\CampaignCriterion $var + * @return $this + */ + public function setCreate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\CampaignCriterion::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Update operation: The criterion is expected to have a valid resource + * name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignCriterion update = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\CampaignCriterion + */ + public function getUpdate() + { + return $this->readOneof(2); + } + + /** + * Update operation: The criterion is expected to have a valid resource + * name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignCriterion update = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\CampaignCriterion $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\CampaignCriterion::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Remove operation: A resource name for the removed criterion is expected, + * in this format: + * `customers/{customer_id}/campaignCriteria/{campaign_id}_{criterion_id}` + * + * Generated from protobuf field string remove = 3; + * @return string + */ + public function getRemove() + { + return $this->readOneof(3); + } + + /** + * Remove operation: A resource name for the removed criterion is expected, + * in this format: + * `customers/{customer_id}/campaignCriteria/{campaign_id}_{criterion_id}` + * + * Generated from protobuf field string remove = 3; + * @param string $var + * @return $this + */ + public function setRemove($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/CampaignCriterionServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/CampaignCriterionServiceClient.php new file mode 100644 index 000000000..94054f205 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/CampaignCriterionServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.CampaignCriterionService/GetCampaignCriterion', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\CampaignCriterion', 'decode'], + $metadata, $options); + } + + /** + * Creates, updates, or removes criteria. Operation statuses are returned. + * @param \Google\Ads\GoogleAds\V0\Services\MutateCampaignCriteriaRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function MutateCampaignCriteria(\Google\Ads\GoogleAds\V0\Services\MutateCampaignCriteriaRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.ads.googleads.v0.services.CampaignCriterionService/MutateCampaignCriteria', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\MutateCampaignCriteriaResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/CampaignOperation.php b/src/Google/Ads/GoogleAds/V0/Services/CampaignOperation.php new file mode 100644 index 000000000..6922b1a5f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/CampaignOperation.php @@ -0,0 +1,150 @@ +google.ads.googleads.v0.services.CampaignOperation + */ +class CampaignOperation extends \Google\Protobuf\Internal\Message +{ + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + */ + private $update_mask = null; + protected $operation; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignService::initOnce(); + parent::__construct(); + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @return \Google\Protobuf\FieldMask + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + /** + * FieldMask that determines which resource fields are modified in an update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Create operation: No resource name is expected for the new campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign create = 1; + * @return \Google\Ads\GoogleAds\V0\Resources\Campaign + */ + public function getCreate() + { + return $this->readOneof(1); + } + + /** + * Create operation: No resource name is expected for the new campaign. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign create = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\Campaign $var + * @return $this + */ + public function setCreate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Campaign::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Update operation: The campaign is expected to have a valid + * resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign update = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\Campaign + */ + public function getUpdate() + { + return $this->readOneof(2); + } + + /** + * Update operation: The campaign is expected to have a valid + * resource name. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign update = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\Campaign $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Campaign::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Remove operation: A resource name for the removed campaign is + * expected, in this format: + * `customers/{customer_id}/campaigns/{campaign_id}` + * + * Generated from protobuf field string remove = 3; + * @return string + */ + public function getRemove() + { + return $this->readOneof(3); + } + + /** + * Remove operation: A resource name for the removed campaign is + * expected, in this format: + * `customers/{customer_id}/campaigns/{campaign_id}` + * + * Generated from protobuf field string remove = 3; + * @param string $var + * @return $this + */ + public function setRemove($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/CampaignServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/CampaignServiceClient.php new file mode 100644 index 000000000..b28b163d4 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/CampaignServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.CampaignService/GetCampaign', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\Campaign', 'decode'], + $metadata, $options); + } + + /** + * Creates, updates, or removes campaigns. Operation statuses are returned. + * @param \Google\Ads\GoogleAds\V0\Services\MutateCampaignsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function MutateCampaigns(\Google\Ads\GoogleAds\V0\Services\MutateCampaignsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.ads.googleads.v0.services.CampaignService/MutateCampaigns', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\MutateCampaignsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/CustomerServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/CustomerServiceClient.php new file mode 100644 index 000000000..9755c0695 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/CustomerServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.CustomerService/GetCustomer', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\Customer', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupAdServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupAdServiceGapicClient.php new file mode 100644 index 000000000..7f36610b3 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupAdServiceGapicClient.php @@ -0,0 +1,350 @@ +adGroupAdName('[CUSTOMER]', '[AD_GROUP_AD]'); + * $response = $adGroupAdServiceClient->getAdGroupAd($formattedResourceName); + * } finally { + * $adGroupAdServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class AdGroupAdServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.AdGroupAdService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $adGroupAdNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/ad_group_ad_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/ad_group_ad_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/ad_group_ad_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getAdGroupAdNameTemplate() + { + if (self::$adGroupAdNameTemplate == null) { + self::$adGroupAdNameTemplate = new PathTemplate('customers/{customer}/adGroupAds/{ad_group_ad}'); + } + + return self::$adGroupAdNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'adGroupAd' => self::getAdGroupAdNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a ad_group_ad resource. + * + * @param string $customer + * @param string $adGroupAd + * + * @return string The formatted ad_group_ad resource. + * @experimental + */ + public static function adGroupAdName($customer, $adGroupAd) + { + return self::getAdGroupAdNameTemplate()->render([ + 'customer' => $customer, + 'ad_group_ad' => $adGroupAd, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - adGroupAd: customers/{customer}/adGroupAds/{ad_group_ad}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested ad in full detail. + * + * Sample code: + * ``` + * $adGroupAdServiceClient = new AdGroupAdServiceClient(); + * try { + * $formattedResourceName = $adGroupAdServiceClient->adGroupAdName('[CUSTOMER]', '[AD_GROUP_AD]'); + * $response = $adGroupAdServiceClient->getAdGroupAd($formattedResourceName); + * } finally { + * $adGroupAdServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the ad to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupAd + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getAdGroupAd($resourceName, $optionalArgs = []) + { + $request = new GetAdGroupAdRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetAdGroupAd', + AdGroupAd::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Creates, updates, or removes ads. Operation statuses are returned. + * + * Sample code: + * ``` + * $adGroupAdServiceClient = new AdGroupAdServiceClient(); + * try { + * $customerId = ''; + * $operations = []; + * $response = $adGroupAdServiceClient->mutateAdGroupAds($customerId, $operations); + * } finally { + * $adGroupAdServiceClient->close(); + * } + * ``` + * + * @param string $customerId The ID of the customer whose ads are being modified. + * @param AdGroupAdOperation[] $operations The list of operations to perform on individual ads. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Services\MutateAdGroupAdsResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function mutateAdGroupAds($customerId, $operations, $optionalArgs = []) + { + $request = new MutateAdGroupAdsRequest(); + $request->setCustomerId($customerId); + $request->setOperations($operations); + + return $this->startCall( + 'MutateAdGroupAds', + MutateAdGroupAdsResponse::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupBidModifierServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupBidModifierServiceGapicClient.php new file mode 100644 index 000000000..885992ca6 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupBidModifierServiceGapicClient.php @@ -0,0 +1,351 @@ +adGroupBidModifierName('[CUSTOMER]', '[AD_GROUP_BID_MODIFIER]'); + * $response = $adGroupBidModifierServiceClient->getAdGroupBidModifier($formattedResourceName); + * } finally { + * $adGroupBidModifierServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class AdGroupBidModifierServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.AdGroupBidModifierService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $adGroupBidModifierNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/ad_group_bid_modifier_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/ad_group_bid_modifier_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/ad_group_bid_modifier_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getAdGroupBidModifierNameTemplate() + { + if (self::$adGroupBidModifierNameTemplate == null) { + self::$adGroupBidModifierNameTemplate = new PathTemplate('customers/{customer}/adGroupBidModifiers/{ad_group_bid_modifier}'); + } + + return self::$adGroupBidModifierNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'adGroupBidModifier' => self::getAdGroupBidModifierNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a ad_group_bid_modifier resource. + * + * @param string $customer + * @param string $adGroupBidModifier + * + * @return string The formatted ad_group_bid_modifier resource. + * @experimental + */ + public static function adGroupBidModifierName($customer, $adGroupBidModifier) + { + return self::getAdGroupBidModifierNameTemplate()->render([ + 'customer' => $customer, + 'ad_group_bid_modifier' => $adGroupBidModifier, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - adGroupBidModifier: customers/{customer}/adGroupBidModifiers/{ad_group_bid_modifier}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested ad group bid modifier in full detail. + * + * Sample code: + * ``` + * $adGroupBidModifierServiceClient = new AdGroupBidModifierServiceClient(); + * try { + * $formattedResourceName = $adGroupBidModifierServiceClient->adGroupBidModifierName('[CUSTOMER]', '[AD_GROUP_BID_MODIFIER]'); + * $response = $adGroupBidModifierServiceClient->getAdGroupBidModifier($formattedResourceName); + * } finally { + * $adGroupBidModifierServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the ad group bid modifier to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getAdGroupBidModifier($resourceName, $optionalArgs = []) + { + $request = new GetAdGroupBidModifierRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetAdGroupBidModifier', + AdGroupBidModifier::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Creates, updates, or removes ad group bid modifiers. + * Operation statuses are returned. + * + * Sample code: + * ``` + * $adGroupBidModifierServiceClient = new AdGroupBidModifierServiceClient(); + * try { + * $customerId = ''; + * $operations = []; + * $response = $adGroupBidModifierServiceClient->mutateAdGroupBidModifiers($customerId, $operations); + * } finally { + * $adGroupBidModifierServiceClient->close(); + * } + * ``` + * + * @param string $customerId ID of the customer whose ad group bid modifiers are being modified. + * @param AdGroupBidModifierOperation[] $operations The list of operations to perform on individual ad group bid modifiers. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Services\MutateAdGroupBidModifiersResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function mutateAdGroupBidModifiers($customerId, $operations, $optionalArgs = []) + { + $request = new MutateAdGroupBidModifiersRequest(); + $request->setCustomerId($customerId); + $request->setOperations($operations); + + return $this->startCall( + 'MutateAdGroupBidModifiers', + MutateAdGroupBidModifiersResponse::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupCriterionServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupCriterionServiceGapicClient.php new file mode 100644 index 000000000..44005f861 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupCriterionServiceGapicClient.php @@ -0,0 +1,350 @@ +adGroupCriteriaName('[CUSTOMER]', '[AD_GROUP_CRITERIA]'); + * $response = $adGroupCriterionServiceClient->getAdGroupCriterion($formattedResourceName); + * } finally { + * $adGroupCriterionServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class AdGroupCriterionServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.AdGroupCriterionService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $adGroupCriteriaNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/ad_group_criterion_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/ad_group_criterion_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/ad_group_criterion_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getAdGroupCriteriaNameTemplate() + { + if (self::$adGroupCriteriaNameTemplate == null) { + self::$adGroupCriteriaNameTemplate = new PathTemplate('customers/{customer}/adGroupCriteria/{ad_group_criteria}'); + } + + return self::$adGroupCriteriaNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'adGroupCriteria' => self::getAdGroupCriteriaNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a ad_group_criteria resource. + * + * @param string $customer + * @param string $adGroupCriteria + * + * @return string The formatted ad_group_criteria resource. + * @experimental + */ + public static function adGroupCriteriaName($customer, $adGroupCriteria) + { + return self::getAdGroupCriteriaNameTemplate()->render([ + 'customer' => $customer, + 'ad_group_criteria' => $adGroupCriteria, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - adGroupCriteria: customers/{customer}/adGroupCriteria/{ad_group_criteria}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested criterion in full detail. + * + * Sample code: + * ``` + * $adGroupCriterionServiceClient = new AdGroupCriterionServiceClient(); + * try { + * $formattedResourceName = $adGroupCriterionServiceClient->adGroupCriteriaName('[CUSTOMER]', '[AD_GROUP_CRITERIA]'); + * $response = $adGroupCriterionServiceClient->getAdGroupCriterion($formattedResourceName); + * } finally { + * $adGroupCriterionServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the criterion to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getAdGroupCriterion($resourceName, $optionalArgs = []) + { + $request = new GetAdGroupCriterionRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetAdGroupCriterion', + AdGroupCriterion::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Creates, updates, or removes criteria. Operation statuses are returned. + * + * Sample code: + * ``` + * $adGroupCriterionServiceClient = new AdGroupCriterionServiceClient(); + * try { + * $customerId = ''; + * $operations = []; + * $response = $adGroupCriterionServiceClient->mutateAdGroupCriteria($customerId, $operations); + * } finally { + * $adGroupCriterionServiceClient->close(); + * } + * ``` + * + * @param string $customerId ID of the customer whose criteria are being modified. + * @param AdGroupCriterionOperation[] $operations The list of operations to perform on individual criteria. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Services\MutateAdGroupCriteriaResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function mutateAdGroupCriteria($customerId, $operations, $optionalArgs = []) + { + $request = new MutateAdGroupCriteriaRequest(); + $request->setCustomerId($customerId); + $request->setOperations($operations); + + return $this->startCall( + 'MutateAdGroupCriteria', + MutateAdGroupCriteriaResponse::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupServiceGapicClient.php new file mode 100644 index 000000000..fd7f54818 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/AdGroupServiceGapicClient.php @@ -0,0 +1,350 @@ +adGroupName('[CUSTOMER]', '[AD_GROUP]'); + * $response = $adGroupServiceClient->getAdGroup($formattedResourceName); + * } finally { + * $adGroupServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class AdGroupServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.AdGroupService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $adGroupNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/ad_group_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/ad_group_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/ad_group_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getAdGroupNameTemplate() + { + if (self::$adGroupNameTemplate == null) { + self::$adGroupNameTemplate = new PathTemplate('customers/{customer}/adGroups/{ad_group}'); + } + + return self::$adGroupNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'adGroup' => self::getAdGroupNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a ad_group resource. + * + * @param string $customer + * @param string $adGroup + * + * @return string The formatted ad_group resource. + * @experimental + */ + public static function adGroupName($customer, $adGroup) + { + return self::getAdGroupNameTemplate()->render([ + 'customer' => $customer, + 'ad_group' => $adGroup, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - adGroup: customers/{customer}/adGroups/{ad_group}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested ad group in full detail. + * + * Sample code: + * ``` + * $adGroupServiceClient = new AdGroupServiceClient(); + * try { + * $formattedResourceName = $adGroupServiceClient->adGroupName('[CUSTOMER]', '[AD_GROUP]'); + * $response = $adGroupServiceClient->getAdGroup($formattedResourceName); + * } finally { + * $adGroupServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the ad group to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroup + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getAdGroup($resourceName, $optionalArgs = []) + { + $request = new GetAdGroupRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetAdGroup', + AdGroup::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Creates, updates, or removes ad groups. Operation statuses are returned. + * + * Sample code: + * ``` + * $adGroupServiceClient = new AdGroupServiceClient(); + * try { + * $customerId = ''; + * $operations = []; + * $response = $adGroupServiceClient->mutateAdGroups($customerId, $operations); + * } finally { + * $adGroupServiceClient->close(); + * } + * ``` + * + * @param string $customerId The ID of the customer whose ad groups are being modified. + * @param AdGroupOperation[] $operations The list of operations to perform on individual ad groups. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Services\MutateAdGroupsResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function mutateAdGroups($customerId, $operations, $optionalArgs = []) + { + $request = new MutateAdGroupsRequest(); + $request->setCustomerId($customerId); + $request->setOperations($operations); + + return $this->startCall( + 'MutateAdGroups', + MutateAdGroupsResponse::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/BiddingStrategyServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/BiddingStrategyServiceGapicClient.php new file mode 100644 index 000000000..8097bdd45 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/BiddingStrategyServiceGapicClient.php @@ -0,0 +1,351 @@ +biddingStrategyName('[CUSTOMER]', '[BIDDING_STRATEGY]'); + * $response = $biddingStrategyServiceClient->getBiddingStrategy($formattedResourceName); + * } finally { + * $biddingStrategyServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class BiddingStrategyServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.BiddingStrategyService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $biddingStrategyNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/bidding_strategy_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/bidding_strategy_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/bidding_strategy_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getBiddingStrategyNameTemplate() + { + if (self::$biddingStrategyNameTemplate == null) { + self::$biddingStrategyNameTemplate = new PathTemplate('customers/{customer}/biddingStrategies/{bidding_strategy}'); + } + + return self::$biddingStrategyNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'biddingStrategy' => self::getBiddingStrategyNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a bidding_strategy resource. + * + * @param string $customer + * @param string $biddingStrategy + * + * @return string The formatted bidding_strategy resource. + * @experimental + */ + public static function biddingStrategyName($customer, $biddingStrategy) + { + return self::getBiddingStrategyNameTemplate()->render([ + 'customer' => $customer, + 'bidding_strategy' => $biddingStrategy, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - biddingStrategy: customers/{customer}/biddingStrategies/{bidding_strategy}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested bidding strategy in full detail. + * + * Sample code: + * ``` + * $biddingStrategyServiceClient = new BiddingStrategyServiceClient(); + * try { + * $formattedResourceName = $biddingStrategyServiceClient->biddingStrategyName('[CUSTOMER]', '[BIDDING_STRATEGY]'); + * $response = $biddingStrategyServiceClient->getBiddingStrategy($formattedResourceName); + * } finally { + * $biddingStrategyServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the bidding strategy to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\BiddingStrategy + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getBiddingStrategy($resourceName, $optionalArgs = []) + { + $request = new GetBiddingStrategyRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetBiddingStrategy', + BiddingStrategy::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Creates, updates, or removes bidding strategies. Operation statuses are + * returned. + * + * Sample code: + * ``` + * $biddingStrategyServiceClient = new BiddingStrategyServiceClient(); + * try { + * $customerId = ''; + * $operations = []; + * $response = $biddingStrategyServiceClient->mutateBiddingStrategies($customerId, $operations); + * } finally { + * $biddingStrategyServiceClient->close(); + * } + * ``` + * + * @param string $customerId The ID of the customer whose bidding strategies are being modified. + * @param BiddingStrategyOperation[] $operations The list of operations to perform on individual bidding strategies. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Services\MutateBiddingStrategiesResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function mutateBiddingStrategies($customerId, $operations, $optionalArgs = []) + { + $request = new MutateBiddingStrategiesRequest(); + $request->setCustomerId($customerId); + $request->setOperations($operations); + + return $this->startCall( + 'MutateBiddingStrategies', + MutateBiddingStrategiesResponse::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/CampaignBudgetServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/CampaignBudgetServiceGapicClient.php new file mode 100644 index 000000000..ec4dbdb56 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/CampaignBudgetServiceGapicClient.php @@ -0,0 +1,351 @@ +campaignBudgetName('[CUSTOMER]', '[CAMPAIGN_BUDGET]'); + * $response = $campaignBudgetServiceClient->getCampaignBudget($formattedResourceName); + * } finally { + * $campaignBudgetServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class CampaignBudgetServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.CampaignBudgetService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $campaignBudgetNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/campaign_budget_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/campaign_budget_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/campaign_budget_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getCampaignBudgetNameTemplate() + { + if (self::$campaignBudgetNameTemplate == null) { + self::$campaignBudgetNameTemplate = new PathTemplate('customers/{customer}/campaignBudgets/{campaign_budget}'); + } + + return self::$campaignBudgetNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'campaignBudget' => self::getCampaignBudgetNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a campaign_budget resource. + * + * @param string $customer + * @param string $campaignBudget + * + * @return string The formatted campaign_budget resource. + * @experimental + */ + public static function campaignBudgetName($customer, $campaignBudget) + { + return self::getCampaignBudgetNameTemplate()->render([ + 'customer' => $customer, + 'campaign_budget' => $campaignBudget, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - campaignBudget: customers/{customer}/campaignBudgets/{campaign_budget}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested Campaign Budget in full detail. + * + * Sample code: + * ``` + * $campaignBudgetServiceClient = new CampaignBudgetServiceClient(); + * try { + * $formattedResourceName = $campaignBudgetServiceClient->campaignBudgetName('[CUSTOMER]', '[CAMPAIGN_BUDGET]'); + * $response = $campaignBudgetServiceClient->getCampaignBudget($formattedResourceName); + * } finally { + * $campaignBudgetServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the campaign budget to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\CampaignBudget + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getCampaignBudget($resourceName, $optionalArgs = []) + { + $request = new GetCampaignBudgetRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetCampaignBudget', + CampaignBudget::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Creates, updates, or removes campaign budgets. Operation statuses are + * returned. + * + * Sample code: + * ``` + * $campaignBudgetServiceClient = new CampaignBudgetServiceClient(); + * try { + * $customerId = ''; + * $operations = []; + * $response = $campaignBudgetServiceClient->mutateCampaignBudgets($customerId, $operations); + * } finally { + * $campaignBudgetServiceClient->close(); + * } + * ``` + * + * @param string $customerId The ID of the customer whose campaign budgets are being modified. + * @param CampaignBudgetOperation[] $operations The list of operations to perform on individual campaign budgets. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Services\MutateCampaignBudgetsResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function mutateCampaignBudgets($customerId, $operations, $optionalArgs = []) + { + $request = new MutateCampaignBudgetsRequest(); + $request->setCustomerId($customerId); + $request->setOperations($operations); + + return $this->startCall( + 'MutateCampaignBudgets', + MutateCampaignBudgetsResponse::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/CampaignCriterionServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/CampaignCriterionServiceGapicClient.php new file mode 100644 index 000000000..44318218e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/CampaignCriterionServiceGapicClient.php @@ -0,0 +1,350 @@ +campaignCriteriaName('[CUSTOMER]', '[CAMPAIGN_CRITERIA]'); + * $response = $campaignCriterionServiceClient->getCampaignCriterion($formattedResourceName); + * } finally { + * $campaignCriterionServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class CampaignCriterionServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.CampaignCriterionService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $campaignCriteriaNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/campaign_criterion_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/campaign_criterion_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/campaign_criterion_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getCampaignCriteriaNameTemplate() + { + if (self::$campaignCriteriaNameTemplate == null) { + self::$campaignCriteriaNameTemplate = new PathTemplate('customers/{customer}/campaignCriteria/{campaign_criteria}'); + } + + return self::$campaignCriteriaNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'campaignCriteria' => self::getCampaignCriteriaNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a campaign_criteria resource. + * + * @param string $customer + * @param string $campaignCriteria + * + * @return string The formatted campaign_criteria resource. + * @experimental + */ + public static function campaignCriteriaName($customer, $campaignCriteria) + { + return self::getCampaignCriteriaNameTemplate()->render([ + 'customer' => $customer, + 'campaign_criteria' => $campaignCriteria, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - campaignCriteria: customers/{customer}/campaignCriteria/{campaign_criteria}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested criterion in full detail. + * + * Sample code: + * ``` + * $campaignCriterionServiceClient = new CampaignCriterionServiceClient(); + * try { + * $formattedResourceName = $campaignCriterionServiceClient->campaignCriteriaName('[CUSTOMER]', '[CAMPAIGN_CRITERIA]'); + * $response = $campaignCriterionServiceClient->getCampaignCriterion($formattedResourceName); + * } finally { + * $campaignCriterionServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the criterion to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\CampaignCriterion + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getCampaignCriterion($resourceName, $optionalArgs = []) + { + $request = new GetCampaignCriterionRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetCampaignCriterion', + CampaignCriterion::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Creates, updates, or removes criteria. Operation statuses are returned. + * + * Sample code: + * ``` + * $campaignCriterionServiceClient = new CampaignCriterionServiceClient(); + * try { + * $customerId = ''; + * $operations = []; + * $response = $campaignCriterionServiceClient->mutateCampaignCriteria($customerId, $operations); + * } finally { + * $campaignCriterionServiceClient->close(); + * } + * ``` + * + * @param string $customerId The ID of the customer whose criteria are being modified. + * @param CampaignCriterionOperation[] $operations The list of operations to perform on individual criteria. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Services\MutateCampaignCriteriaResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function mutateCampaignCriteria($customerId, $operations, $optionalArgs = []) + { + $request = new MutateCampaignCriteriaRequest(); + $request->setCustomerId($customerId); + $request->setOperations($operations); + + return $this->startCall( + 'MutateCampaignCriteria', + MutateCampaignCriteriaResponse::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/CampaignServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/CampaignServiceGapicClient.php new file mode 100644 index 000000000..a9cf9ba28 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/CampaignServiceGapicClient.php @@ -0,0 +1,350 @@ +campaignName('[CUSTOMER]', '[CAMPAIGN]'); + * $response = $campaignServiceClient->getCampaign($formattedResourceName); + * } finally { + * $campaignServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class CampaignServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.CampaignService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $campaignNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/campaign_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/campaign_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/campaign_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getCampaignNameTemplate() + { + if (self::$campaignNameTemplate == null) { + self::$campaignNameTemplate = new PathTemplate('customers/{customer}/campaigns/{campaign}'); + } + + return self::$campaignNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'campaign' => self::getCampaignNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a campaign resource. + * + * @param string $customer + * @param string $campaign + * + * @return string The formatted campaign resource. + * @experimental + */ + public static function campaignName($customer, $campaign) + { + return self::getCampaignNameTemplate()->render([ + 'customer' => $customer, + 'campaign' => $campaign, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - campaign: customers/{customer}/campaigns/{campaign}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested campaign in full detail. + * + * Sample code: + * ``` + * $campaignServiceClient = new CampaignServiceClient(); + * try { + * $formattedResourceName = $campaignServiceClient->campaignName('[CUSTOMER]', '[CAMPAIGN]'); + * $response = $campaignServiceClient->getCampaign($formattedResourceName); + * } finally { + * $campaignServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the campaign to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\Campaign + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getCampaign($resourceName, $optionalArgs = []) + { + $request = new GetCampaignRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetCampaign', + Campaign::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Creates, updates, or removes campaigns. Operation statuses are returned. + * + * Sample code: + * ``` + * $campaignServiceClient = new CampaignServiceClient(); + * try { + * $customerId = ''; + * $operations = []; + * $response = $campaignServiceClient->mutateCampaigns($customerId, $operations); + * } finally { + * $campaignServiceClient->close(); + * } + * ``` + * + * @param string $customerId The ID of the customer whose campaigns are being modified. + * @param CampaignOperation[] $operations The list of operations to perform on individual campaigns. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Services\MutateCampaignsResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function mutateCampaigns($customerId, $operations, $optionalArgs = []) + { + $request = new MutateCampaignsRequest(); + $request->setCustomerId($customerId); + $request->setOperations($operations); + + return $this->startCall( + 'MutateCampaigns', + MutateCampaignsResponse::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/CustomerServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/CustomerServiceGapicClient.php new file mode 100644 index 000000000..e0ec33219 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/CustomerServiceGapicClient.php @@ -0,0 +1,299 @@ +customerName('[CUSTOMER]'); + * $response = $customerServiceClient->getCustomer($formattedResourceName); + * } finally { + * $customerServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class CustomerServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.CustomerService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $customerNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/customer_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/customer_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/customer_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getCustomerNameTemplate() + { + if (self::$customerNameTemplate == null) { + self::$customerNameTemplate = new PathTemplate('customers/{customer}'); + } + + return self::$customerNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'customer' => self::getCustomerNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a customer resource. + * + * @param string $customer + * + * @return string The formatted customer resource. + * @experimental + */ + public static function customerName($customer) + { + return self::getCustomerNameTemplate()->render([ + 'customer' => $customer, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - customer: customers/{customer}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested customer in full detail. + * + * Sample code: + * ``` + * $customerServiceClient = new CustomerServiceClient(); + * try { + * $formattedResourceName = $customerServiceClient->customerName('[CUSTOMER]'); + * $response = $customerServiceClient->getCustomer($formattedResourceName); + * } finally { + * $customerServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the customer to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\Customer + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getCustomer($resourceName, $optionalArgs = []) + { + $request = new GetCustomerRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetCustomer', + Customer::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/GeoTargetConstantServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/GeoTargetConstantServiceGapicClient.php new file mode 100644 index 000000000..339e5fa12 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/GeoTargetConstantServiceGapicClient.php @@ -0,0 +1,299 @@ +geoTargetConstantName('[GEO_TARGET_CONSTANT]'); + * $response = $geoTargetConstantServiceClient->getGeoTargetConstant($formattedResourceName); + * } finally { + * $geoTargetConstantServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class GeoTargetConstantServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.GeoTargetConstantService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $geoTargetConstantNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/geo_target_constant_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/geo_target_constant_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/geo_target_constant_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getGeoTargetConstantNameTemplate() + { + if (self::$geoTargetConstantNameTemplate == null) { + self::$geoTargetConstantNameTemplate = new PathTemplate('geoTargetConstants/{geo_target_constant}'); + } + + return self::$geoTargetConstantNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'geoTargetConstant' => self::getGeoTargetConstantNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a geo_target_constant resource. + * + * @param string $geoTargetConstant + * + * @return string The formatted geo_target_constant resource. + * @experimental + */ + public static function geoTargetConstantName($geoTargetConstant) + { + return self::getGeoTargetConstantNameTemplate()->render([ + 'geo_target_constant' => $geoTargetConstant, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - geoTargetConstant: geoTargetConstants/{geo_target_constant}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested geo target constant in full detail. + * + * Sample code: + * ``` + * $geoTargetConstantServiceClient = new GeoTargetConstantServiceClient(); + * try { + * $formattedResourceName = $geoTargetConstantServiceClient->geoTargetConstantName('[GEO_TARGET_CONSTANT]'); + * $response = $geoTargetConstantServiceClient->getGeoTargetConstant($formattedResourceName); + * } finally { + * $geoTargetConstantServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the geo target constant to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\GeoTargetConstant + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getGeoTargetConstant($resourceName, $optionalArgs = []) + { + $request = new GetGeoTargetConstantRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetGeoTargetConstant', + GeoTargetConstant::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/GoogleAdsFieldServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/GoogleAdsFieldServiceGapicClient.php new file mode 100644 index 000000000..d0d57aaef --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/GoogleAdsFieldServiceGapicClient.php @@ -0,0 +1,371 @@ +googleAdsFieldName('[GOOGLE_ADS_FIELD]'); + * $response = $googleAdsFieldServiceClient->getGoogleAdsField($formattedResourceName); + * } finally { + * $googleAdsFieldServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class GoogleAdsFieldServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.GoogleAdsFieldService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $googleAdsFieldNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/google_ads_field_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/google_ads_field_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/google_ads_field_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getGoogleAdsFieldNameTemplate() + { + if (self::$googleAdsFieldNameTemplate == null) { + self::$googleAdsFieldNameTemplate = new PathTemplate('googleAdsFields/{google_ads_field}'); + } + + return self::$googleAdsFieldNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'googleAdsField' => self::getGoogleAdsFieldNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a google_ads_field resource. + * + * @param string $googleAdsField + * + * @return string The formatted google_ads_field resource. + * @experimental + */ + public static function googleAdsFieldName($googleAdsField) + { + return self::getGoogleAdsFieldNameTemplate()->render([ + 'google_ads_field' => $googleAdsField, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - googleAdsField: googleAdsFields/{google_ads_field}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns just the requested field. + * + * Sample code: + * ``` + * $googleAdsFieldServiceClient = new GoogleAdsFieldServiceClient(); + * try { + * $formattedResourceName = $googleAdsFieldServiceClient->googleAdsFieldName('[GOOGLE_ADS_FIELD]'); + * $response = $googleAdsFieldServiceClient->getGoogleAdsField($formattedResourceName); + * } finally { + * $googleAdsFieldServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the field to get. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\GoogleAdsField + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getGoogleAdsField($resourceName, $optionalArgs = []) + { + $request = new GetGoogleAdsFieldRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetGoogleAdsField', + GoogleAdsField::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Returns all fields that match the search query. + * + * Sample code: + * ``` + * $googleAdsFieldServiceClient = new GoogleAdsFieldServiceClient(); + * try { + * $query = ''; + * // Iterate through all elements + * $pagedResponse = $googleAdsFieldServiceClient->searchGoogleAdsFields($query); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * + * // OR iterate over pages of elements + * $pagedResponse = $googleAdsFieldServiceClient->searchGoogleAdsFields($query); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * } finally { + * $googleAdsFieldServiceClient->close(); + * } + * ``` + * + * @param string $query The query string. + * @param array $optionalArgs { + * Optional. + * + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function searchGoogleAdsFields($query, $optionalArgs = []) + { + $request = new SearchGoogleAdsFieldsRequest(); + $request->setQuery($query); + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + return $this->getPagedListResponse( + 'SearchGoogleAdsFields', + $optionalArgs, + SearchGoogleAdsFieldsResponse::class, + $request + ); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/GoogleAdsServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/GoogleAdsServiceGapicClient.php new file mode 100644 index 000000000..1e62b2010 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/GoogleAdsServiceGapicClient.php @@ -0,0 +1,257 @@ +search($customerId, $query); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * + * // OR iterate over pages of elements + * $pagedResponse = $googleAdsServiceClient->search($customerId, $query); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * } finally { + * $googleAdsServiceClient->close(); + * } + * ``` + * + * @experimental + */ +class GoogleAdsServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.GoogleAdsService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/google_ads_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/google_ads_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/google_ads_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns all rows that match the search query. + * + * Sample code: + * ``` + * $googleAdsServiceClient = new GoogleAdsServiceClient(); + * try { + * $customerId = ''; + * $query = ''; + * // Iterate through all elements + * $pagedResponse = $googleAdsServiceClient->search($customerId, $query); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * + * // OR iterate over pages of elements + * $pagedResponse = $googleAdsServiceClient->search($customerId, $query); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * } finally { + * $googleAdsServiceClient->close(); + * } + * ``` + * + * @param string $customerId The ID of the customer being queried. + * @param string $query The query string. + * @param array $optionalArgs { + * Optional. + * + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function search($customerId, $query, $optionalArgs = []) + { + $request = new SearchGoogleAdsRequest(); + $request->setCustomerId($customerId); + $request->setQuery($query); + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + return $this->getPagedListResponse( + 'Search', + $optionalArgs, + SearchGoogleAdsResponse::class, + $request + ); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/KeywordViewServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/KeywordViewServiceGapicClient.php new file mode 100644 index 000000000..5fc45cd0b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/KeywordViewServiceGapicClient.php @@ -0,0 +1,301 @@ +keywordViewName('[CUSTOMER]', '[KEYWORD_VIEW]'); + * $response = $keywordViewServiceClient->getKeywordView($formattedResourceName); + * } finally { + * $keywordViewServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class KeywordViewServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.KeywordViewService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $keywordViewNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/keyword_view_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/keyword_view_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/keyword_view_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getKeywordViewNameTemplate() + { + if (self::$keywordViewNameTemplate == null) { + self::$keywordViewNameTemplate = new PathTemplate('customers/{customer}/keywordViews/{keyword_view}'); + } + + return self::$keywordViewNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'keywordView' => self::getKeywordViewNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a keyword_view resource. + * + * @param string $customer + * @param string $keywordView + * + * @return string The formatted keyword_view resource. + * @experimental + */ + public static function keywordViewName($customer, $keywordView) + { + return self::getKeywordViewNameTemplate()->render([ + 'customer' => $customer, + 'keyword_view' => $keywordView, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - keywordView: customers/{customer}/keywordViews/{keyword_view}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested keyword view in full detail. + * + * Sample code: + * ``` + * $keywordViewServiceClient = new KeywordViewServiceClient(); + * try { + * $formattedResourceName = $keywordViewServiceClient->keywordViewName('[CUSTOMER]', '[KEYWORD_VIEW]'); + * $response = $keywordViewServiceClient->getKeywordView($formattedResourceName); + * } finally { + * $keywordViewServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the keyword view to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\KeywordView + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getKeywordView($resourceName, $optionalArgs = []) + { + $request = new GetKeywordViewRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetKeywordView', + KeywordView::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/Gapic/RecommendationServiceGapicClient.php b/src/Google/Ads/GoogleAds/V0/Services/Gapic/RecommendationServiceGapicClient.php new file mode 100644 index 000000000..c8d4210c5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/Gapic/RecommendationServiceGapicClient.php @@ -0,0 +1,350 @@ +recommendationName('[CUSTOMER]', '[RECOMMENDATION]'); + * $response = $recommendationServiceClient->getRecommendation($formattedResourceName); + * } finally { + * $recommendationServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To assist + * with these names, this class includes a format method for each type of name, and additionally + * a parseName method to extract the individual identifiers contained within formatted names + * that are returned by the API. + * + * @experimental + */ +class RecommendationServiceGapicClient +{ + use GapicClientTrait; + + /** + * The name of the service. + */ + const SERVICE_NAME = 'google.ads.googleads.v0.services.RecommendationService'; + + /** + * The default address of the service. + */ + const SERVICE_ADDRESS = 'googleads.googleapis.com'; + + /** + * The default port of the service. + */ + const DEFAULT_SERVICE_PORT = 443; + + /** + * The name of the code generator, to be included in the agent header. + */ + const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + */ + public static $serviceScopes = [ + ]; + private static $recommendationNameTemplate; + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'serviceAddress' => self::SERVICE_ADDRESS.':'.self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__.'/../resources/recommendation_service_client_config.json', + 'descriptorsConfigPath' => __DIR__.'/../resources/recommendation_service_descriptor_config.php', + 'credentialsConfig' => [ + 'scopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__.'/../resources/recommendation_service_rest_client_config.php', + ], + ], + 'versionFile' => __DIR__.'/../../../VERSION', + ]; + } + + private static function getRecommendationNameTemplate() + { + if (self::$recommendationNameTemplate == null) { + self::$recommendationNameTemplate = new PathTemplate('customers/{customer}/recommendations/{recommendation}'); + } + + return self::$recommendationNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'recommendation' => self::getRecommendationNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent + * a recommendation resource. + * + * @param string $customer + * @param string $recommendation + * + * @return string The formatted recommendation resource. + * @experimental + */ + public static function recommendationName($customer, $recommendation) + { + return self::getRecommendationNameTemplate()->render([ + 'customer' => $customer, + 'recommendation' => $recommendation, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - recommendation: customers/{customer}/recommendations/{recommendation}. + * + * The optional $template argument can be supplied to specify a particular pattern, and must + * match one of the templates listed above. If no $template argument is provided, or if the + * $template argument does not match one of the templates listed, then parseName will check + * each of the supported templates, and return the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $serviceAddress + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'googleads.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the client. + * For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()}. + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either a + * path to a JSON file, or a PHP array containing the decoded JSON data. + * By default this settings points to the default client config file, which is provided + * in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string `rest` + * or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already instantiated + * {@see \Google\ApiCore\Transport\TransportInterface} object. Note that when this + * object is provided, any settings in $transportConfig, and any $serviceAddress + * setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...] + * ]; + * See the {@see \Google\Cloud\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\Cloud\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * } + * + * @throws ValidationException + * @experimental + */ + public function __construct($options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns the requested recommendation in full detail. + * + * Sample code: + * ``` + * $recommendationServiceClient = new RecommendationServiceClient(); + * try { + * $formattedResourceName = $recommendationServiceClient->recommendationName('[CUSTOMER]', '[RECOMMENDATION]'); + * $response = $recommendationServiceClient->getRecommendation($formattedResourceName); + * } finally { + * $recommendationServiceClient->close(); + * } + * ``` + * + * @param string $resourceName The resource name of the recommendation to fetch. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function getRecommendation($resourceName, $optionalArgs = []) + { + $request = new GetRecommendationRequest(); + $request->setResourceName($resourceName); + + return $this->startCall( + 'GetRecommendation', + Recommendation::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Applies given recommendations with corresponding apply parameters. + * + * Sample code: + * ``` + * $recommendationServiceClient = new RecommendationServiceClient(); + * try { + * $customerId = ''; + * $operations = []; + * $response = $recommendationServiceClient->applyRecommendation($customerId, $operations); + * } finally { + * $recommendationServiceClient->close(); + * } + * ``` + * + * @param string $customerId The ID of the customer with the recommendation. + * @param ApplyRecommendationOperation[] $operations The list of operations to apply recommendations. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a + * {@see Google\ApiCore\RetrySettings} object, or an associative array + * of retry settings parameters. See the documentation on + * {@see Google\ApiCore\RetrySettings} for example usage. + * } + * + * @return \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationResponse + * + * @throws ApiException if the remote call fails + * @experimental + */ + public function applyRecommendation($customerId, $operations, $optionalArgs = []) + { + $request = new ApplyRecommendationRequest(); + $request->setCustomerId($customerId); + $request->setOperations($operations); + + return $this->startCall( + 'ApplyRecommendation', + ApplyRecommendationResponse::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/GeoTargetConstantServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/GeoTargetConstantServiceClient.php new file mode 100644 index 000000000..0918c4ac0 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GeoTargetConstantServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.GeoTargetConstantService/GetGeoTargetConstant', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\GeoTargetConstant', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupAdRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupAdRequest.php new file mode 100644 index 000000000..99a931b9f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupAdRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetAdGroupAdRequest + */ +class GetAdGroupAdRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ad to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupAdService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the ad to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the ad to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupBidModifierRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupBidModifierRequest.php new file mode 100644 index 000000000..c20989831 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupBidModifierRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetAdGroupBidModifierRequest + */ +class GetAdGroupBidModifierRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ad group bid modifier to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupBidModifierService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the ad group bid modifier to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the ad group bid modifier to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupCriterionRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupCriterionRequest.php new file mode 100644 index 000000000..6f1e808ca --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupCriterionRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetAdGroupCriterionRequest + */ +class GetAdGroupCriterionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the criterion to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupCriterionService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the criterion to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the criterion to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupRequest.php new file mode 100644 index 000000000..c65d23bb6 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetAdGroupRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetAdGroupRequest + */ +class GetAdGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ad group to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the ad group to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the ad group to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetBiddingStrategyRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetBiddingStrategyRequest.php new file mode 100644 index 000000000..26b0c061e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetBiddingStrategyRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetBiddingStrategyRequest + */ +class GetBiddingStrategyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the bidding strategy to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\BiddingStrategyService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the bidding strategy to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the bidding strategy to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetCampaignBudgetRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetCampaignBudgetRequest.php new file mode 100644 index 000000000..d817b76f1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetCampaignBudgetRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetCampaignBudgetRequest + */ +class GetCampaignBudgetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the campaign budget to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignBudgetService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the campaign budget to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the campaign budget to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetCampaignCriterionRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetCampaignCriterionRequest.php new file mode 100644 index 000000000..4178702de --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetCampaignCriterionRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetCampaignCriterionRequest + */ +class GetCampaignCriterionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the criterion to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignCriterionService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the criterion to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the criterion to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetCampaignRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetCampaignRequest.php new file mode 100644 index 000000000..224870169 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetCampaignRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetCampaignRequest + */ +class GetCampaignRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the campaign to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the campaign to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the campaign to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetCustomerRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetCustomerRequest.php new file mode 100644 index 000000000..f080582bb --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetCustomerRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetCustomerRequest + */ +class GetCustomerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the customer to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CustomerService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the customer to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the customer to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetGeoTargetConstantRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetGeoTargetConstantRequest.php new file mode 100644 index 000000000..3f7ed6a69 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetGeoTargetConstantRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetGeoTargetConstantRequest + */ +class GetGeoTargetConstantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the geo target constant to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\GeoTargetConstantService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the geo target constant to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the geo target constant to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetGoogleAdsFieldRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetGoogleAdsFieldRequest.php new file mode 100644 index 000000000..6d654925f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetGoogleAdsFieldRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetGoogleAdsFieldRequest + */ +class GetGoogleAdsFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the field to get. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\GoogleAdsFieldService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the field to get. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the field to get. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetKeywordViewRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetKeywordViewRequest.php new file mode 100644 index 000000000..cc12bdd60 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetKeywordViewRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetKeywordViewRequest + */ +class GetKeywordViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the keyword view to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\KeywordViewService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the keyword view to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the keyword view to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GetRecommendationRequest.php b/src/Google/Ads/GoogleAds/V0/Services/GetRecommendationRequest.php new file mode 100644 index 000000000..947b289b4 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GetRecommendationRequest.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.GetRecommendationRequest + */ +class GetRecommendationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the recommendation to fetch. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\RecommendationService::initOnce(); + parent::__construct(); + } + + /** + * The resource name of the recommendation to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the recommendation to fetch. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GoogleAdsFieldServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/GoogleAdsFieldServiceClient.php new file mode 100644 index 000000000..f520fc2fc --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GoogleAdsFieldServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.GoogleAdsFieldService/GetGoogleAdsField', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\GoogleAdsField', 'decode'], + $metadata, $options); + } + + /** + * Returns all fields that match the search query. + * @param \Google\Ads\GoogleAds\V0\Services\SearchGoogleAdsFieldsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function SearchGoogleAdsFields(\Google\Ads\GoogleAds\V0\Services\SearchGoogleAdsFieldsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.ads.googleads.v0.services.GoogleAdsFieldService/SearchGoogleAdsFields', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\SearchGoogleAdsFieldsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/GoogleAdsRow.php b/src/Google/Ads/GoogleAds/V0/Services/GoogleAdsRow.php new file mode 100644 index 000000000..80261edd7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GoogleAdsRow.php @@ -0,0 +1,773 @@ +google.ads.googleads.v0.services.GoogleAdsRow + */ +class GoogleAdsRow extends \Google\Protobuf\Internal\Message +{ + /** + * The ad group referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroup ad_group = 3; + */ + private $ad_group = null; + /** + * The ad referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupAd ad_group_ad = 16; + */ + private $ad_group_ad = null; + /** + * The bid modifier referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupBidModifier ad_group_bid_modifier = 24; + */ + private $ad_group_bid_modifier = null; + /** + * The criterion referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion ad_group_criterion = 17; + */ + private $ad_group_criterion = null; + /** + * The bidding strategy referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.BiddingStrategy bidding_strategy = 18; + */ + private $bidding_strategy = null; + /** + * The campaign budget referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignBudget campaign_budget = 19; + */ + private $campaign_budget = null; + /** + * The campaign referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign campaign = 2; + */ + private $campaign = null; + /** + * The campaign criterion referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignCriterion campaign_criterion = 20; + */ + private $campaign_criterion = null; + /** + * The customer referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Customer customer = 1; + */ + private $customer = null; + /** + * The geo target constant referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.GeoTargetConstant geo_target_constant = 23; + */ + private $geo_target_constant = null; + /** + * The keyword view referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.KeywordView keyword_view = 21; + */ + private $keyword_view = null; + /** + * The recommendation referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation recommendation = 22; + */ + private $recommendation = null; + /** + * The metrics. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Metrics metrics = 4; + */ + private $metrics = null; + /** + * Ad network type. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdNetworkTypeEnum.AdNetworkType ad_network_type = 5; + */ + private $ad_network_type = 0; + /** + * Date to which metrics apply. + * YYYY-MM-DD format, e.g., 2018-04-17. + * + * Generated from protobuf field .google.protobuf.StringValue date = 6; + */ + private $date = null; + /** + * Day of the week, e.g., MONDAY. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek day_of_week = 7; + */ + private $day_of_week = 0; + /** + * Platform to which metrics apply. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.DeviceEnum.Device device = 8; + */ + private $device = 0; + /** + * Hour of day as a number between 0 and 23, inclusive. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 9; + */ + private $hour = null; + /** + * Month as represented by the date of the first day of a month. + * + * Generated from protobuf field .google.protobuf.StringValue month = 10; + */ + private $month = null; + /** + * Quarter as represented by the date of the first day of a quarter. + * Uses the calendar year for quarters, + * e.g., the second quarter of 2018 starts on 2018-04-01. + * + * Generated from protobuf field .google.protobuf.StringValue quarter = 12; + */ + private $quarter = null; + /** + * Position of the ad. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.SlotEnum.Slot slot = 13; + */ + private $slot = 0; + /** + * Week as defined as Monday through Sunday, and represented by the date of + * Monday. + * + * Generated from protobuf field .google.protobuf.StringValue week = 14; + */ + private $week = null; + /** + * Year, formatted as yyyy. + * + * Generated from protobuf field .google.protobuf.Int32Value year = 15; + */ + private $year = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\GoogleAdsService::initOnce(); + parent::__construct(); + } + + /** + * The ad group referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroup ad_group = 3; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroup + */ + public function getAdGroup() + { + return $this->ad_group; + } + + /** + * The ad group referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroup ad_group = 3; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroup $var + * @return $this + */ + public function setAdGroup($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroup::class); + $this->ad_group = $var; + + return $this; + } + + /** + * The ad referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupAd ad_group_ad = 16; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupAd + */ + public function getAdGroupAd() + { + return $this->ad_group_ad; + } + + /** + * The ad referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupAd ad_group_ad = 16; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupAd $var + * @return $this + */ + public function setAdGroupAd($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupAd::class); + $this->ad_group_ad = $var; + + return $this; + } + + /** + * The bid modifier referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupBidModifier ad_group_bid_modifier = 24; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier + */ + public function getAdGroupBidModifier() + { + return $this->ad_group_bid_modifier; + } + + /** + * The bid modifier referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupBidModifier ad_group_bid_modifier = 24; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier $var + * @return $this + */ + public function setAdGroupBidModifier($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupBidModifier::class); + $this->ad_group_bid_modifier = $var; + + return $this; + } + + /** + * The criterion referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion ad_group_criterion = 17; + * @return \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion + */ + public function getAdGroupCriterion() + { + return $this->ad_group_criterion; + } + + /** + * The criterion referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.AdGroupCriterion ad_group_criterion = 17; + * @param \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion $var + * @return $this + */ + public function setAdGroupCriterion($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\AdGroupCriterion::class); + $this->ad_group_criterion = $var; + + return $this; + } + + /** + * The bidding strategy referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.BiddingStrategy bidding_strategy = 18; + * @return \Google\Ads\GoogleAds\V0\Resources\BiddingStrategy + */ + public function getBiddingStrategy() + { + return $this->bidding_strategy; + } + + /** + * The bidding strategy referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.BiddingStrategy bidding_strategy = 18; + * @param \Google\Ads\GoogleAds\V0\Resources\BiddingStrategy $var + * @return $this + */ + public function setBiddingStrategy($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\BiddingStrategy::class); + $this->bidding_strategy = $var; + + return $this; + } + + /** + * The campaign budget referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignBudget campaign_budget = 19; + * @return \Google\Ads\GoogleAds\V0\Resources\CampaignBudget + */ + public function getCampaignBudget() + { + return $this->campaign_budget; + } + + /** + * The campaign budget referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignBudget campaign_budget = 19; + * @param \Google\Ads\GoogleAds\V0\Resources\CampaignBudget $var + * @return $this + */ + public function setCampaignBudget($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\CampaignBudget::class); + $this->campaign_budget = $var; + + return $this; + } + + /** + * The campaign referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign campaign = 2; + * @return \Google\Ads\GoogleAds\V0\Resources\Campaign + */ + public function getCampaign() + { + return $this->campaign; + } + + /** + * The campaign referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Campaign campaign = 2; + * @param \Google\Ads\GoogleAds\V0\Resources\Campaign $var + * @return $this + */ + public function setCampaign($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Campaign::class); + $this->campaign = $var; + + return $this; + } + + /** + * The campaign criterion referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignCriterion campaign_criterion = 20; + * @return \Google\Ads\GoogleAds\V0\Resources\CampaignCriterion + */ + public function getCampaignCriterion() + { + return $this->campaign_criterion; + } + + /** + * The campaign criterion referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.CampaignCriterion campaign_criterion = 20; + * @param \Google\Ads\GoogleAds\V0\Resources\CampaignCriterion $var + * @return $this + */ + public function setCampaignCriterion($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\CampaignCriterion::class); + $this->campaign_criterion = $var; + + return $this; + } + + /** + * The customer referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Customer customer = 1; + * @return \Google\Ads\GoogleAds\V0\Resources\Customer + */ + public function getCustomer() + { + return $this->customer; + } + + /** + * The customer referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Customer customer = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\Customer $var + * @return $this + */ + public function setCustomer($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Customer::class); + $this->customer = $var; + + return $this; + } + + /** + * The geo target constant referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.GeoTargetConstant geo_target_constant = 23; + * @return \Google\Ads\GoogleAds\V0\Resources\GeoTargetConstant + */ + public function getGeoTargetConstant() + { + return $this->geo_target_constant; + } + + /** + * The geo target constant referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.GeoTargetConstant geo_target_constant = 23; + * @param \Google\Ads\GoogleAds\V0\Resources\GeoTargetConstant $var + * @return $this + */ + public function setGeoTargetConstant($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\GeoTargetConstant::class); + $this->geo_target_constant = $var; + + return $this; + } + + /** + * The keyword view referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.KeywordView keyword_view = 21; + * @return \Google\Ads\GoogleAds\V0\Resources\KeywordView + */ + public function getKeywordView() + { + return $this->keyword_view; + } + + /** + * The keyword view referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.KeywordView keyword_view = 21; + * @param \Google\Ads\GoogleAds\V0\Resources\KeywordView $var + * @return $this + */ + public function setKeywordView($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\KeywordView::class); + $this->keyword_view = $var; + + return $this; + } + + /** + * The recommendation referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation recommendation = 22; + * @return \Google\Ads\GoogleAds\V0\Resources\Recommendation + */ + public function getRecommendation() + { + return $this->recommendation; + } + + /** + * The recommendation referenced in the query. + * + * Generated from protobuf field .google.ads.googleads.v0.resources.Recommendation recommendation = 22; + * @param \Google\Ads\GoogleAds\V0\Resources\Recommendation $var + * @return $this + */ + public function setRecommendation($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Resources\Recommendation::class); + $this->recommendation = $var; + + return $this; + } + + /** + * The metrics. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Metrics metrics = 4; + * @return \Google\Ads\GoogleAds\V0\Common\Metrics + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * The metrics. + * + * Generated from protobuf field .google.ads.googleads.v0.common.Metrics metrics = 4; + * @param \Google\Ads\GoogleAds\V0\Common\Metrics $var + * @return $this + */ + public function setMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V0\Common\Metrics::class); + $this->metrics = $var; + + return $this; + } + + /** + * Ad network type. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdNetworkTypeEnum.AdNetworkType ad_network_type = 5; + * @return int + */ + public function getAdNetworkType() + { + return $this->ad_network_type; + } + + /** + * Ad network type. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.AdNetworkTypeEnum.AdNetworkType ad_network_type = 5; + * @param int $var + * @return $this + */ + public function setAdNetworkType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\AdNetworkTypeEnum_AdNetworkType::class); + $this->ad_network_type = $var; + + return $this; + } + + /** + * Date to which metrics apply. + * YYYY-MM-DD format, e.g., 2018-04-17. + * + * Generated from protobuf field .google.protobuf.StringValue date = 6; + * @return \Google\Protobuf\StringValue + */ + public function getDate() + { + return $this->date; + } + + /** + * Date to which metrics apply. + * YYYY-MM-DD format, e.g., 2018-04-17. + * + * Generated from protobuf field .google.protobuf.StringValue date = 6; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setDate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->date = $var; + + return $this; + } + + /** + * Day of the week, e.g., MONDAY. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek day_of_week = 7; + * @return int + */ + public function getDayOfWeek() + { + return $this->day_of_week; + } + + /** + * Day of the week, e.g., MONDAY. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.DayOfWeekEnum.DayOfWeek day_of_week = 7; + * @param int $var + * @return $this + */ + public function setDayOfWeek($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\DayOfWeekEnum_DayOfWeek::class); + $this->day_of_week = $var; + + return $this; + } + + /** + * Platform to which metrics apply. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.DeviceEnum.Device device = 8; + * @return int + */ + public function getDevice() + { + return $this->device; + } + + /** + * Platform to which metrics apply. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.DeviceEnum.Device device = 8; + * @param int $var + * @return $this + */ + public function setDevice($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\DeviceEnum_Device::class); + $this->device = $var; + + return $this; + } + + /** + * Hour of day as a number between 0 and 23, inclusive. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 9; + * @return \Google\Protobuf\Int32Value + */ + public function getHour() + { + return $this->hour; + } + + /** + * Hour of day as a number between 0 and 23, inclusive. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 9; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->hour = $var; + + return $this; + } + + /** + * Month as represented by the date of the first day of a month. + * + * Generated from protobuf field .google.protobuf.StringValue month = 10; + * @return \Google\Protobuf\StringValue + */ + public function getMonth() + { + return $this->month; + } + + /** + * Month as represented by the date of the first day of a month. + * + * Generated from protobuf field .google.protobuf.StringValue month = 10; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setMonth($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->month = $var; + + return $this; + } + + /** + * Quarter as represented by the date of the first day of a quarter. + * Uses the calendar year for quarters, + * e.g., the second quarter of 2018 starts on 2018-04-01. + * + * Generated from protobuf field .google.protobuf.StringValue quarter = 12; + * @return \Google\Protobuf\StringValue + */ + public function getQuarter() + { + return $this->quarter; + } + + /** + * Quarter as represented by the date of the first day of a quarter. + * Uses the calendar year for quarters, + * e.g., the second quarter of 2018 starts on 2018-04-01. + * + * Generated from protobuf field .google.protobuf.StringValue quarter = 12; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setQuarter($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->quarter = $var; + + return $this; + } + + /** + * Position of the ad. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.SlotEnum.Slot slot = 13; + * @return int + */ + public function getSlot() + { + return $this->slot; + } + + /** + * Position of the ad. + * + * Generated from protobuf field .google.ads.googleads.v0.enums.SlotEnum.Slot slot = 13; + * @param int $var + * @return $this + */ + public function setSlot($var) + { + GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V0\Enums\SlotEnum_Slot::class); + $this->slot = $var; + + return $this; + } + + /** + * Week as defined as Monday through Sunday, and represented by the date of + * Monday. + * + * Generated from protobuf field .google.protobuf.StringValue week = 14; + * @return \Google\Protobuf\StringValue + */ + public function getWeek() + { + return $this->week; + } + + /** + * Week as defined as Monday through Sunday, and represented by the date of + * Monday. + * + * Generated from protobuf field .google.protobuf.StringValue week = 14; + * @param \Google\Protobuf\StringValue $var + * @return $this + */ + public function setWeek($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); + $this->week = $var; + + return $this; + } + + /** + * Year, formatted as yyyy. + * + * Generated from protobuf field .google.protobuf.Int32Value year = 15; + * @return \Google\Protobuf\Int32Value + */ + public function getYear() + { + return $this->year; + } + + /** + * Year, formatted as yyyy. + * + * Generated from protobuf field .google.protobuf.Int32Value year = 15; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setYear($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->year = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/GoogleAdsServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/GoogleAdsServiceClient.php new file mode 100644 index 000000000..a74cd5de9 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/GoogleAdsServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.GoogleAdsService/Search', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\SearchGoogleAdsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/KeywordViewServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/KeywordViewServiceClient.php new file mode 100644 index 000000000..ae75857c3 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/KeywordViewServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.KeywordViewService/GetKeywordView', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\KeywordView', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupAdResult.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupAdResult.php new file mode 100644 index 000000000..fafd80bdc --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupAdResult.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateAdGroupAdResult + */ +class MutateAdGroupAdResult extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupAdService::initOnce(); + parent::__construct(); + } + + /** + * The resource name returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupAdsRequest.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupAdsRequest.php new file mode 100644 index 000000000..c2268ee67 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupAdsRequest.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.services.MutateAdGroupAdsRequest + */ +class MutateAdGroupAdsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the customer whose ads are being modified. + * + * Generated from protobuf field string customer_id = 1; + */ + private $customer_id = ''; + /** + * The list of operations to perform on individual ads. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupAdOperation operations = 2; + */ + private $operations; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupAdService::initOnce(); + parent::__construct(); + } + + /** + * The ID of the customer whose ads are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @return string + */ + public function getCustomerId() + { + return $this->customer_id; + } + + /** + * The ID of the customer whose ads are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @param string $var + * @return $this + */ + public function setCustomerId($var) + { + GPBUtil::checkString($var, True); + $this->customer_id = $var; + + return $this; + } + + /** + * The list of operations to perform on individual ads. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupAdOperation operations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperations() + { + return $this->operations; + } + + /** + * The list of operations to perform on individual ads. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupAdOperation operations = 2; + * @param \Google\Ads\GoogleAds\V0\Services\AdGroupAdOperation[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\AdGroupAdOperation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupAdsResponse.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupAdsResponse.php new file mode 100644 index 000000000..0f4a8c46e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupAdsResponse.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateAdGroupAdsResponse + */ +class MutateAdGroupAdsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupAdResult results = 2; + */ + private $results; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupAdService::initOnce(); + parent::__construct(); + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupAdResult results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupAdResult results = 2; + * @param \Google\Ads\GoogleAds\V0\Services\MutateAdGroupAdResult[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\MutateAdGroupAdResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupBidModifierResult.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupBidModifierResult.php new file mode 100644 index 000000000..98f0b14b6 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupBidModifierResult.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateAdGroupBidModifierResult + */ +class MutateAdGroupBidModifierResult extends \Google\Protobuf\Internal\Message +{ + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupBidModifierService::initOnce(); + parent::__construct(); + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupBidModifiersRequest.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupBidModifiersRequest.php new file mode 100644 index 000000000..062321093 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupBidModifiersRequest.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.services.MutateAdGroupBidModifiersRequest + */ +class MutateAdGroupBidModifiersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the customer whose ad group bid modifiers are being modified. + * + * Generated from protobuf field string customer_id = 1; + */ + private $customer_id = ''; + /** + * The list of operations to perform on individual ad group bid modifiers. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupBidModifierOperation operations = 2; + */ + private $operations; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupBidModifierService::initOnce(); + parent::__construct(); + } + + /** + * ID of the customer whose ad group bid modifiers are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @return string + */ + public function getCustomerId() + { + return $this->customer_id; + } + + /** + * ID of the customer whose ad group bid modifiers are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @param string $var + * @return $this + */ + public function setCustomerId($var) + { + GPBUtil::checkString($var, True); + $this->customer_id = $var; + + return $this; + } + + /** + * The list of operations to perform on individual ad group bid modifiers. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupBidModifierOperation operations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperations() + { + return $this->operations; + } + + /** + * The list of operations to perform on individual ad group bid modifiers. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupBidModifierOperation operations = 2; + * @param \Google\Ads\GoogleAds\V0\Services\AdGroupBidModifierOperation[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\AdGroupBidModifierOperation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupBidModifiersResponse.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupBidModifiersResponse.php new file mode 100644 index 000000000..016d039e4 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupBidModifiersResponse.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateAdGroupBidModifiersResponse + */ +class MutateAdGroupBidModifiersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupBidModifierResult results = 2; + */ + private $results; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupBidModifierService::initOnce(); + parent::__construct(); + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupBidModifierResult results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupBidModifierResult results = 2; + * @param \Google\Ads\GoogleAds\V0\Services\MutateAdGroupBidModifierResult[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\MutateAdGroupBidModifierResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupCriteriaRequest.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupCriteriaRequest.php new file mode 100644 index 000000000..36b744ca2 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupCriteriaRequest.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.services.MutateAdGroupCriteriaRequest + */ +class MutateAdGroupCriteriaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the customer whose criteria are being modified. + * + * Generated from protobuf field string customer_id = 1; + */ + private $customer_id = ''; + /** + * The list of operations to perform on individual criteria. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupCriterionOperation operations = 2; + */ + private $operations; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupCriterionService::initOnce(); + parent::__construct(); + } + + /** + * ID of the customer whose criteria are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @return string + */ + public function getCustomerId() + { + return $this->customer_id; + } + + /** + * ID of the customer whose criteria are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @param string $var + * @return $this + */ + public function setCustomerId($var) + { + GPBUtil::checkString($var, True); + $this->customer_id = $var; + + return $this; + } + + /** + * The list of operations to perform on individual criteria. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupCriterionOperation operations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperations() + { + return $this->operations; + } + + /** + * The list of operations to perform on individual criteria. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupCriterionOperation operations = 2; + * @param \Google\Ads\GoogleAds\V0\Services\AdGroupCriterionOperation[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\AdGroupCriterionOperation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupCriteriaResponse.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupCriteriaResponse.php new file mode 100644 index 000000000..ce7587d6e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupCriteriaResponse.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateAdGroupCriteriaResponse + */ +class MutateAdGroupCriteriaResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupCriterionResult results = 2; + */ + private $results; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupCriterionService::initOnce(); + parent::__construct(); + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupCriterionResult results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupCriterionResult results = 2; + * @param \Google\Ads\GoogleAds\V0\Services\MutateAdGroupCriterionResult[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\MutateAdGroupCriterionResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupCriterionResult.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupCriterionResult.php new file mode 100644 index 000000000..1c3da6be8 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupCriterionResult.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateAdGroupCriterionResult + */ +class MutateAdGroupCriterionResult extends \Google\Protobuf\Internal\Message +{ + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupCriterionService::initOnce(); + parent::__construct(); + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupResult.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupResult.php new file mode 100644 index 000000000..7dc06f6aa --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupResult.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateAdGroupResult + */ +class MutateAdGroupResult extends \Google\Protobuf\Internal\Message +{ + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupService::initOnce(); + parent::__construct(); + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupsRequest.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupsRequest.php new file mode 100644 index 000000000..c83a952e7 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupsRequest.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.services.MutateAdGroupsRequest + */ +class MutateAdGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the customer whose ad groups are being modified. + * + * Generated from protobuf field string customer_id = 1; + */ + private $customer_id = ''; + /** + * The list of operations to perform on individual ad groups. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupOperation operations = 2; + */ + private $operations; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupService::initOnce(); + parent::__construct(); + } + + /** + * The ID of the customer whose ad groups are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @return string + */ + public function getCustomerId() + { + return $this->customer_id; + } + + /** + * The ID of the customer whose ad groups are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @param string $var + * @return $this + */ + public function setCustomerId($var) + { + GPBUtil::checkString($var, True); + $this->customer_id = $var; + + return $this; + } + + /** + * The list of operations to perform on individual ad groups. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupOperation operations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperations() + { + return $this->operations; + } + + /** + * The list of operations to perform on individual ad groups. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.AdGroupOperation operations = 2; + * @param \Google\Ads\GoogleAds\V0\Services\AdGroupOperation[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\AdGroupOperation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupsResponse.php b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupsResponse.php new file mode 100644 index 000000000..052191665 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateAdGroupsResponse.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateAdGroupsResponse + */ +class MutateAdGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupResult results = 2; + */ + private $results; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\AdGroupService::initOnce(); + parent::__construct(); + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupResult results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateAdGroupResult results = 2; + * @param \Google\Ads\GoogleAds\V0\Services\MutateAdGroupResult[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\MutateAdGroupResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateBiddingStrategiesRequest.php b/src/Google/Ads/GoogleAds/V0/Services/MutateBiddingStrategiesRequest.php new file mode 100644 index 000000000..b10f1fa05 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateBiddingStrategiesRequest.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.services.MutateBiddingStrategiesRequest + */ +class MutateBiddingStrategiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the customer whose bidding strategies are being modified. + * + * Generated from protobuf field string customer_id = 1; + */ + private $customer_id = ''; + /** + * The list of operations to perform on individual bidding strategies. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.BiddingStrategyOperation operations = 2; + */ + private $operations; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\BiddingStrategyService::initOnce(); + parent::__construct(); + } + + /** + * The ID of the customer whose bidding strategies are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @return string + */ + public function getCustomerId() + { + return $this->customer_id; + } + + /** + * The ID of the customer whose bidding strategies are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @param string $var + * @return $this + */ + public function setCustomerId($var) + { + GPBUtil::checkString($var, True); + $this->customer_id = $var; + + return $this; + } + + /** + * The list of operations to perform on individual bidding strategies. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.BiddingStrategyOperation operations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperations() + { + return $this->operations; + } + + /** + * The list of operations to perform on individual bidding strategies. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.BiddingStrategyOperation operations = 2; + * @param \Google\Ads\GoogleAds\V0\Services\BiddingStrategyOperation[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\BiddingStrategyOperation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateBiddingStrategiesResponse.php b/src/Google/Ads/GoogleAds/V0/Services/MutateBiddingStrategiesResponse.php new file mode 100644 index 000000000..631f501f9 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateBiddingStrategiesResponse.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateBiddingStrategiesResponse + */ +class MutateBiddingStrategiesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateBiddingStrategyResult results = 2; + */ + private $results; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\BiddingStrategyService::initOnce(); + parent::__construct(); + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateBiddingStrategyResult results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateBiddingStrategyResult results = 2; + * @param \Google\Ads\GoogleAds\V0\Services\MutateBiddingStrategyResult[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\MutateBiddingStrategyResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateBiddingStrategyResult.php b/src/Google/Ads/GoogleAds/V0/Services/MutateBiddingStrategyResult.php new file mode 100644 index 000000000..ac28b1ecc --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateBiddingStrategyResult.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateBiddingStrategyResult + */ +class MutateBiddingStrategyResult extends \Google\Protobuf\Internal\Message +{ + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\BiddingStrategyService::initOnce(); + parent::__construct(); + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignBudgetResult.php b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignBudgetResult.php new file mode 100644 index 000000000..455186d41 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignBudgetResult.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateCampaignBudgetResult + */ +class MutateCampaignBudgetResult extends \Google\Protobuf\Internal\Message +{ + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignBudgetService::initOnce(); + parent::__construct(); + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignBudgetsRequest.php b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignBudgetsRequest.php new file mode 100644 index 000000000..278895ab5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignBudgetsRequest.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.services.MutateCampaignBudgetsRequest + */ +class MutateCampaignBudgetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the customer whose campaign budgets are being modified. + * + * Generated from protobuf field string customer_id = 1; + */ + private $customer_id = ''; + /** + * The list of operations to perform on individual campaign budgets. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.CampaignBudgetOperation operations = 2; + */ + private $operations; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignBudgetService::initOnce(); + parent::__construct(); + } + + /** + * The ID of the customer whose campaign budgets are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @return string + */ + public function getCustomerId() + { + return $this->customer_id; + } + + /** + * The ID of the customer whose campaign budgets are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @param string $var + * @return $this + */ + public function setCustomerId($var) + { + GPBUtil::checkString($var, True); + $this->customer_id = $var; + + return $this; + } + + /** + * The list of operations to perform on individual campaign budgets. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.CampaignBudgetOperation operations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperations() + { + return $this->operations; + } + + /** + * The list of operations to perform on individual campaign budgets. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.CampaignBudgetOperation operations = 2; + * @param \Google\Ads\GoogleAds\V0\Services\CampaignBudgetOperation[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\CampaignBudgetOperation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignBudgetsResponse.php b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignBudgetsResponse.php new file mode 100644 index 000000000..d5790b632 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignBudgetsResponse.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateCampaignBudgetsResponse + */ +class MutateCampaignBudgetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateCampaignBudgetResult results = 2; + */ + private $results; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignBudgetService::initOnce(); + parent::__construct(); + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateCampaignBudgetResult results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateCampaignBudgetResult results = 2; + * @param \Google\Ads\GoogleAds\V0\Services\MutateCampaignBudgetResult[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\MutateCampaignBudgetResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignCriteriaRequest.php b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignCriteriaRequest.php new file mode 100644 index 000000000..d966907dd --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignCriteriaRequest.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.services.MutateCampaignCriteriaRequest + */ +class MutateCampaignCriteriaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the customer whose criteria are being modified. + * + * Generated from protobuf field string customer_id = 1; + */ + private $customer_id = ''; + /** + * The list of operations to perform on individual criteria. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.CampaignCriterionOperation operations = 2; + */ + private $operations; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignCriterionService::initOnce(); + parent::__construct(); + } + + /** + * The ID of the customer whose criteria are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @return string + */ + public function getCustomerId() + { + return $this->customer_id; + } + + /** + * The ID of the customer whose criteria are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @param string $var + * @return $this + */ + public function setCustomerId($var) + { + GPBUtil::checkString($var, True); + $this->customer_id = $var; + + return $this; + } + + /** + * The list of operations to perform on individual criteria. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.CampaignCriterionOperation operations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperations() + { + return $this->operations; + } + + /** + * The list of operations to perform on individual criteria. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.CampaignCriterionOperation operations = 2; + * @param \Google\Ads\GoogleAds\V0\Services\CampaignCriterionOperation[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\CampaignCriterionOperation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignCriteriaResponse.php b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignCriteriaResponse.php new file mode 100644 index 000000000..4267515cd --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignCriteriaResponse.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateCampaignCriteriaResponse + */ +class MutateCampaignCriteriaResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateCampaignCriterionResult results = 2; + */ + private $results; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignCriterionService::initOnce(); + parent::__construct(); + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateCampaignCriterionResult results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateCampaignCriterionResult results = 2; + * @param \Google\Ads\GoogleAds\V0\Services\MutateCampaignCriterionResult[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\MutateCampaignCriterionResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignCriterionResult.php b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignCriterionResult.php new file mode 100644 index 000000000..ec3a0b6c8 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignCriterionResult.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateCampaignCriterionResult + */ +class MutateCampaignCriterionResult extends \Google\Protobuf\Internal\Message +{ + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignCriterionService::initOnce(); + parent::__construct(); + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignResult.php b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignResult.php new file mode 100644 index 000000000..f5e37b48e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignResult.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateCampaignResult + */ +class MutateCampaignResult extends \Google\Protobuf\Internal\Message +{ + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + */ + private $resource_name = ''; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignService::initOnce(); + parent::__construct(); + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * Returned for successful operations. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignsRequest.php b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignsRequest.php new file mode 100644 index 000000000..fa4b1417d --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignsRequest.php @@ -0,0 +1,89 @@ +google.ads.googleads.v0.services.MutateCampaignsRequest + */ +class MutateCampaignsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the customer whose campaigns are being modified. + * + * Generated from protobuf field string customer_id = 1; + */ + private $customer_id = ''; + /** + * The list of operations to perform on individual campaigns. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.CampaignOperation operations = 2; + */ + private $operations; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignService::initOnce(); + parent::__construct(); + } + + /** + * The ID of the customer whose campaigns are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @return string + */ + public function getCustomerId() + { + return $this->customer_id; + } + + /** + * The ID of the customer whose campaigns are being modified. + * + * Generated from protobuf field string customer_id = 1; + * @param string $var + * @return $this + */ + public function setCustomerId($var) + { + GPBUtil::checkString($var, True); + $this->customer_id = $var; + + return $this; + } + + /** + * The list of operations to perform on individual campaigns. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.CampaignOperation operations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOperations() + { + return $this->operations; + } + + /** + * The list of operations to perform on individual campaigns. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.CampaignOperation operations = 2; + * @param \Google\Ads\GoogleAds\V0\Services\CampaignOperation[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\CampaignOperation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignsResponse.php b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignsResponse.php new file mode 100644 index 000000000..2eb24bd7f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/MutateCampaignsResponse.php @@ -0,0 +1,57 @@ +google.ads.googleads.v0.services.MutateCampaignsResponse + */ +class MutateCampaignsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateCampaignResult results = 2; + */ + private $results; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\CampaignService::initOnce(); + parent::__construct(); + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateCampaignResult results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * All results for the mutate. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.MutateCampaignResult results = 2; + * @param \Google\Ads\GoogleAds\V0\Services\MutateCampaignResult[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\MutateCampaignResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/RecommendationServiceClient.php b/src/Google/Ads/GoogleAds/V0/Services/RecommendationServiceClient.php new file mode 100644 index 000000000..11b5fa375 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/RecommendationServiceClient.php @@ -0,0 +1,42 @@ +_simpleRequest('/google.ads.googleads.v0.services.RecommendationService/GetRecommendation', + $argument, + ['\Google\Ads\GoogleAds\V0\Resources\Recommendation', 'decode'], + $metadata, $options); + } + + /** + * Applies given recommendations with corresponding apply parameters. + * @param \Google\Ads\GoogleAds\V0\Services\ApplyRecommendationRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + */ + public function ApplyRecommendation(\Google\Ads\GoogleAds\V0\Services\ApplyRecommendationRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.ads.googleads.v0.services.RecommendationService/ApplyRecommendation', + $argument, + ['\Google\Ads\GoogleAds\V0\Services\ApplyRecommendationResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsFieldsRequest.php b/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsFieldsRequest.php new file mode 100644 index 000000000..e3bb33c2b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsFieldsRequest.php @@ -0,0 +1,133 @@ +google.ads.googleads.v0.services.SearchGoogleAdsFieldsRequest + */ +class SearchGoogleAdsFieldsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The query string. + * + * Generated from protobuf field string query = 1; + */ + private $query = ''; + /** + * Token of the page to retrieve. If not specified, the first page of + * results will be returned. Use the value obtained from `next_page_token` + * in the previous response in order to request the next page of results. + * + * Generated from protobuf field string page_token = 2; + */ + private $page_token = ''; + /** + * Number of elements to retrieve in a single page. + * When too large a page is requested, the server may decide to further + * limit the number of returned resources. + * + * Generated from protobuf field int32 page_size = 3; + */ + private $page_size = 0; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\GoogleAdsFieldService::initOnce(); + parent::__construct(); + } + + /** + * The query string. + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * The query string. + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Token of the page to retrieve. If not specified, the first page of + * results will be returned. Use the value obtained from `next_page_token` + * in the previous response in order to request the next page of results. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Token of the page to retrieve. If not specified, the first page of + * results will be returned. Use the value obtained from `next_page_token` + * in the previous response in order to request the next page of results. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Number of elements to retrieve in a single page. + * When too large a page is requested, the server may decide to further + * limit the number of returned resources. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Number of elements to retrieve in a single page. + * When too large a page is requested, the server may decide to further + * limit the number of returned resources. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsFieldsResponse.php b/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsFieldsResponse.php new file mode 100644 index 000000000..e15a39d7f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsFieldsResponse.php @@ -0,0 +1,127 @@ +google.ads.googleads.v0.services.SearchGoogleAdsFieldsResponse + */ +class SearchGoogleAdsFieldsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of fields that matched the query. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.resources.GoogleAdsField results = 1; + */ + private $results; + /** + * Pagination token used to retrieve the next page of results. Pass the + * content of this string as the `page_token` attribute of the next request. + * `next_page_token` is not returned for the last page. + * + * Generated from protobuf field string next_page_token = 2; + */ + private $next_page_token = ''; + /** + * Total number of results that match the query ignoring the LIMIT clause. + * + * Generated from protobuf field int64 total_results_count = 3; + */ + private $total_results_count = 0; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\GoogleAdsFieldService::initOnce(); + parent::__construct(); + } + + /** + * The list of fields that matched the query. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.resources.GoogleAdsField results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * The list of fields that matched the query. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.resources.GoogleAdsField results = 1; + * @param \Google\Ads\GoogleAds\V0\Resources\GoogleAdsField[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Resources\GoogleAdsField::class); + $this->results = $arr; + + return $this; + } + + /** + * Pagination token used to retrieve the next page of results. Pass the + * content of this string as the `page_token` attribute of the next request. + * `next_page_token` is not returned for the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pagination token used to retrieve the next page of results. Pass the + * content of this string as the `page_token` attribute of the next request. + * `next_page_token` is not returned for the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Total number of results that match the query ignoring the LIMIT clause. + * + * Generated from protobuf field int64 total_results_count = 3; + * @return int|string + */ + public function getTotalResultsCount() + { + return $this->total_results_count; + } + + /** + * Total number of results that match the query ignoring the LIMIT clause. + * + * Generated from protobuf field int64 total_results_count = 3; + * @param int|string $var + * @return $this + */ + public function setTotalResultsCount($var) + { + GPBUtil::checkInt64($var); + $this->total_results_count = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsRequest.php b/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsRequest.php new file mode 100644 index 000000000..993b39256 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsRequest.php @@ -0,0 +1,168 @@ +google.ads.googleads.v0.services.SearchGoogleAdsRequest + */ +class SearchGoogleAdsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the customer being queried. + * + * Generated from protobuf field string customer_id = 1; + */ + private $customer_id = ''; + /** + * The query string. + * + * Generated from protobuf field string query = 2; + */ + private $query = ''; + /** + * Token of the page to retrieve. If not specified, the first + * page of results will be returned. Use the value obtained from + * `next_page_token` in the previous response in order to request + * the next page of results. + * + * Generated from protobuf field string page_token = 3; + */ + private $page_token = ''; + /** + * Number of elements to retrieve in a single page. + * When too large a page is requested, the server may decide to + * further limit the number of returned resources. + * + * Generated from protobuf field int32 page_size = 4; + */ + private $page_size = 0; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\GoogleAdsService::initOnce(); + parent::__construct(); + } + + /** + * The ID of the customer being queried. + * + * Generated from protobuf field string customer_id = 1; + * @return string + */ + public function getCustomerId() + { + return $this->customer_id; + } + + /** + * The ID of the customer being queried. + * + * Generated from protobuf field string customer_id = 1; + * @param string $var + * @return $this + */ + public function setCustomerId($var) + { + GPBUtil::checkString($var, True); + $this->customer_id = $var; + + return $this; + } + + /** + * The query string. + * + * Generated from protobuf field string query = 2; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * The query string. + * + * Generated from protobuf field string query = 2; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Token of the page to retrieve. If not specified, the first + * page of results will be returned. Use the value obtained from + * `next_page_token` in the previous response in order to request + * the next page of results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Token of the page to retrieve. If not specified, the first + * page of results will be returned. Use the value obtained from + * `next_page_token` in the previous response in order to request + * the next page of results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Number of elements to retrieve in a single page. + * When too large a page is requested, the server may decide to + * further limit the number of returned resources. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Number of elements to retrieve in a single page. + * When too large a page is requested, the server may decide to + * further limit the number of returned resources. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsResponse.php b/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsResponse.php new file mode 100644 index 000000000..7ac45265e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/SearchGoogleAdsResponse.php @@ -0,0 +1,165 @@ +google.ads.googleads.v0.services.SearchGoogleAdsResponse + */ +class SearchGoogleAdsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of rows that matched the query. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.GoogleAdsRow results = 1; + */ + private $results; + /** + * Pagination token used to retrieve the next page of results. + * Pass the content of this string as the `page_token` attribute of + * the next request. `next_page_token` is not returned for the last + * page. + * + * Generated from protobuf field string next_page_token = 2; + */ + private $next_page_token = ''; + /** + * Total number of results that match the query ignoring the LIMIT + * clause. + * + * Generated from protobuf field int64 total_results_count = 3; + */ + private $total_results_count = 0; + /** + * FieldMask that represents what fields were requested by the user. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 5; + */ + private $field_mask = null; + + public function __construct() { + \GPBMetadata\Google\Ads\GoogleAds\V0\Services\GoogleAdsService::initOnce(); + parent::__construct(); + } + + /** + * The list of rows that matched the query. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.GoogleAdsRow results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * The list of rows that matched the query. + * + * Generated from protobuf field repeated .google.ads.googleads.v0.services.GoogleAdsRow results = 1; + * @param \Google\Ads\GoogleAds\V0\Services\GoogleAdsRow[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V0\Services\GoogleAdsRow::class); + $this->results = $arr; + + return $this; + } + + /** + * Pagination token used to retrieve the next page of results. + * Pass the content of this string as the `page_token` attribute of + * the next request. `next_page_token` is not returned for the last + * page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pagination token used to retrieve the next page of results. + * Pass the content of this string as the `page_token` attribute of + * the next request. `next_page_token` is not returned for the last + * page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Total number of results that match the query ignoring the LIMIT + * clause. + * + * Generated from protobuf field int64 total_results_count = 3; + * @return int|string + */ + public function getTotalResultsCount() + { + return $this->total_results_count; + } + + /** + * Total number of results that match the query ignoring the LIMIT + * clause. + * + * Generated from protobuf field int64 total_results_count = 3; + * @param int|string $var + * @return $this + */ + public function setTotalResultsCount($var) + { + GPBUtil::checkInt64($var); + $this->total_results_count = $var; + + return $this; + } + + /** + * FieldMask that represents what fields were requested by the user. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 5; + * @return \Google\Protobuf\FieldMask + */ + public function getFieldMask() + { + return $this->field_mask; + } + + /** + * FieldMask that represents what fields were requested by the user. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 5; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setFieldMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->field_mask = $var; + + return $this; + } + +} + diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_ad_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_ad_service_client_config.json new file mode 100644 index 000000000..1cd303e5a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_ad_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.AdGroupAdService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetAdGroupAd": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateAdGroupAds": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_ad_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_ad_service_descriptor_config.php new file mode 100644 index 000000000..a63dc42a8 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_ad_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.AdGroupAdService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_ad_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_ad_service_rest_client_config.php new file mode 100644 index 000000000..551fb7e2f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_ad_service_rest_client_config.php @@ -0,0 +1,31 @@ + [ + 'google.ads.googleads.v0.services.AdGroupAdService' => [ + 'GetAdGroupAd' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*/adGroupAds/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + 'MutateAdGroupAds' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/customers/{customer_id=*}/adGroupAds:mutate', + 'body' => '*', + 'placeholders' => [ + 'customer_id' => [ + 'getters' => [ + 'getCustomerId', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_bid_modifier_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_bid_modifier_service_client_config.json new file mode 100644 index 000000000..c4fed0c1d --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_bid_modifier_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.AdGroupBidModifierService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetAdGroupBidModifier": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateAdGroupBidModifiers": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_bid_modifier_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_bid_modifier_service_descriptor_config.php new file mode 100644 index 000000000..88b7c296d --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_bid_modifier_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.AdGroupBidModifierService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_bid_modifier_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_bid_modifier_service_rest_client_config.php new file mode 100644 index 000000000..436be8dc0 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_bid_modifier_service_rest_client_config.php @@ -0,0 +1,31 @@ + [ + 'google.ads.googleads.v0.services.AdGroupBidModifierService' => [ + 'GetAdGroupBidModifier' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*/adGroupBidModifiers/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + 'MutateAdGroupBidModifiers' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/customers/{customer_id=*}/adGroupBidModifiers:mutate', + 'body' => '*', + 'placeholders' => [ + 'customer_id' => [ + 'getters' => [ + 'getCustomerId', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_criterion_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_criterion_service_client_config.json new file mode 100644 index 000000000..2aca664e5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_criterion_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.AdGroupCriterionService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetAdGroupCriterion": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateAdGroupCriteria": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_criterion_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_criterion_service_descriptor_config.php new file mode 100644 index 000000000..df47767ee --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_criterion_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.AdGroupCriterionService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_criterion_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_criterion_service_rest_client_config.php new file mode 100644 index 000000000..9cc7faf61 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_criterion_service_rest_client_config.php @@ -0,0 +1,31 @@ + [ + 'google.ads.googleads.v0.services.AdGroupCriterionService' => [ + 'GetAdGroupCriterion' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*/adGroupCriteria/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + 'MutateAdGroupCriteria' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/customers/{customer_id=*}/adGroupCriteria:mutate', + 'body' => '*', + 'placeholders' => [ + 'customer_id' => [ + 'getters' => [ + 'getCustomerId', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_service_client_config.json new file mode 100644 index 000000000..6847a8195 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.AdGroupService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetAdGroup": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateAdGroups": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_service_descriptor_config.php new file mode 100644 index 000000000..a053af4b3 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.AdGroupService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_service_rest_client_config.php new file mode 100644 index 000000000..81391f1d0 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/ad_group_service_rest_client_config.php @@ -0,0 +1,31 @@ + [ + 'google.ads.googleads.v0.services.AdGroupService' => [ + 'GetAdGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*/adGroups/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + 'MutateAdGroups' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/customers/{customer_id=*}/adGroups:mutate', + 'body' => '*', + 'placeholders' => [ + 'customer_id' => [ + 'getters' => [ + 'getCustomerId', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/bidding_strategy_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/bidding_strategy_service_client_config.json new file mode 100644 index 000000000..03581bedb --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/bidding_strategy_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.BiddingStrategyService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetBiddingStrategy": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateBiddingStrategies": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/bidding_strategy_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/bidding_strategy_service_descriptor_config.php new file mode 100644 index 000000000..93dd086e0 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/bidding_strategy_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.BiddingStrategyService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/bidding_strategy_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/bidding_strategy_service_rest_client_config.php new file mode 100644 index 000000000..f34865463 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/bidding_strategy_service_rest_client_config.php @@ -0,0 +1,31 @@ + [ + 'google.ads.googleads.v0.services.BiddingStrategyService' => [ + 'GetBiddingStrategy' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*/biddingStrategies/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + 'MutateBiddingStrategies' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/customers/{customer_id=*}/biddingStrategies:mutate', + 'body' => '*', + 'placeholders' => [ + 'customer_id' => [ + 'getters' => [ + 'getCustomerId', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_budget_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_budget_service_client_config.json new file mode 100644 index 000000000..e7d52a320 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_budget_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.CampaignBudgetService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetCampaignBudget": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateCampaignBudgets": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_budget_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_budget_service_descriptor_config.php new file mode 100644 index 000000000..0d42ed370 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_budget_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.CampaignBudgetService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_budget_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_budget_service_rest_client_config.php new file mode 100644 index 000000000..cae1bb1de --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_budget_service_rest_client_config.php @@ -0,0 +1,31 @@ + [ + 'google.ads.googleads.v0.services.CampaignBudgetService' => [ + 'GetCampaignBudget' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*/campaignBudgets/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + 'MutateCampaignBudgets' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/customers/{customer_id=*}/campaignBudgets:mutate', + 'body' => '*', + 'placeholders' => [ + 'customer_id' => [ + 'getters' => [ + 'getCustomerId', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_criterion_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_criterion_service_client_config.json new file mode 100644 index 000000000..b870d1adf --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_criterion_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.CampaignCriterionService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetCampaignCriterion": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateCampaignCriteria": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_criterion_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_criterion_service_descriptor_config.php new file mode 100644 index 000000000..c856b59ab --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_criterion_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.CampaignCriterionService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_criterion_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_criterion_service_rest_client_config.php new file mode 100644 index 000000000..204923938 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_criterion_service_rest_client_config.php @@ -0,0 +1,31 @@ + [ + 'google.ads.googleads.v0.services.CampaignCriterionService' => [ + 'GetCampaignCriterion' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*/campaignCriteria/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + 'MutateCampaignCriteria' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/customers/{customer_id=*}/campaignCriteria:mutate', + 'body' => '*', + 'placeholders' => [ + 'customer_id' => [ + 'getters' => [ + 'getCustomerId', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_service_client_config.json new file mode 100644 index 000000000..add92d30b --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.CampaignService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetCampaign": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "MutateCampaigns": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_service_descriptor_config.php new file mode 100644 index 000000000..642774c17 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.CampaignService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_service_rest_client_config.php new file mode 100644 index 000000000..8cc60f41a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/campaign_service_rest_client_config.php @@ -0,0 +1,31 @@ + [ + 'google.ads.googleads.v0.services.CampaignService' => [ + 'GetCampaign' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*/campaigns/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + 'MutateCampaigns' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/customers/{customer_id=*}/campaigns:mutate', + 'body' => '*', + 'placeholders' => [ + 'customer_id' => [ + 'getters' => [ + 'getCustomerId', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/customer_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/customer_service_client_config.json new file mode 100644 index 000000000..1575891ca --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/customer_service_client_config.json @@ -0,0 +1,31 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.CustomerService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetCustomer": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/customer_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/customer_service_descriptor_config.php new file mode 100644 index 000000000..9355f7272 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/customer_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.CustomerService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/customer_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/customer_service_rest_client_config.php new file mode 100644 index 000000000..2ffb9be6a --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/customer_service_rest_client_config.php @@ -0,0 +1,19 @@ + [ + 'google.ads.googleads.v0.services.CustomerService' => [ + 'GetCustomer' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/geo_target_constant_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/geo_target_constant_service_client_config.json new file mode 100644 index 000000000..7b907e0a1 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/geo_target_constant_service_client_config.json @@ -0,0 +1,31 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.GeoTargetConstantService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetGeoTargetConstant": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/geo_target_constant_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/geo_target_constant_service_descriptor_config.php new file mode 100644 index 000000000..a8788ada8 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/geo_target_constant_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.GeoTargetConstantService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/geo_target_constant_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/geo_target_constant_service_rest_client_config.php new file mode 100644 index 000000000..1ae33d78f --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/geo_target_constant_service_rest_client_config.php @@ -0,0 +1,19 @@ + [ + 'google.ads.googleads.v0.services.GeoTargetConstantService' => [ + 'GetGeoTargetConstant' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=geoTargetConstants/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_field_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_field_service_client_config.json new file mode 100644 index 000000000..cc6d14e48 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_field_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.GoogleAdsFieldService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetGoogleAdsField": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "SearchGoogleAdsFields": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_field_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_field_service_descriptor_config.php new file mode 100644 index 000000000..520e74263 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_field_service_descriptor_config.php @@ -0,0 +1,18 @@ + [ + 'google.ads.googleads.v0.services.GoogleAdsFieldService' => [ + 'SearchGoogleAdsFields' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResults', + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_field_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_field_service_rest_client_config.php new file mode 100644 index 000000000..213565f77 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_field_service_rest_client_config.php @@ -0,0 +1,24 @@ + [ + 'google.ads.googleads.v0.services.GoogleAdsFieldService' => [ + 'GetGoogleAdsField' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=googleAdsFields/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + 'SearchGoogleAdsFields' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/googleAdsFields:search', + 'body' => '*', + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_service_client_config.json new file mode 100644 index 000000000..c5405e0e2 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_service_client_config.json @@ -0,0 +1,31 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.GoogleAdsService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "Search": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_service_descriptor_config.php new file mode 100644 index 000000000..e84d96889 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_service_descriptor_config.php @@ -0,0 +1,18 @@ + [ + 'google.ads.googleads.v0.services.GoogleAdsService' => [ + 'Search' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResults', + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_service_rest_client_config.php new file mode 100644 index 000000000..925cc3fb8 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/google_ads_service_rest_client_config.php @@ -0,0 +1,20 @@ + [ + 'google.ads.googleads.v0.services.GoogleAdsService' => [ + 'Search' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/customers/{customer_id=*}/googleAds:search', + 'body' => '*', + 'placeholders' => [ + 'customer_id' => [ + 'getters' => [ + 'getCustomerId', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/keyword_view_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/keyword_view_service_client_config.json new file mode 100644 index 000000000..1a57c17a5 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/keyword_view_service_client_config.json @@ -0,0 +1,31 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.KeywordViewService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetKeywordView": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/keyword_view_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/keyword_view_service_descriptor_config.php new file mode 100644 index 000000000..7929e97cb --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/keyword_view_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.KeywordViewService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/keyword_view_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/keyword_view_service_rest_client_config.php new file mode 100644 index 000000000..c08835e31 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/keyword_view_service_rest_client_config.php @@ -0,0 +1,19 @@ + [ + 'google.ads.googleads.v0.services.KeywordViewService' => [ + 'GetKeywordView' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*/keywordViews/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/recommendation_service_client_config.json b/src/Google/Ads/GoogleAds/V0/Services/resources/recommendation_service_client_config.json new file mode 100644 index 000000000..b485d748c --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/recommendation_service_client_config.json @@ -0,0 +1,36 @@ +{ + "interfaces": { + "google.ads.googleads.v0.services.RecommendationService": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetRecommendation": { + "timeout_millis": 600000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ApplyRecommendation": { + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/recommendation_service_descriptor_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/recommendation_service_descriptor_config.php new file mode 100644 index 000000000..41d56edd2 --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/recommendation_service_descriptor_config.php @@ -0,0 +1,8 @@ + [ + 'google.ads.googleads.v0.services.RecommendationService' => [ + ], + ], +]; diff --git a/src/Google/Ads/GoogleAds/V0/Services/resources/recommendation_service_rest_client_config.php b/src/Google/Ads/GoogleAds/V0/Services/resources/recommendation_service_rest_client_config.php new file mode 100644 index 000000000..b9408e63e --- /dev/null +++ b/src/Google/Ads/GoogleAds/V0/Services/resources/recommendation_service_rest_client_config.php @@ -0,0 +1,31 @@ + [ + 'google.ads.googleads.v0.services.RecommendationService' => [ + 'GetRecommendation' => [ + 'method' => 'get', + 'uriTemplate' => '/v0/{resource_name=customers/*/recommendations/*}', + 'placeholders' => [ + 'resource_name' => [ + 'getters' => [ + 'getResourceName', + ], + ], + ], + ], + 'ApplyRecommendation' => [ + 'method' => 'post', + 'uriTemplate' => '/v0/customers/{customer_id=*}/recommendations:apply', + 'body' => '*', + 'placeholders' => [ + 'customer_id' => [ + 'getters' => [ + 'getCustomerId', + ], + ], + ], + ], + ], + ], +]; diff --git a/tests/Google/Ads/GoogleAds/Lib/ConfigurationLoaderTest.php b/tests/Google/Ads/GoogleAds/Lib/ConfigurationLoaderTest.php new file mode 100644 index 000000000..d5c31c24c --- /dev/null +++ b/tests/Google/Ads/GoogleAds/Lib/ConfigurationLoaderTest.php @@ -0,0 +1,91 @@ +getMockBuilder(EnvironmentalVariables::class) + ->getMock(); + $environmentalVariablesMock + ->method('getHome') + ->willReturn(ConfigurationLoaderTestProvider::getFilePathToFakeHome()); + $this->configurationLoader = + new ConfigurationLoader($environmentalVariablesMock); + } + + /** + * @covers \Google\Ads\GoogleAds\Lib\ConfigurationLoader::fromFile + */ + public function testFromFileFileExists() + { + $config = $this->configurationLoader->fromFile( + ConfigurationLoaderTestProvider::getFilePathForTestIniFile() + ); + $this->assertNotNull($config); + $this->assertInstanceOf(Configuration::class, $config); + } + /** + * @covers \Google\Ads\GoogleAds\Lib\ConfigurationLoader::fromFile + */ + public function testFromFileFileExistsInHome() + { + $config = $this->configurationLoader->fromFile('home_google_ads_php.ini'); + $this->assertNotNull($config); + $this->assertInstanceOf(Configuration::class, $config); + } + /** + * @covers \Google\Ads\GoogleAds\Lib\ConfigurationLoader::fromFile + * @expectedException \InvalidArgumentException + */ + public function testFromFileFileDoesNotExistAnywhere() + { + $this->configurationLoader->fromFile('asdf.ini'); + } + /** + * @covers \Google\Ads\GoogleAds\Lib\ConfigurationLoader::fromString + */ + public function testFromString() + { + $iniString = file_get_contents( + ConfigurationLoaderTestProvider::getFilePathForTestIniFile() + ); + $config = $this->configurationLoader->fromString($iniString); + $this->assertNotNull($config); + $this->assertInstanceOf(Configuration::class, $config); + } +} diff --git a/tests/Google/Ads/GoogleAds/Lib/GoogleAdsClientBuilderTest.php b/tests/Google/Ads/GoogleAds/Lib/GoogleAdsClientBuilderTest.php new file mode 100644 index 000000000..7d2eae06f --- /dev/null +++ b/tests/Google/Ads/GoogleAds/Lib/GoogleAdsClientBuilderTest.php @@ -0,0 +1,180 @@ +googleAdsClientBuilder = new GoogleAdsClientBuilder(); + $this->fetchAuthTokenInterfaceMock = $this + ->getMockBuilder(FetchAuthTokenInterface::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** + * @covers \Google\Ads\GoogleAds\Lib\GoogleAdsClientBuilder::from + * @covers \Google\Ads\GoogleAds\Lib\GoogleAdsClientBuilder::build + */ + public function testBuildClientFromConfiguration() + { + $valueMap = [ + /* Config name, section, value */ + ['developerToken', 'GOOGLE_ADS', 'ABcdeFGH93KL-NOPQ_STUv'], + ['endpoint', 'GOOGLE_ADS', 'https://abc.xyz:443'] + ]; + $configurationMock = $this->getMockBuilder(Configuration::class) + ->disableOriginalConstructor() + ->getMock(); + $configurationMock->expects($this->any()) + ->method('getConfiguration') + ->will($this->returnValueMap($valueMap)); + + $googleAdsClient = $this->googleAdsClientBuilder + ->from($configurationMock) + ->withOAuth2Credential($this->fetchAuthTokenInterfaceMock) + ->build(); + + $this->assertSame( + 'ABcdeFGH93KL-NOPQ_STUv', + $googleAdsClient->getDeveloperToken() + ); + $this->assertSame('https://abc.xyz:443', $googleAdsClient->getEndpoint()); + } + + /** + * @covers \Google\Ads\GoogleAds\Lib\GoogleAdsClientBuilder::from + */ + public function testBuildFromDefaults() + { + $valueMap = [ + ['developerToken', 'GOOGLE_ADS', 'ABcdeFGH93KL-NOPQ_STUv'] + ]; + $configurationMock = $this->getMockBuilder(Configuration::class) + ->disableOriginalConstructor() + ->getMock(); + $configurationMock->expects($this->any()) + ->method('getConfiguration') + ->will($this->returnValueMap($valueMap)); + + $googleAdsClient = $this->googleAdsClientBuilder + ->from($configurationMock) + ->withOAuth2Credential($this->fetchAuthTokenInterfaceMock) + ->build(); + + $this->assertSame( + 'ABcdeFGH93KL-NOPQ_STUv', + $googleAdsClient->getDeveloperToken() + ); + } + + /** + * @covers \Google\Ads\GoogleAds\Lib\GoogleAdsClientBuilder::build + * @expectedException \InvalidArgumentException + */ + public function testBuildFailsWithoutDeveloperToken() + { + $this->googleAdsClientBuilder + ->withOAuth2Credential($this->fetchAuthTokenInterfaceMock) + ->build(); + } + + /** + * @covers \Google\Ads\GoogleAds\Lib\GoogleAdsClientBuilder::build + * @expectedException \InvalidArgumentException + */ + public function testBuildFailsWithInvalidEndpointUrl() + { + $this->googleAdsClientBuilder + ->withDeveloperToken('ABcdeFGH93KL-NOPQ_STUv') + ->withEndpoint('http://:999') + ->withOAuth2Credential($this->fetchAuthTokenInterfaceMock) + ->build(); + } + + /** + * @covers \Google\Ads\GoogleAds\Lib\GoogleAdsClientBuilder::build + * @expectedException \InvalidArgumentException + */ + public function testBuildFailsWithoutOAuth2Credential() + { + $this->googleAdsClientBuilder + ->withDeveloperToken('ABcdeFGH93KL-NOPQ_STUv') + ->build(); + } + + /** + * @covers \Google\Ads\GoogleAds\Lib\GoogleAdsClientBuilder::build + */ + public function testBuild() + { + $googleAdsClient = $this->googleAdsClientBuilder + ->withDeveloperToken('ABcdeFGH93KL-NOPQ_STUv') + ->withEndpoint('abc.xyz.com') + ->withOAuth2Credential($this->fetchAuthTokenInterfaceMock) + ->build(); + + $this->assertSame( + 'ABcdeFGH93KL-NOPQ_STUv', + $googleAdsClient->getDeveloperToken() + ); + $this->assertSame('abc.xyz.com', $googleAdsClient->getEndpoint()); + $this->assertInstanceOf( + FetchAuthTokenInterface::class, + $googleAdsClient->getOAuth2Credential() + ); + } + + /** + * @covers \Google\Ads\GoogleAds\Lib\GoogleAdsClientBuilder::build + */ + public function testBuildDefaults() + { + $googleAdsClient = $this->googleAdsClientBuilder + ->withDeveloperToken('ABcdeFGH93KL-NOPQ_STUv') + ->withOAuth2Credential($this->fetchAuthTokenInterfaceMock) + ->build(); + + $this->assertSame( + 'ABcdeFGH93KL-NOPQ_STUv', + $googleAdsClient->getDeveloperToken() + ); + $this->assertInstanceOf( + FetchAuthTokenInterface::class, + $googleAdsClient->getOAuth2Credential() + ); + } +} diff --git a/tests/Google/Ads/GoogleAds/Lib/OAuth2TokenBuilderTest.php b/tests/Google/Ads/GoogleAds/Lib/OAuth2TokenBuilderTest.php new file mode 100644 index 000000000..e7c5ff4b2 --- /dev/null +++ b/tests/Google/Ads/GoogleAds/Lib/OAuth2TokenBuilderTest.php @@ -0,0 +1,68 @@ +oAuth2TokenBuilder = new OAuth2TokenBuilder(); + } + + /** + * @covers \Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder::build + */ + public function testBuildWithWebOrInstalledAppFlow() + { + $tokenFetcher = $this->oAuth2TokenBuilder + ->withClientId('abcxyz-123.apps.googleusercontent.com') + ->withClientSecret('ABcXyZ-123abc') + ->withRefreshToken('1/AbC-xY123Za-bc') + ->build(); + $this->assertInstanceOf(UserRefreshCredentials::class, $tokenFetcher); + } + + /** + * @covers \Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder::build + * @expectedException \UnexpectedValueException + * @expectedExceptionMessageRegExp /clientId.+clientSecret.+refreshToken.+must be set/ + */ + public function testBuildFailsWhenMissingRequiredValuesForInstAppOrWebFlow() + { + $this->oAuth2TokenBuilder + ->withClientId('abcxyz-123.apps.googleusercontent.com') + ->withClientSecret('ABcXyZ-123abc') + ->build(); + } +} diff --git a/tests/Google/Ads/GoogleAds/Util/FieldMasksTests.php b/tests/Google/Ads/GoogleAds/Util/FieldMasksTests.php new file mode 100644 index 000000000..fc76aab07 --- /dev/null +++ b/tests/Google/Ads/GoogleAds/Util/FieldMasksTests.php @@ -0,0 +1,90 @@ +mergeFromJsonString(FieldMasksTestDataProvider::getJsonTestCases()); + self::$testCases = $testSuite->getTestCases(); + } + return self::$testCases; + } + + /** + * @dataProvider fieldMaskCompareData + */ + public function testFieldMaskCompare($originalResource, $modifiedResource, $expectedFieldMask) + { + $actualFieldMask = FieldMasks::compare($originalResource, $modifiedResource); + $this->assertEquals($expectedFieldMask, $actualFieldMask); + } + + public function fieldMaskCompareData() + { + $testData = []; + foreach (self::loadTestCases() as $testCase) { + $testData[] = [ + $testCase->getOriginalResource(), + $testCase->getModifiedResource(), + $testCase->getExpectedMask() + ]; + } + return $testData; + } + + /** + * @dataProvider fieldMaskAllSetFieldsOfData + */ + public function testFieldMaskAllSetFieldsOf($resource, $expectedFieldMask) + { + $actualFieldMask = FieldMasks::allSetFieldsOf($resource); + $this->assertEquals($expectedFieldMask, $actualFieldMask); + } + + public function fieldMaskAllSetFieldsOfData() + { + $testData = []; + $emptyResource = new Resource(); + foreach (self::loadTestCases() as $testCase) { + $resource = $testCase->getModifiedResource(); + $testData[] = [$resource, FieldMasks::compare($emptyResource, $resource)]; + } + return $testData; + } +} diff --git a/tests/Google/Ads/GoogleAds/Util/ResourceNamesTest.php b/tests/Google/Ads/GoogleAds/Util/ResourceNamesTest.php new file mode 100644 index 000000000..0a73a725d --- /dev/null +++ b/tests/Google/Ads/GoogleAds/Util/ResourceNamesTest.php @@ -0,0 +1,251 @@ +assertEquals( + $expectedResourceName, + ResourceNames::forAdGroup(self::CUSTOMER_ID, $adGroupId) + ); + + $names = AdGroupServiceClient::parseName($expectedResourceName); + $this->assertEquals(self::CUSTOMER_ID, $names['customer']); + $this->assertEquals($adGroupId, $names['ad_group']); + } + + /** + * @covers \Google\Ads\GoogleAds\Util\ResourceNames::forAdGroupAd() + */ + public function testGetNameForAdGroupAd() + { + $adGroupId = 111111; + $adId = 22222; + $expectedResourceName = + sprintf('customers/%s/adGroupAds/%s_%s', self::CUSTOMER_ID, $adGroupId, $adId); + $this->assertEquals( + $expectedResourceName, + ResourceNames::forAdGroupAd(self::CUSTOMER_ID, $adGroupId, $adId) + ); + + $names = AdGroupAdServiceClient::parseName($expectedResourceName); + $this->assertEquals(self::CUSTOMER_ID, $names['customer']); + $this->assertEquals("{$adGroupId}_{$adId}", $names['ad_group_ad']); + } + + /** + * @covers \Google\Ads\GoogleAds\Util\ResourceNames::forAdGroupBidModifier() + */ + public function testGetNameForAdGroupBidModifier() + { + $adGroupId = 111111; + $criterionId = 3333333; + $expectedResourceName = sprintf( + 'customers/%s/adGroupBidModifiers/%s_%s', + self::CUSTOMER_ID, + $adGroupId, + $criterionId + ); + $this->assertEquals( + $expectedResourceName, + ResourceNames::forAdGroupBidModifier(self::CUSTOMER_ID, $adGroupId, $criterionId) + ); + + $names = AdGroupBidModifierServiceClient::parseName($expectedResourceName); + $this->assertEquals(self::CUSTOMER_ID, $names['customer']); + $this->assertEquals("{$adGroupId}_{$criterionId}", $names['ad_group_bid_modifier']); + } + + /** + * @covers \Google\Ads\GoogleAds\Util\ResourceNames::forAdGroupCriterion() + */ + public function testGetNameForAdGroupCriterion() + { + $adGroupId = 111111; + $criterionId = 3333333; + $expectedResourceName = sprintf( + 'customers/%s/adGroupCriteria/%s_%s', + self::CUSTOMER_ID, + $adGroupId, + $criterionId + ); + $this->assertEquals( + $expectedResourceName, + ResourceNames::forAdGroupCriterion(self::CUSTOMER_ID, $adGroupId, $criterionId) + ); + + $names = AdGroupCriterionServiceClient::parseName($expectedResourceName); + $this->assertEquals(self::CUSTOMER_ID, $names['customer']); + $this->assertEquals("{$adGroupId}_{$criterionId}", $names['ad_group_criteria']); + } + + /** + * @covers \Google\Ads\GoogleAds\Util\ResourceNames::forBiddingStrategy() + */ + public function testGetNameForBiddingStrategy() + { + $biddingStrategyId = 4444444; + $expectedResourceName = + sprintf('customers/%s/biddingStrategies/%s', self::CUSTOMER_ID, $biddingStrategyId); + $this->assertEquals( + $expectedResourceName, + ResourceNames::forBiddingStrategy(self::CUSTOMER_ID, $biddingStrategyId) + ); + + $names = BiddingStrategyServiceClient::parseName($expectedResourceName); + $this->assertEquals(self::CUSTOMER_ID, $names['customer']); + $this->assertEquals($biddingStrategyId, $names['bidding_strategy']); + } + + /** + * @covers \Google\Ads\GoogleAds\Util\ResourceNames::forCampaignBudget() + */ + public function testGetNameForCampaignBudget() + { + $budgetId = 555555; + $expectedResourceName = + sprintf('customers/%s/campaignBudgets/%s', self::CUSTOMER_ID, $budgetId); + $this->assertEquals( + $expectedResourceName, + ResourceNames::forCampaignBudget(self::CUSTOMER_ID, $budgetId) + ); + + $names = CampaignBudgetServiceClient::parseName($expectedResourceName); + $this->assertEquals(self::CUSTOMER_ID, $names['customer']); + $this->assertEquals($budgetId, $names['campaign_budget']); + } + + /** + * @covers \Google\Ads\GoogleAds\Util\ResourceNames::forCampaign() + */ + public function testGetNameForCampaign() + { + $campaignId = 66666666; + $expectedResourceName = + sprintf('customers/%s/campaigns/%s', self::CUSTOMER_ID, $campaignId); + $this->assertEquals( + $expectedResourceName, + ResourceNames::forCampaign(self::CUSTOMER_ID, $campaignId) + ); + + $names = CampaignServiceClient::parseName($expectedResourceName); + $this->assertEquals(self::CUSTOMER_ID, $names['customer']); + $this->assertEquals($campaignId, $names['campaign']); + } + + /** + * @covers \Google\Ads\GoogleAds\Util\ResourceNames::forCampaignCriterion() + */ + public function testGetNameForCampaignCriterion() + { + $campaignId = 66666666; + $criterionId = 3333333; + $expectedResourceName = sprintf( + 'customers/%s/campaignCriteria/%s_%s', + self::CUSTOMER_ID, + $campaignId, + $criterionId + ); + $this->assertEquals( + $expectedResourceName, + ResourceNames::forCampaignCriterion(self::CUSTOMER_ID, $campaignId, $criterionId) + ); + + $names = CampaignCriterionServiceClient::parseName($expectedResourceName); + $this->assertEquals(self::CUSTOMER_ID, $names['customer']); + $this->assertEquals("{$campaignId}_{$criterionId}", $names['campaign_criteria']); + } + + /** + * @covers \Google\Ads\GoogleAds\Util\ResourceNames::forCampaign() + */ + public function testGetNameForCustomer() + { + $expectedResourceName = sprintf('customers/%s', self::CUSTOMER_ID); + $this->assertEquals( + $expectedResourceName, + ResourceNames::forCustomer(self::CUSTOMER_ID) + ); + + $names = CustomerServiceClient::parseName($expectedResourceName); + $this->assertEquals(self::CUSTOMER_ID, $names['customer']); + } + + /** + * @covers \Google\Ads\GoogleAds\Util\ResourceNames::forRecommendation() + */ + public function testGetNameForRecommendation() + { + $recommendationId = 'a1b2c3d4'; + $expectedResourceName = + sprintf('customers/%s/recommendations/%s', self::CUSTOMER_ID, $recommendationId); + $this->assertEquals( + $expectedResourceName, + ResourceNames::forRecommendation(self::CUSTOMER_ID, $recommendationId) + ); + + $names = RecommendationServiceClient::parseName($expectedResourceName); + $this->assertEquals(self::CUSTOMER_ID, $names['customer']); + $this->assertEquals($recommendationId, $names['recommendation']); + } + + /** + * @covers \Google\Ads\GoogleAds\Util\ResourceNames::forGeoTargetConstant() + */ + public function testGetNameForGeoTargetConstant() + { + $japanTargetConstantId = 2392; + $expectedResourceName = sprintf('geoTargetConstants/%s', $japanTargetConstantId); + $this->assertEquals( + $expectedResourceName, + ResourceNames::forGeoTargetConstant($japanTargetConstantId) + ); + + $names = GeoTargetConstantServiceClient::parseName($expectedResourceName); + $this->assertEquals($japanTargetConstantId, $names['geo_target_constant']); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/AdGroupAdServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/AdGroupAdServiceClientTest.php new file mode 100644 index 000000000..eff0e00c6 --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/AdGroupAdServiceClientTest.php @@ -0,0 +1,212 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new AdGroupAdServiceClient($options); + } + + /** + * @test + */ + public function getAdGroupAdTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new AdGroupAd(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->adGroupAdName('[CUSTOMER]', '[AD_GROUP_AD]'); + + $response = $client->getAdGroupAd($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.AdGroupAdService/GetAdGroupAd', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getAdGroupAdExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->adGroupAdName('[CUSTOMER]', '[AD_GROUP_AD]'); + + try { + $client->getAdGroupAd($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateAdGroupAdsTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $expectedResponse = new MutateAdGroupAdsResponse(); + $transport->addResponse($expectedResponse); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + $response = $client->mutateAdGroupAds($customerId, $operations); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.AdGroupAdService/MutateAdGroupAds', $actualFuncCall); + + $actualValue = $actualRequestObject->getCustomerId(); + + $this->assertProtobufEquals($customerId, $actualValue); + $actualValue = $actualRequestObject->getOperations(); + + $this->assertProtobufEquals($operations, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateAdGroupAdsExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + try { + $client->mutateAdGroupAds($customerId, $operations); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierServiceClientTest.php new file mode 100644 index 000000000..7875332bb --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/AdGroupBidModifierServiceClientTest.php @@ -0,0 +1,212 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new AdGroupBidModifierServiceClient($options); + } + + /** + * @test + */ + public function getAdGroupBidModifierTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new AdGroupBidModifier(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->adGroupBidModifierName('[CUSTOMER]', '[AD_GROUP_BID_MODIFIER]'); + + $response = $client->getAdGroupBidModifier($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.AdGroupBidModifierService/GetAdGroupBidModifier', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getAdGroupBidModifierExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->adGroupBidModifierName('[CUSTOMER]', '[AD_GROUP_BID_MODIFIER]'); + + try { + $client->getAdGroupBidModifier($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateAdGroupBidModifiersTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $expectedResponse = new MutateAdGroupBidModifiersResponse(); + $transport->addResponse($expectedResponse); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + $response = $client->mutateAdGroupBidModifiers($customerId, $operations); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.AdGroupBidModifierService/MutateAdGroupBidModifiers', $actualFuncCall); + + $actualValue = $actualRequestObject->getCustomerId(); + + $this->assertProtobufEquals($customerId, $actualValue); + $actualValue = $actualRequestObject->getOperations(); + + $this->assertProtobufEquals($operations, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateAdGroupBidModifiersExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + try { + $client->mutateAdGroupBidModifiers($customerId, $operations); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionServiceClientTest.php new file mode 100644 index 000000000..0bf35252e --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/AdGroupCriterionServiceClientTest.php @@ -0,0 +1,212 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new AdGroupCriterionServiceClient($options); + } + + /** + * @test + */ + public function getAdGroupCriterionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new AdGroupCriterion(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->adGroupCriteriaName('[CUSTOMER]', '[AD_GROUP_CRITERIA]'); + + $response = $client->getAdGroupCriterion($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.AdGroupCriterionService/GetAdGroupCriterion', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getAdGroupCriterionExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->adGroupCriteriaName('[CUSTOMER]', '[AD_GROUP_CRITERIA]'); + + try { + $client->getAdGroupCriterion($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateAdGroupCriteriaTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $expectedResponse = new MutateAdGroupCriteriaResponse(); + $transport->addResponse($expectedResponse); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + $response = $client->mutateAdGroupCriteria($customerId, $operations); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.AdGroupCriterionService/MutateAdGroupCriteria', $actualFuncCall); + + $actualValue = $actualRequestObject->getCustomerId(); + + $this->assertProtobufEquals($customerId, $actualValue); + $actualValue = $actualRequestObject->getOperations(); + + $this->assertProtobufEquals($operations, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateAdGroupCriteriaExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + try { + $client->mutateAdGroupCriteria($customerId, $operations); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/AdGroupServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/AdGroupServiceClientTest.php new file mode 100644 index 000000000..603027152 --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/AdGroupServiceClientTest.php @@ -0,0 +1,212 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new AdGroupServiceClient($options); + } + + /** + * @test + */ + public function getAdGroupTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new AdGroup(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->adGroupName('[CUSTOMER]', '[AD_GROUP]'); + + $response = $client->getAdGroup($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.AdGroupService/GetAdGroup', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getAdGroupExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->adGroupName('[CUSTOMER]', '[AD_GROUP]'); + + try { + $client->getAdGroup($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateAdGroupsTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $expectedResponse = new MutateAdGroupsResponse(); + $transport->addResponse($expectedResponse); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + $response = $client->mutateAdGroups($customerId, $operations); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.AdGroupService/MutateAdGroups', $actualFuncCall); + + $actualValue = $actualRequestObject->getCustomerId(); + + $this->assertProtobufEquals($customerId, $actualValue); + $actualValue = $actualRequestObject->getOperations(); + + $this->assertProtobufEquals($operations, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateAdGroupsExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + try { + $client->mutateAdGroups($customerId, $operations); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/BiddingStrategyServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/BiddingStrategyServiceClientTest.php new file mode 100644 index 000000000..427ce44d5 --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/BiddingStrategyServiceClientTest.php @@ -0,0 +1,212 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new BiddingStrategyServiceClient($options); + } + + /** + * @test + */ + public function getBiddingStrategyTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new BiddingStrategy(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->biddingStrategyName('[CUSTOMER]', '[BIDDING_STRATEGY]'); + + $response = $client->getBiddingStrategy($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.BiddingStrategyService/GetBiddingStrategy', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getBiddingStrategyExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->biddingStrategyName('[CUSTOMER]', '[BIDDING_STRATEGY]'); + + try { + $client->getBiddingStrategy($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateBiddingStrategiesTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $expectedResponse = new MutateBiddingStrategiesResponse(); + $transport->addResponse($expectedResponse); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + $response = $client->mutateBiddingStrategies($customerId, $operations); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.BiddingStrategyService/MutateBiddingStrategies', $actualFuncCall); + + $actualValue = $actualRequestObject->getCustomerId(); + + $this->assertProtobufEquals($customerId, $actualValue); + $actualValue = $actualRequestObject->getOperations(); + + $this->assertProtobufEquals($operations, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateBiddingStrategiesExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + try { + $client->mutateBiddingStrategies($customerId, $operations); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/CampaignBudgetServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/CampaignBudgetServiceClientTest.php new file mode 100644 index 000000000..83f830246 --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/CampaignBudgetServiceClientTest.php @@ -0,0 +1,212 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new CampaignBudgetServiceClient($options); + } + + /** + * @test + */ + public function getCampaignBudgetTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new CampaignBudget(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->campaignBudgetName('[CUSTOMER]', '[CAMPAIGN_BUDGET]'); + + $response = $client->getCampaignBudget($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.CampaignBudgetService/GetCampaignBudget', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getCampaignBudgetExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->campaignBudgetName('[CUSTOMER]', '[CAMPAIGN_BUDGET]'); + + try { + $client->getCampaignBudget($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateCampaignBudgetsTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $expectedResponse = new MutateCampaignBudgetsResponse(); + $transport->addResponse($expectedResponse); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + $response = $client->mutateCampaignBudgets($customerId, $operations); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.CampaignBudgetService/MutateCampaignBudgets', $actualFuncCall); + + $actualValue = $actualRequestObject->getCustomerId(); + + $this->assertProtobufEquals($customerId, $actualValue); + $actualValue = $actualRequestObject->getOperations(); + + $this->assertProtobufEquals($operations, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateCampaignBudgetsExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + try { + $client->mutateCampaignBudgets($customerId, $operations); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/CampaignCriterionServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/CampaignCriterionServiceClientTest.php new file mode 100644 index 000000000..d9e313e78 --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/CampaignCriterionServiceClientTest.php @@ -0,0 +1,212 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new CampaignCriterionServiceClient($options); + } + + /** + * @test + */ + public function getCampaignCriterionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new CampaignCriterion(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->campaignCriteriaName('[CUSTOMER]', '[CAMPAIGN_CRITERIA]'); + + $response = $client->getCampaignCriterion($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.CampaignCriterionService/GetCampaignCriterion', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getCampaignCriterionExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->campaignCriteriaName('[CUSTOMER]', '[CAMPAIGN_CRITERIA]'); + + try { + $client->getCampaignCriterion($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateCampaignCriteriaTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $expectedResponse = new MutateCampaignCriteriaResponse(); + $transport->addResponse($expectedResponse); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + $response = $client->mutateCampaignCriteria($customerId, $operations); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.CampaignCriterionService/MutateCampaignCriteria', $actualFuncCall); + + $actualValue = $actualRequestObject->getCustomerId(); + + $this->assertProtobufEquals($customerId, $actualValue); + $actualValue = $actualRequestObject->getOperations(); + + $this->assertProtobufEquals($operations, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateCampaignCriteriaExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + try { + $client->mutateCampaignCriteria($customerId, $operations); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/CampaignServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/CampaignServiceClientTest.php new file mode 100644 index 000000000..66344a82f --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/CampaignServiceClientTest.php @@ -0,0 +1,212 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new CampaignServiceClient($options); + } + + /** + * @test + */ + public function getCampaignTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new Campaign(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->campaignName('[CUSTOMER]', '[CAMPAIGN]'); + + $response = $client->getCampaign($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.CampaignService/GetCampaign', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getCampaignExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->campaignName('[CUSTOMER]', '[CAMPAIGN]'); + + try { + $client->getCampaign($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateCampaignsTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $expectedResponse = new MutateCampaignsResponse(); + $transport->addResponse($expectedResponse); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + $response = $client->mutateCampaigns($customerId, $operations); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.CampaignService/MutateCampaigns', $actualFuncCall); + + $actualValue = $actualRequestObject->getCustomerId(); + + $this->assertProtobufEquals($customerId, $actualValue); + $actualValue = $actualRequestObject->getOperations(); + + $this->assertProtobufEquals($operations, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function mutateCampaignsExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + try { + $client->mutateCampaigns($customerId, $operations); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/CustomerServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/CustomerServiceClientTest.php new file mode 100644 index 000000000..2b18e8e6e --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/CustomerServiceClientTest.php @@ -0,0 +1,135 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new CustomerServiceClient($options); + } + + /** + * @test + */ + public function getCustomerTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new Customer(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->customerName('[CUSTOMER]'); + + $response = $client->getCustomer($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.CustomerService/GetCustomer', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getCustomerExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->customerName('[CUSTOMER]'); + + try { + $client->getCustomer($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/GeoTargetConstantServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/GeoTargetConstantServiceClientTest.php new file mode 100644 index 000000000..49167ded4 --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/GeoTargetConstantServiceClientTest.php @@ -0,0 +1,135 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new GeoTargetConstantServiceClient($options); + } + + /** + * @test + */ + public function getGeoTargetConstantTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new GeoTargetConstant(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->geoTargetConstantName('[GEO_TARGET_CONSTANT]'); + + $response = $client->getGeoTargetConstant($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.GeoTargetConstantService/GetGeoTargetConstant', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getGeoTargetConstantExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->geoTargetConstantName('[GEO_TARGET_CONSTANT]'); + + try { + $client->getGeoTargetConstant($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/GoogleAdsFieldServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/GoogleAdsFieldServiceClientTest.php new file mode 100644 index 000000000..c8c6ca7cb --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/GoogleAdsFieldServiceClientTest.php @@ -0,0 +1,217 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new GoogleAdsFieldServiceClient($options); + } + + /** + * @test + */ + public function getGoogleAdsFieldTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new GoogleAdsField(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->googleAdsFieldName('[GOOGLE_ADS_FIELD]'); + + $response = $client->getGoogleAdsField($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.GoogleAdsFieldService/GetGoogleAdsField', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getGoogleAdsFieldExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->googleAdsFieldName('[GOOGLE_ADS_FIELD]'); + + try { + $client->getGoogleAdsField($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function searchGoogleAdsFieldsTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $nextPageToken = ''; + $totalResultsCount = 43694645; + $resultsElement = new GoogleAdsField(); + $results = [$resultsElement]; + $expectedResponse = new SearchGoogleAdsFieldsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalResultsCount($totalResultsCount); + $expectedResponse->setResults($results); + $transport->addResponse($expectedResponse); + + // Mock request + $query = 'query107944136'; + + $response = $client->searchGoogleAdsFields($query); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); + + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.GoogleAdsFieldService/SearchGoogleAdsFields', $actualFuncCall); + + $actualValue = $actualRequestObject->getQuery(); + + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function searchGoogleAdsFieldsExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $query = 'query107944136'; + + try { + $client->searchGoogleAdsFields($query); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/GoogleAdsServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/GoogleAdsServiceClientTest.php new file mode 100644 index 000000000..40be3e4c6 --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/GoogleAdsServiceClientTest.php @@ -0,0 +1,149 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new GoogleAdsServiceClient($options); + } + + /** + * @test + */ + public function searchTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $nextPageToken = ''; + $totalResultsCount = 43694645; + $resultsElement = new GoogleAdsRow(); + $results = [$resultsElement]; + $expectedResponse = new SearchGoogleAdsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalResultsCount($totalResultsCount); + $expectedResponse->setResults($results); + $transport->addResponse($expectedResponse); + + // Mock request + $customerId = 'customerId-1772061412'; + $query = 'query107944136'; + + $response = $client->search($customerId, $query); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); + + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.GoogleAdsService/Search', $actualFuncCall); + + $actualValue = $actualRequestObject->getCustomerId(); + + $this->assertProtobufEquals($customerId, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function searchExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $customerId = 'customerId-1772061412'; + $query = 'query107944136'; + + try { + $client->search($customerId, $query); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/KeywordViewServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/KeywordViewServiceClientTest.php new file mode 100644 index 000000000..7f36fc5c0 --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/KeywordViewServiceClientTest.php @@ -0,0 +1,135 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new KeywordViewServiceClient($options); + } + + /** + * @test + */ + public function getKeywordViewTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new KeywordView(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->keywordViewName('[CUSTOMER]', '[KEYWORD_VIEW]'); + + $response = $client->getKeywordView($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.KeywordViewService/GetKeywordView', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getKeywordViewExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->keywordViewName('[CUSTOMER]', '[KEYWORD_VIEW]'); + + try { + $client->getKeywordView($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/tests/Google/Ads/GoogleAds/V0/Services/RecommendationServiceClientTest.php b/tests/Google/Ads/GoogleAds/V0/Services/RecommendationServiceClientTest.php new file mode 100644 index 000000000..901415ebc --- /dev/null +++ b/tests/Google/Ads/GoogleAds/V0/Services/RecommendationServiceClientTest.php @@ -0,0 +1,212 @@ + $this->getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(), + ]; + + return new RecommendationServiceClient($options); + } + + /** + * @test + */ + public function getRecommendationTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $resourceName2 = 'resourceName2625949903'; + $expectedResponse = new Recommendation(); + $expectedResponse->setResourceName($resourceName2); + $transport->addResponse($expectedResponse); + + // Mock request + $formattedResourceName = $client->recommendationName('[CUSTOMER]', '[RECOMMENDATION]'); + + $response = $client->getRecommendation($formattedResourceName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.RecommendationService/GetRecommendation', $actualFuncCall); + + $actualValue = $actualRequestObject->getResourceName(); + + $this->assertProtobufEquals($formattedResourceName, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function getRecommendationExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $formattedResourceName = $client->recommendationName('[CUSTOMER]', '[RECOMMENDATION]'); + + try { + $client->getRecommendation($formattedResourceName); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function applyRecommendationTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + // Mock response + $expectedResponse = new ApplyRecommendationResponse(); + $transport->addResponse($expectedResponse); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + $response = $client->applyRecommendation($customerId, $operations); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.googleads.v0.services.RecommendationService/ApplyRecommendation', $actualFuncCall); + + $actualValue = $actualRequestObject->getCustomerId(); + + $this->assertProtobufEquals($customerId, $actualValue); + $actualValue = $actualRequestObject->getOperations(); + + $this->assertProtobufEquals($operations, $actualValue); + + $this->assertTrue($transport->isExhausted()); + } + + /** + * @test + */ + public function applyRecommendationExceptionTest() + { + $transport = $this->createTransport(); + $client = $this->createClient(['transport' => $transport]); + + $this->assertTrue($transport->isExhausted()); + + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + + // Mock request + $customerId = 'customerId-1772061412'; + $operations = []; + + try { + $client->applyRecommendation($customerId, $operations); + // If the $client method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +}