diff --git a/AdsAdManager/metadata/V1/AdReviewCenterAdEnums.php b/AdsAdManager/metadata/V1/AdReviewCenterAdEnums.php new file mode 100644 index 000000000000..026d7dc0a365 Binary files /dev/null and b/AdsAdManager/metadata/V1/AdReviewCenterAdEnums.php differ diff --git a/AdsAdManager/metadata/V1/AdReviewCenterAdMessages.php b/AdsAdManager/metadata/V1/AdReviewCenterAdMessages.php new file mode 100644 index 000000000000..fd0a86d67f9c Binary files /dev/null and b/AdsAdManager/metadata/V1/AdReviewCenterAdMessages.php differ diff --git a/AdsAdManager/metadata/V1/AdReviewCenterAdService.php b/AdsAdManager/metadata/V1/AdReviewCenterAdService.php new file mode 100644 index 000000000000..76edb0b44d45 --- /dev/null +++ b/AdsAdManager/metadata/V1/AdReviewCenterAdService.php @@ -0,0 +1,73 @@ +internalAddGeneratedFile( + ' + +9google/ads/admanager/v1/ad_review_center_ad_service.protogoogle.ads.admanager.v1:google/ads/admanager/v1/ad_review_center_ad_messages.protogoogle/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/longrunning/operations.protogoogle/rpc/status.protogoogle/type/interval.proto" +SearchAdReviewCenterAdsRequest< +parent ( B,AA& +$admanager.googleapis.com/WebProperty + page_size (BA + +page_token ( BA_ +status (2J.google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatusBA# +ad_review_center_ad_id ( BA3 +date_time_range ( 2.google.type.IntervalBA + search_text ( BA +buyer_account_id (BA" +SearchAdReviewCenterAdsResponseG +ad_review_center_ads ( 2).google.ads.admanager.v1.AdReviewCenterAd +next_page_token ( " +"BatchAllowAdReviewCenterAdsRequest< +parent ( B,AA& +$admanager.googleapis.com/WebProperty@ +names ( B1AA+ +)admanager.googleapis.com/AdReviewCenterAd"% +#BatchAllowAdReviewCenterAdsResponse" +"BatchBlockAdReviewCenterAdsRequest< +parent ( B,AA& +$admanager.googleapis.com/WebProperty@ +names ( B1AA+ +)admanager.googleapis.com/AdReviewCenterAd"% +#BatchBlockAdReviewCenterAdsResponse" +\'BatchAdReviewCenterAdsOperationMetadatam +failed_requests ( 2T.google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata.FailedRequestsEntryI +FailedRequestsEntry +key (! +value ( 2.google.rpc.Status:82 +AdReviewCenterAdService +SearchAdReviewCenterAds7.google.ads.admanager.v1.SearchAdReviewCenterAdsRequest8.google.ads.admanager.v1.SearchAdReviewCenterAdsResponse"QAparentB@/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:search +BatchAllowAdReviewCenterAds;.google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest.google.longrunning.Operation"AN +#BatchAllowAdReviewCenterAdsResponse\'BatchAdReviewCenterAdsOperationMetadataAparentI"D/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchAllow:* +BatchBlockAdReviewCenterAds;.google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest.google.longrunning.Operation"AN +#BatchBlockAdReviewCenterAdsResponse\'BatchAdReviewCenterAdsOperationMetadataAparentI"D/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchBlock:*GAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BAdReviewCenterAdServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/AdUnitMessages.php b/AdsAdManager/metadata/V1/AdUnitMessages.php index 95e89c3bd8df..489ff1c51ff9 100644 Binary files a/AdsAdManager/metadata/V1/AdUnitMessages.php and b/AdsAdManager/metadata/V1/AdUnitMessages.php differ diff --git a/AdsAdManager/metadata/V1/ApplicationMessages.php b/AdsAdManager/metadata/V1/ApplicationMessages.php new file mode 100644 index 000000000000..fe88e64e0d3e Binary files /dev/null and b/AdsAdManager/metadata/V1/ApplicationMessages.php differ diff --git a/AdsAdManager/metadata/V1/ApplicationService.php b/AdsAdManager/metadata/V1/ApplicationService.php new file mode 100644 index 000000000000..ddc23c18a369 --- /dev/null +++ b/AdsAdManager/metadata/V1/ApplicationService.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' + +1google/ads/admanager/v1/application_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"S +GetApplicationRequest: +name ( B,AA& +$admanager.googleapis.com/Application" +ListApplicationsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListApplicationsResponse: + applications ( 2$.google.ads.admanager.v1.Application +next_page_token (  + +total_size (2 +ApplicationService +GetApplication..google.ads.admanager.v1.GetApplicationRequest$.google.ads.admanager.v1.Application"3Aname&$/v1/{name=networks/*/applications/*} +ListApplications0.google.ads.admanager.v1.ListApplicationsRequest1.google.ads.admanager.v1.ListApplicationsResponse"5Aparent&$/v1/{parent=networks/*}/applicationsGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BApplicationServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/AudienceSegmentMessages.php b/AdsAdManager/metadata/V1/AudienceSegmentMessages.php new file mode 100644 index 000000000000..25bc32d87dc6 Binary files /dev/null and b/AdsAdManager/metadata/V1/AudienceSegmentMessages.php differ diff --git a/AdsAdManager/metadata/V1/AudienceSegmentService.php b/AdsAdManager/metadata/V1/AudienceSegmentService.php new file mode 100644 index 000000000000..b85f6ff8c312 --- /dev/null +++ b/AdsAdManager/metadata/V1/AudienceSegmentService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' + + +6google/ads/admanager/v1/audience_segment_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"[ +GetAudienceSegmentRequest> +name ( B0AA* +(admanager.googleapis.com/AudienceSegment" +ListAudienceSegmentsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListAudienceSegmentsResponseC +audience_segments ( 2(.google.ads.admanager.v1.AudienceSegment +next_page_token (  + +total_size (2 +AudienceSegmentService +GetAudienceSegment2.google.ads.admanager.v1.GetAudienceSegmentRequest(.google.ads.admanager.v1.AudienceSegment"7Aname*(/v1/{name=networks/*/audienceSegments/*} +ListAudienceSegments4.google.ads.admanager.v1.ListAudienceSegmentsRequest5.google.ads.admanager.v1.ListAudienceSegmentsResponse"9Aparent*(/v1/{parent=networks/*}/audienceSegmentsGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BAudienceSegmentServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/BrowserLanguageMessages.php b/AdsAdManager/metadata/V1/BrowserLanguageMessages.php new file mode 100644 index 000000000000..e989c3f1af4e Binary files /dev/null and b/AdsAdManager/metadata/V1/BrowserLanguageMessages.php differ diff --git a/AdsAdManager/metadata/V1/BrowserLanguageService.php b/AdsAdManager/metadata/V1/BrowserLanguageService.php new file mode 100644 index 000000000000..8f0e7d90edc2 --- /dev/null +++ b/AdsAdManager/metadata/V1/BrowserLanguageService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' + + +6google/ads/admanager/v1/browser_language_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"[ +GetBrowserLanguageRequest> +name ( B0AA* +(admanager.googleapis.com/BrowserLanguage" +ListBrowserLanguagesRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListBrowserLanguagesResponseC +browser_languages ( 2(.google.ads.admanager.v1.BrowserLanguage +next_page_token (  + +total_size (2 +BrowserLanguageService +GetBrowserLanguage2.google.ads.admanager.v1.GetBrowserLanguageRequest(.google.ads.admanager.v1.BrowserLanguage"7Aname*(/v1/{name=networks/*/browserLanguages/*} +ListBrowserLanguages4.google.ads.admanager.v1.ListBrowserLanguagesRequest5.google.ads.admanager.v1.ListBrowserLanguagesResponse"9Aparent*(/v1/{parent=networks/*}/browserLanguagesGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BBrowserLanguageServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/BrowserMessages.php b/AdsAdManager/metadata/V1/BrowserMessages.php new file mode 100644 index 000000000000..689b17ad0698 Binary files /dev/null and b/AdsAdManager/metadata/V1/BrowserMessages.php differ diff --git a/AdsAdManager/metadata/V1/BrowserService.php b/AdsAdManager/metadata/V1/BrowserService.php new file mode 100644 index 000000000000..c26523aeb921 --- /dev/null +++ b/AdsAdManager/metadata/V1/BrowserService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' + +-google/ads/admanager/v1/browser_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"K +GetBrowserRequest6 +name ( B(AA" + admanager.googleapis.com/Browser" +ListBrowsersRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA"w +ListBrowsersResponse2 +browsers ( 2 .google.ads.admanager.v1.Browser +next_page_token (  + +total_size (2 +BrowserService + +GetBrowser*.google.ads.admanager.v1.GetBrowserRequest .google.ads.admanager.v1.Browser"/Aname" /v1/{name=networks/*/browsers/*} + ListBrowsers,.google.ads.admanager.v1.ListBrowsersRequest-.google.ads.admanager.v1.ListBrowsersResponse"1Aparent" /v1/{parent=networks/*}/browsersGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BBrowserServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CmsMetadataKeyEnums.php b/AdsAdManager/metadata/V1/CmsMetadataKeyEnums.php new file mode 100644 index 000000000000..b92ec89b6da5 Binary files /dev/null and b/AdsAdManager/metadata/V1/CmsMetadataKeyEnums.php differ diff --git a/AdsAdManager/metadata/V1/CmsMetadataKeyMessages.php b/AdsAdManager/metadata/V1/CmsMetadataKeyMessages.php new file mode 100644 index 000000000000..38e66b95b01f --- /dev/null +++ b/AdsAdManager/metadata/V1/CmsMetadataKeyMessages.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile( + ' + +7google/ads/admanager/v1/cms_metadata_key_messages.protogoogle.ads.admanager.v1google/api/field_behavior.protogoogle/api/resource.proto" +CmsMetadataKey +name ( BA + display_name ( BA[ +status (2F.google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatusBA:A +\'admanager.googleapis.com/CmsMetadataKey:networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}*cmsMetadataKeys2cmsMetadataKeyB +com.google.ads.admanager.v1BCmsMetadataKeyMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CmsMetadataKeyService.php b/AdsAdManager/metadata/V1/CmsMetadataKeyService.php new file mode 100644 index 000000000000..721699b3eb12 --- /dev/null +++ b/AdsAdManager/metadata/V1/CmsMetadataKeyService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' + + +6google/ads/admanager/v1/cms_metadata_key_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"Y +GetCmsMetadataKeyRequest= +name ( B/AA) +\'admanager.googleapis.com/CmsMetadataKey" +ListCmsMetadataKeysRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListCmsMetadataKeysResponseB +cms_metadata_keys ( 2\'.google.ads.admanager.v1.CmsMetadataKey +next_page_token (  + +total_size (2 +CmsMetadataKeyService +GetCmsMetadataKey1.google.ads.admanager.v1.GetCmsMetadataKeyRequest\'.google.ads.admanager.v1.CmsMetadataKey"6Aname)\'/v1/{name=networks/*/cmsMetadataKeys/*} +ListCmsMetadataKeys3.google.ads.admanager.v1.ListCmsMetadataKeysRequest4.google.ads.admanager.v1.ListCmsMetadataKeysResponse"8Aparent)\'/v1/{parent=networks/*}/cmsMetadataKeysGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BCmsMetadataKeyServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CmsMetadataValueEnums.php b/AdsAdManager/metadata/V1/CmsMetadataValueEnums.php new file mode 100644 index 000000000000..840969b87c98 Binary files /dev/null and b/AdsAdManager/metadata/V1/CmsMetadataValueEnums.php differ diff --git a/AdsAdManager/metadata/V1/CmsMetadataValueMessages.php b/AdsAdManager/metadata/V1/CmsMetadataValueMessages.php new file mode 100644 index 000000000000..0185a8494f7b --- /dev/null +++ b/AdsAdManager/metadata/V1/CmsMetadataValueMessages.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' + +9google/ads/admanager/v1/cms_metadata_value_messages.protogoogle.ads.admanager.v1google/api/field_behavior.protogoogle/api/resource.proto" +CmsMetadataValue +name ( BA + display_name ( ? +key ( B2AAA) +\'admanager.googleapis.com/CmsMetadataKey_ +status (2J.google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatusBA:A +)admanager.googleapis.com/CmsMetadataValue>networks/{network_code}/cmsMetadataValues/{cms_metadata_value}*cmsMetadataValues2cmsMetadataValueB +com.google.ads.admanager.v1BCmsMetadataValueMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CmsMetadataValueService.php b/AdsAdManager/metadata/V1/CmsMetadataValueService.php new file mode 100644 index 000000000000..98336d5643f8 --- /dev/null +++ b/AdsAdManager/metadata/V1/CmsMetadataValueService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' + + +8google/ads/admanager/v1/cms_metadata_value_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"] +GetCmsMetadataValueRequest? +name ( B1AA+ +)admanager.googleapis.com/CmsMetadataValue" +ListCmsMetadataValuesRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListCmsMetadataValuesResponseF +cms_metadata_values ( 2).google.ads.admanager.v1.CmsMetadataValue +next_page_token (  + +total_size (2 +CmsMetadataValueService +GetCmsMetadataValue3.google.ads.admanager.v1.GetCmsMetadataValueRequest).google.ads.admanager.v1.CmsMetadataValue"8Aname+)/v1/{name=networks/*/cmsMetadataValues/*} +ListCmsMetadataValues5.google.ads.admanager.v1.ListCmsMetadataValuesRequest6.google.ads.admanager.v1.ListCmsMetadataValuesResponse":Aparent+)/v1/{parent=networks/*}/cmsMetadataValuesGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BCmsMetadataValueServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CompanyMessages.php b/AdsAdManager/metadata/V1/CompanyMessages.php index a313ff5f5d2e..db4a05dd1b68 100644 Binary files a/AdsAdManager/metadata/V1/CompanyMessages.php and b/AdsAdManager/metadata/V1/CompanyMessages.php differ diff --git a/AdsAdManager/metadata/V1/ContactEnums.php b/AdsAdManager/metadata/V1/ContactEnums.php new file mode 100644 index 000000000000..fd1ce0ed2440 Binary files /dev/null and b/AdsAdManager/metadata/V1/ContactEnums.php differ diff --git a/AdsAdManager/metadata/V1/ContactMessages.php b/AdsAdManager/metadata/V1/ContactMessages.php index 8be1d38d661e..78ed321f3221 100644 Binary files a/AdsAdManager/metadata/V1/ContactMessages.php and b/AdsAdManager/metadata/V1/ContactMessages.php differ diff --git a/AdsAdManager/metadata/V1/ContactService.php b/AdsAdManager/metadata/V1/ContactService.php new file mode 100644 index 000000000000..09a3c2da354d --- /dev/null +++ b/AdsAdManager/metadata/V1/ContactService.php @@ -0,0 +1,77 @@ +internalAddGeneratedFile( + ' + +-google/ads/admanager/v1/contact_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto google/protobuf/field_mask.proto"K +GetContactRequest6 +name ( B(AA" + admanager.googleapis.com/Contact" +ListContactsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA"w +ListContactsResponse2 +contacts ( 2 .google.ads.admanager.v1.Contact +next_page_token (  + +total_size (" +CreateContactRequest8 +parent ( B(AA" + admanager.googleapis.com/Network6 +contact ( 2 .google.ads.admanager.v1.ContactBA" +BatchCreateContactsRequest8 +parent ( B(AA" + admanager.googleapis.com/NetworkD +requests ( 2-.google.ads.admanager.v1.CreateContactRequestBA"Q +BatchCreateContactsResponse2 +contacts ( 2 .google.ads.admanager.v1.Contact" +UpdateContactRequest6 +contact ( 2 .google.ads.admanager.v1.ContactBA4 + update_mask ( 2.google.protobuf.FieldMaskBA" +BatchUpdateContactsRequest8 +parent ( B(AA" + admanager.googleapis.com/NetworkD +requests ( 2-.google.ads.admanager.v1.UpdateContactRequestBA"Q +BatchUpdateContactsResponse2 +contacts ( 2 .google.ads.admanager.v1.Contact2 +ContactService + +GetContact*.google.ads.admanager.v1.GetContactRequest .google.ads.admanager.v1.Contact"/Aname" /v1/{name=networks/*/contacts/*} + ListContacts,.google.ads.admanager.v1.ListContactsRequest-.google.ads.admanager.v1.ListContactsResponse"1Aparent" /v1/{parent=networks/*}/contacts + CreateContact-.google.ads.admanager.v1.CreateContactRequest .google.ads.admanager.v1.Contact"BAparent,contact+" /v1/{parent=networks/*}/contacts:contact +BatchCreateContacts3.google.ads.admanager.v1.BatchCreateContactsRequest4.google.ads.admanager.v1.BatchCreateContactsResponse"IAparent,requests1",/v1/{parent=networks/*}/contacts:batchCreate:* + UpdateContact-.google.ads.admanager.v1.UpdateContactRequest .google.ads.admanager.v1.Contact"OAcontact,update_mask32(/v1/{contact.name=networks/*/contacts/*}:contact +BatchUpdateContacts3.google.ads.admanager.v1.BatchUpdateContactsRequest4.google.ads.admanager.v1.BatchUpdateContactsResponse"IAparent,requests1",/v1/{parent=networks/*}/contacts:batchUpdate:*GAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BContactServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ContentBundleMessages.php b/AdsAdManager/metadata/V1/ContentBundleMessages.php new file mode 100644 index 000000000000..55a0c3170b5d --- /dev/null +++ b/AdsAdManager/metadata/V1/ContentBundleMessages.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' + +5google/ads/admanager/v1/content_bundle_messages.protogoogle.ads.admanager.v1google/api/resource.proto" + ContentBundle +name ( BA + display_name ( BA:A +&admanager.googleapis.com/ContentBundle7networks/{network_code}/contentBundles/{content_bundle}*contentBundles2 contentBundleB +com.google.ads.admanager.v1BContentBundleMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ContentBundleService.php b/AdsAdManager/metadata/V1/ContentBundleService.php new file mode 100644 index 000000000000..adf5dc7b0717 --- /dev/null +++ b/AdsAdManager/metadata/V1/ContentBundleService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' + + +4google/ads/admanager/v1/content_bundle_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"W +GetContentBundleRequest< +name ( B.AA( +&admanager.googleapis.com/ContentBundle" +ListContentBundlesRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListContentBundlesResponse? +content_bundles ( 2&.google.ads.admanager.v1.ContentBundle +next_page_token (  + +total_size (2 +ContentBundleService +GetContentBundle0.google.ads.admanager.v1.GetContentBundleRequest&.google.ads.admanager.v1.ContentBundle"5Aname(&/v1/{name=networks/*/contentBundles/*} +ListContentBundles2.google.ads.admanager.v1.ListContentBundlesRequest3.google.ads.admanager.v1.ListContentBundlesResponse"7Aparent(&/v1/{parent=networks/*}/contentBundlesGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BContentBundleServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ContentLabelMessages.php b/AdsAdManager/metadata/V1/ContentLabelMessages.php new file mode 100644 index 000000000000..0521f1d85c43 --- /dev/null +++ b/AdsAdManager/metadata/V1/ContentLabelMessages.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' + +4google/ads/admanager/v1/content_label_messages.protogoogle.ads.admanager.v1google/api/resource.proto" + ContentLabel +name ( BA + display_name ( BA:~A{ +%admanager.googleapis.com/ContentLabel5networks/{network_code}/contentLabels/{content_label}* contentLabels2 contentLabelB +com.google.ads.admanager.v1BContentLabelMessagesProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ContentLabelService.php b/AdsAdManager/metadata/V1/ContentLabelService.php new file mode 100644 index 000000000000..df7e1b24e414 --- /dev/null +++ b/AdsAdManager/metadata/V1/ContentLabelService.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' + +3google/ads/admanager/v1/content_label_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"U +GetContentLabelRequest; +name ( B-AA\' +%admanager.googleapis.com/ContentLabel" +ListContentLabelsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListContentLabelsResponse= +content_labels ( 2%.google.ads.admanager.v1.ContentLabel +next_page_token (  + +total_size (2 +ContentLabelService +GetContentLabel/.google.ads.admanager.v1.GetContentLabelRequest%.google.ads.admanager.v1.ContentLabel"4Aname\'%/v1/{name=networks/*/contentLabels/*} +ListContentLabels1.google.ads.admanager.v1.ListContentLabelsRequest2.google.ads.admanager.v1.ListContentLabelsResponse"6Aparent\'%/v1/{parent=networks/*}/contentLabelsGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BContentLabelServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ContentMessages.php b/AdsAdManager/metadata/V1/ContentMessages.php new file mode 100644 index 000000000000..cfcbe123fffd Binary files /dev/null and b/AdsAdManager/metadata/V1/ContentMessages.php differ diff --git a/AdsAdManager/metadata/V1/ContentService.php b/AdsAdManager/metadata/V1/ContentService.php new file mode 100644 index 000000000000..eeca6246e042 --- /dev/null +++ b/AdsAdManager/metadata/V1/ContentService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' + +-google/ads/admanager/v1/content_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"K +GetContentRequest6 +name ( B(AA" + admanager.googleapis.com/Content" +ListContentRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA"u +ListContentResponse1 +content ( 2 .google.ads.admanager.v1.Content +next_page_token (  + +total_size (2 +ContentService + +GetContent*.google.ads.admanager.v1.GetContentRequest .google.ads.admanager.v1.Content".Aname!/v1/{name=networks/*/content/*} + ListContent+.google.ads.admanager.v1.ListContentRequest,.google.ads.admanager.v1.ListContentResponse"0Aparent!/v1/{parent=networks/*}/contentGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BContentServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CreativeTemplateEnums.php b/AdsAdManager/metadata/V1/CreativeTemplateEnums.php new file mode 100644 index 000000000000..0b86edf03d10 Binary files /dev/null and b/AdsAdManager/metadata/V1/CreativeTemplateEnums.php differ diff --git a/AdsAdManager/metadata/V1/CreativeTemplateMessages.php b/AdsAdManager/metadata/V1/CreativeTemplateMessages.php new file mode 100644 index 000000000000..e3ea8985bcc6 Binary files /dev/null and b/AdsAdManager/metadata/V1/CreativeTemplateMessages.php differ diff --git a/AdsAdManager/metadata/V1/CreativeTemplateService.php b/AdsAdManager/metadata/V1/CreativeTemplateService.php new file mode 100644 index 000000000000..b1eaeae4f9bb --- /dev/null +++ b/AdsAdManager/metadata/V1/CreativeTemplateService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' + + +7google/ads/admanager/v1/creative_template_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"] +GetCreativeTemplateRequest? +name ( B1AA+ +)admanager.googleapis.com/CreativeTemplate" +ListCreativeTemplatesRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListCreativeTemplatesResponseE +creative_templates ( 2).google.ads.admanager.v1.CreativeTemplate +next_page_token (  + +total_size (2 +CreativeTemplateService +GetCreativeTemplate3.google.ads.admanager.v1.GetCreativeTemplateRequest).google.ads.admanager.v1.CreativeTemplate"8Aname+)/v1/{name=networks/*/creativeTemplates/*} +ListCreativeTemplates5.google.ads.admanager.v1.ListCreativeTemplatesRequest6.google.ads.admanager.v1.ListCreativeTemplatesResponse":Aparent+)/v1/{parent=networks/*}/creativeTemplatesGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BCreativeTemplateServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CreativeTemplateVariableUrlTypeEnum.php b/AdsAdManager/metadata/V1/CreativeTemplateVariableUrlTypeEnum.php new file mode 100644 index 000000000000..dfb24a7f4e7a Binary files /dev/null and b/AdsAdManager/metadata/V1/CreativeTemplateVariableUrlTypeEnum.php differ diff --git a/AdsAdManager/metadata/V1/CustomFieldMessages.php b/AdsAdManager/metadata/V1/CustomFieldMessages.php index daa049fb5750..c85001365c67 100644 Binary files a/AdsAdManager/metadata/V1/CustomFieldMessages.php and b/AdsAdManager/metadata/V1/CustomFieldMessages.php differ diff --git a/AdsAdManager/metadata/V1/CustomFieldService.php b/AdsAdManager/metadata/V1/CustomFieldService.php index 8c9b8c9d9860..4e5eb9dbc0d4 100644 --- a/AdsAdManager/metadata/V1/CustomFieldService.php +++ b/AdsAdManager/metadata/V1/CustomFieldService.php @@ -19,10 +19,11 @@ public static function initOnce() { \GPBMetadata\Google\Api\Client::initOnce(); \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); + \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' - -2google/ads/admanager/v1/custom_field_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"S + +2google/ads/admanager/v1/custom_field_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto google/protobuf/field_mask.proto"S GetCustomFieldRequest: name ( B,AA& $admanager.googleapis.com/CustomField" @@ -39,10 +40,47 @@ public static function initOnce() { custom_fields ( 2$.google.ads.admanager.v1.CustomField next_page_token (  -total_size (2 +total_size (" +CreateCustomFieldRequest8 +parent ( B(AA" + admanager.googleapis.com/Network? + custom_field ( 2$.google.ads.admanager.v1.CustomFieldBA" +BatchCreateCustomFieldsRequest8 +parent ( B(AA" + admanager.googleapis.com/NetworkH +requests ( 21.google.ads.admanager.v1.CreateCustomFieldRequestBA"^ +BatchCreateCustomFieldsResponse; + custom_fields ( 2$.google.ads.admanager.v1.CustomField" +UpdateCustomFieldRequest? + custom_field ( 2$.google.ads.admanager.v1.CustomFieldBA4 + update_mask ( 2.google.protobuf.FieldMaskBA" +BatchUpdateCustomFieldsRequest8 +parent ( B(AA" + admanager.googleapis.com/NetworkH +requests ( 21.google.ads.admanager.v1.UpdateCustomFieldRequestBA"^ +BatchUpdateCustomFieldsResponse; + custom_fields ( 2$.google.ads.admanager.v1.CustomField" + BatchActivateCustomFieldsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network; +names ( B,AA& +$admanager.googleapis.com/CustomField"# +!BatchActivateCustomFieldsResponse" +"BatchDeactivateCustomFieldsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network; +names ( B,AA& +$admanager.googleapis.com/CustomField"% +#BatchDeactivateCustomFieldsResponse2 CustomFieldService GetCustomField..google.ads.admanager.v1.GetCustomFieldRequest$.google.ads.admanager.v1.CustomField"3Aname&$/v1/{name=networks/*/customFields/*} -ListCustomFields0.google.ads.admanager.v1.ListCustomFieldsRequest1.google.ads.admanager.v1.ListCustomFieldsResponse"5Aparent&$/v1/{parent=networks/*}/customFieldsGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +ListCustomFields0.google.ads.admanager.v1.ListCustomFieldsRequest1.google.ads.admanager.v1.ListCustomFieldsResponse"5Aparent&$/v1/{parent=networks/*}/customFields +CreateCustomField1.google.ads.admanager.v1.CreateCustomFieldRequest$.google.ads.admanager.v1.CustomField"PAparent,custom_field4"$/v1/{parent=networks/*}/customFields: custom_field +BatchCreateCustomFields7.google.ads.admanager.v1.BatchCreateCustomFieldsRequest8.google.ads.admanager.v1.BatchCreateCustomFieldsResponse"MAparent,requests5"0/v1/{parent=networks/*}/customFields:batchCreate:* +UpdateCustomField1.google.ads.admanager.v1.UpdateCustomFieldRequest$.google.ads.admanager.v1.CustomField"bAcustom_field,update_maskA21/v1/{custom_field.name=networks/*/customFields/*}: custom_field +BatchUpdateCustomFields7.google.ads.admanager.v1.BatchUpdateCustomFieldsRequest8.google.ads.admanager.v1.BatchUpdateCustomFieldsResponse"MAparent,requests5"0/v1/{parent=networks/*}/customFields:batchUpdate:* +BatchActivateCustomFields9.google.ads.admanager.v1.BatchActivateCustomFieldsRequest:.google.ads.admanager.v1.BatchActivateCustomFieldsResponse"LA parent,names7"2/v1/{parent=networks/*}/customFields:batchActivate:* +BatchDeactivateCustomFields;.google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest<.google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse"NA parent,names9"4/v1/{parent=networks/*}/customFields:batchDeactivate:*GAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB com.google.ads.admanager.v1BCustomFieldServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' , true); diff --git a/AdsAdManager/metadata/V1/CustomTargetingKeyMessages.php b/AdsAdManager/metadata/V1/CustomTargetingKeyMessages.php index ea6106a350c7..e4cb0eb2a758 100644 Binary files a/AdsAdManager/metadata/V1/CustomTargetingKeyMessages.php and b/AdsAdManager/metadata/V1/CustomTargetingKeyMessages.php differ diff --git a/AdsAdManager/metadata/V1/CustomTargetingValueMessages.php b/AdsAdManager/metadata/V1/CustomTargetingValueMessages.php index 4a0f5da1286c..d73b7c143679 100644 Binary files a/AdsAdManager/metadata/V1/CustomTargetingValueMessages.php and b/AdsAdManager/metadata/V1/CustomTargetingValueMessages.php differ diff --git a/AdsAdManager/metadata/V1/DeviceCapabilityMessages.php b/AdsAdManager/metadata/V1/DeviceCapabilityMessages.php new file mode 100644 index 000000000000..108185d5b1a5 Binary files /dev/null and b/AdsAdManager/metadata/V1/DeviceCapabilityMessages.php differ diff --git a/AdsAdManager/metadata/V1/DeviceCapabilityService.php b/AdsAdManager/metadata/V1/DeviceCapabilityService.php new file mode 100644 index 000000000000..2d297ec3d9d5 --- /dev/null +++ b/AdsAdManager/metadata/V1/DeviceCapabilityService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' + + +7google/ads/admanager/v1/device_capability_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"] +GetDeviceCapabilityRequest? +name ( B1AA+ +)admanager.googleapis.com/DeviceCapability" +ListDeviceCapabilitiesRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListDeviceCapabilitiesResponseF +device_capabilities ( 2).google.ads.admanager.v1.DeviceCapability +next_page_token (  + +total_size (2 +DeviceCapabilityService +GetDeviceCapability3.google.ads.admanager.v1.GetDeviceCapabilityRequest).google.ads.admanager.v1.DeviceCapability"9Aname,*/v1/{name=networks/*/deviceCapabilities/*} +ListDeviceCapabilities6.google.ads.admanager.v1.ListDeviceCapabilitiesRequest7.google.ads.admanager.v1.ListDeviceCapabilitiesResponse";Aparent,*/v1/{parent=networks/*}/deviceCapabilitiesGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BDeviceCapabilityServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/DeviceManufacturerMessages.php b/AdsAdManager/metadata/V1/DeviceManufacturerMessages.php new file mode 100644 index 000000000000..7b0549f98649 Binary files /dev/null and b/AdsAdManager/metadata/V1/DeviceManufacturerMessages.php differ diff --git a/AdsAdManager/metadata/V1/DeviceManufacturerService.php b/AdsAdManager/metadata/V1/DeviceManufacturerService.php new file mode 100644 index 000000000000..2d08011f3804 --- /dev/null +++ b/AdsAdManager/metadata/V1/DeviceManufacturerService.php @@ -0,0 +1,53 @@ +internalAddGeneratedFile( + ' + + +9google/ads/admanager/v1/device_manufacturer_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"a +GetDeviceManufacturerRequestA +name ( B3AA- ++admanager.googleapis.com/DeviceManufacturer" +ListDeviceManufacturersRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListDeviceManufacturersResponseI +device_manufacturers ( 2+.google.ads.admanager.v1.DeviceManufacturer +next_page_token (  + +total_size (2 +DeviceManufacturerService +GetDeviceManufacturer5.google.ads.admanager.v1.GetDeviceManufacturerRequest+.google.ads.admanager.v1.DeviceManufacturer":Aname-+/v1/{name=networks/*/deviceManufacturers/*} +ListDeviceManufacturers7.google.ads.admanager.v1.ListDeviceManufacturersRequest8.google.ads.admanager.v1.ListDeviceManufacturersResponse"internalAddGeneratedFile( + ' + + +4google/ads/admanager/v1/mobile_carrier_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"W +GetMobileCarrierRequest< +name ( B.AA( +&admanager.googleapis.com/MobileCarrier" +ListMobileCarriersRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListMobileCarriersResponse? +mobile_carriers ( 2&.google.ads.admanager.v1.MobileCarrier +next_page_token (  + +total_size (2 +MobileCarrierService +GetMobileCarrier0.google.ads.admanager.v1.GetMobileCarrierRequest&.google.ads.admanager.v1.MobileCarrier"5Aname(&/v1/{name=networks/*/mobileCarriers/*} +ListMobileCarriers2.google.ads.admanager.v1.ListMobileCarriersRequest3.google.ads.admanager.v1.ListMobileCarriersResponse"7Aparent(&/v1/{parent=networks/*}/mobileCarriersGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BMobileCarrierServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/MobileDeviceMessages.php b/AdsAdManager/metadata/V1/MobileDeviceMessages.php new file mode 100644 index 000000000000..c2111797d1b6 Binary files /dev/null and b/AdsAdManager/metadata/V1/MobileDeviceMessages.php differ diff --git a/AdsAdManager/metadata/V1/MobileDeviceService.php b/AdsAdManager/metadata/V1/MobileDeviceService.php new file mode 100644 index 000000000000..e12095c72b9d --- /dev/null +++ b/AdsAdManager/metadata/V1/MobileDeviceService.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' + +3google/ads/admanager/v1/mobile_device_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"U +GetMobileDeviceRequest; +name ( B-AA\' +%admanager.googleapis.com/MobileDevice" +ListMobileDevicesRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA" +ListMobileDevicesResponse= +mobile_devices ( 2%.google.ads.admanager.v1.MobileDevice +next_page_token (  + +total_size (2 +MobileDeviceService +GetMobileDevice/.google.ads.admanager.v1.GetMobileDeviceRequest%.google.ads.admanager.v1.MobileDevice"4Aname\'%/v1/{name=networks/*/mobileDevices/*} +ListMobileDevices1.google.ads.admanager.v1.ListMobileDevicesRequest2.google.ads.admanager.v1.ListMobileDevicesResponse"6Aparent\'%/v1/{parent=networks/*}/mobileDevicesGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BMobileDeviceServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/MobileDeviceSubmodelMessages.php b/AdsAdManager/metadata/V1/MobileDeviceSubmodelMessages.php new file mode 100644 index 000000000000..f270540437b7 Binary files /dev/null and b/AdsAdManager/metadata/V1/MobileDeviceSubmodelMessages.php differ diff --git a/AdsAdManager/metadata/V1/MobileDeviceSubmodelService.php b/AdsAdManager/metadata/V1/MobileDeviceSubmodelService.php new file mode 100644 index 000000000000..dd8f07de0dd0 --- /dev/null +++ b/AdsAdManager/metadata/V1/MobileDeviceSubmodelService.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' + +Aparent/-/v1/{parent=networks/*}/mobileDeviceSubmodelsGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1B MobileDeviceSubmodelServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/PlacementService.php b/AdsAdManager/metadata/V1/PlacementService.php index ec2a53079648..8fb2beed3f4f 100644 --- a/AdsAdManager/metadata/V1/PlacementService.php +++ b/AdsAdManager/metadata/V1/PlacementService.php @@ -19,10 +19,11 @@ public static function initOnce() { \GPBMetadata\Google\Api\Client::initOnce(); \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); + \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' - -/google/ads/admanager/v1/placement_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"O + +/google/ads/admanager/v1/placement_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto google/protobuf/field_mask.proto"O GetPlacementRequest8 name ( B*AA$ "admanager.googleapis.com/Placement" @@ -40,10 +41,56 @@ public static function initOnce() { placements ( 2".google.ads.admanager.v1.Placement next_page_token (  -total_size (2 +total_size (" +CreatePlacementRequest8 +parent ( B(AA" + admanager.googleapis.com/Network: + placement ( 2".google.ads.admanager.v1.PlacementBA" +BatchCreatePlacementsRequest8 +parent ( B(AA" + admanager.googleapis.com/NetworkF +requests ( 2/.google.ads.admanager.v1.CreatePlacementRequestBA"W +BatchCreatePlacementsResponse6 + +placements ( 2".google.ads.admanager.v1.Placement" +UpdatePlacementRequest: + placement ( 2".google.ads.admanager.v1.PlacementBA4 + update_mask ( 2.google.protobuf.FieldMaskBA" +BatchUpdatePlacementsRequest8 +parent ( B(AA" + admanager.googleapis.com/NetworkF +requests ( 2/.google.ads.admanager.v1.UpdatePlacementRequestBA"W +BatchUpdatePlacementsResponse6 + +placements ( 2".google.ads.admanager.v1.Placement" +BatchActivatePlacementsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network9 +names ( B*AA$ +"admanager.googleapis.com/Placement"! +BatchActivatePlacementsResponse" + BatchDeactivatePlacementsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network9 +names ( B*AA$ +"admanager.googleapis.com/Placement"# +!BatchDeactivatePlacementsResponse" +BatchArchivePlacementsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network9 +names ( B*AA$ +"admanager.googleapis.com/Placement" +BatchArchivePlacementsResponse2 PlacementService GetPlacement,.google.ads.admanager.v1.GetPlacementRequest".google.ads.admanager.v1.Placement"1Aname$"/v1/{name=networks/*/placements/*} -ListPlacements..google.ads.admanager.v1.ListPlacementsRequest/.google.ads.admanager.v1.ListPlacementsResponse"3Aparent$"/v1/{parent=networks/*}/placementsGAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +ListPlacements..google.ads.admanager.v1.ListPlacementsRequest/.google.ads.admanager.v1.ListPlacementsResponse"3Aparent$"/v1/{parent=networks/*}/placements +CreatePlacement/.google.ads.admanager.v1.CreatePlacementRequest".google.ads.admanager.v1.Placement"HAparent,placement/""/v1/{parent=networks/*}/placements: placement +UpdatePlacement/.google.ads.admanager.v1.UpdatePlacementRequest".google.ads.admanager.v1.Placement"WAplacement,update_mask92,/v1/{placement.name=networks/*/placements/*}: placement +BatchCreatePlacements5.google.ads.admanager.v1.BatchCreatePlacementsRequest6.google.ads.admanager.v1.BatchCreatePlacementsResponse"KAparent,requests3"./v1/{parent=networks/*}/placements:batchCreate:* +BatchUpdatePlacements5.google.ads.admanager.v1.BatchUpdatePlacementsRequest6.google.ads.admanager.v1.BatchUpdatePlacementsResponse"KAparent,requests3"./v1/{parent=networks/*}/placements:batchUpdate:* +BatchActivatePlacements7.google.ads.admanager.v1.BatchActivatePlacementsRequest8.google.ads.admanager.v1.BatchActivatePlacementsResponse"JA parent,names5"0/v1/{parent=networks/*}/placements:batchActivate:* +BatchDeactivatePlacements9.google.ads.admanager.v1.BatchDeactivatePlacementsRequest:.google.ads.admanager.v1.BatchDeactivatePlacementsResponse"LA parent,names7"2/v1/{parent=networks/*}/placements:batchDeactivate:* +BatchArchivePlacements6.google.ads.admanager.v1.BatchArchivePlacementsRequest7.google.ads.admanager.v1.BatchArchivePlacementsResponse"IA parent,names4"//v1/{parent=networks/*}/placements:batchArchive:*GAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB com.google.ads.admanager.v1BPlacementServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' , true); diff --git a/AdsAdManager/metadata/V1/ReportDefinition.php b/AdsAdManager/metadata/V1/ReportDefinition.php new file mode 100644 index 000000000000..0ba04cfab722 Binary files /dev/null and b/AdsAdManager/metadata/V1/ReportDefinition.php differ diff --git a/AdsAdManager/metadata/V1/ReportMessages.php b/AdsAdManager/metadata/V1/ReportMessages.php index 0e71fb588474..1e655f1379b0 100644 Binary files a/AdsAdManager/metadata/V1/ReportMessages.php and b/AdsAdManager/metadata/V1/ReportMessages.php differ diff --git a/AdsAdManager/metadata/V1/ReportService.php b/AdsAdManager/metadata/V1/ReportService.php index 4893ebfa9a63..268358599e42 100644 --- a/AdsAdManager/metadata/V1/ReportService.php +++ b/AdsAdManager/metadata/V1/ReportService.php @@ -14,6 +14,7 @@ public static function initOnce() { if (static::$is_initialized == true) { return; } + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); \GPBMetadata\Google\Ads\Admanager\V1\ReportMessages::initOnce(); \GPBMetadata\Google\Api\Annotations::initOnce(); \GPBMetadata\Google\Api\Client::initOnce(); @@ -24,8 +25,8 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( ' - -,google/ads/admanager/v1/report_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"I + +,google/ads/admanager/v1/report_service.protogoogle.ads.admanager.v1-google/ads/admanager/v1/report_messages.protogoogle/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"I RunReportRequest5 name ( B\'AA! admanager.googleapis.com/Report"c @@ -63,12 +64,12 @@ public static function initOnce() { name (  page_size (BA -page_token ( BA" -FetchReportResultRowsResponse; -rows ( 2-.google.ads.admanager.v1.Report.DataTable.Row, -run_time ( 2.google.protobuf.TimestampM - date_ranges ( 28.google.ads.admanager.v1.Report.DateRange.FixedDateRangeX -comparison_date_ranges ( 28.google.ads.admanager.v1.Report.DateRange.FixedDateRange +page_token ( BA" +FetchReportResultRowsResponse: +rows ( 2,.google.ads.admanager.v1.ReportDataTable.Row, +run_time ( 2.google.protobuf.TimestampW + date_ranges ( 2B.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRangeb +comparison_date_ranges ( 2B.google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange total_row_count ( next_page_token ( 2 ReportService diff --git a/AdsAdManager/metadata/V1/ReportValue.php b/AdsAdManager/metadata/V1/ReportValue.php new file mode 100644 index 000000000000..50b80f795837 Binary files /dev/null and b/AdsAdManager/metadata/V1/ReportValue.php differ diff --git a/AdsAdManager/metadata/V1/SiteEnums.php b/AdsAdManager/metadata/V1/SiteEnums.php new file mode 100644 index 000000000000..1debce58ccc1 Binary files /dev/null and b/AdsAdManager/metadata/V1/SiteEnums.php differ diff --git a/AdsAdManager/metadata/V1/SiteMessages.php b/AdsAdManager/metadata/V1/SiteMessages.php new file mode 100644 index 000000000000..f25bd3dfce51 Binary files /dev/null and b/AdsAdManager/metadata/V1/SiteMessages.php differ diff --git a/AdsAdManager/metadata/V1/SiteService.php b/AdsAdManager/metadata/V1/SiteService.php new file mode 100644 index 000000000000..7ad445573aa9 --- /dev/null +++ b/AdsAdManager/metadata/V1/SiteService.php @@ -0,0 +1,90 @@ +internalAddGeneratedFile( + ' + +*google/ads/admanager/v1/site_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto google/protobuf/field_mask.proto"E +GetSiteRequest3 +name ( B%AA +admanager.googleapis.com/Site" +ListSitesRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA"n +ListSitesResponse, +sites ( 2.google.ads.admanager.v1.Site +next_page_token (  + +total_size (" +CreateSiteRequest8 +parent ( B(AA" + admanager.googleapis.com/Network0 +site ( 2.google.ads.admanager.v1.SiteBA" +BatchCreateSitesRequest8 +parent ( B(AA" + admanager.googleapis.com/NetworkA +requests ( 2*.google.ads.admanager.v1.CreateSiteRequestBA"H +BatchCreateSitesResponse, +sites ( 2.google.ads.admanager.v1.Site"{ +UpdateSiteRequest0 +site ( 2.google.ads.admanager.v1.SiteBA4 + update_mask ( 2.google.protobuf.FieldMaskBA" +BatchUpdateSitesRequest8 +parent ( B(AA" + admanager.googleapis.com/NetworkA +requests ( 2*.google.ads.admanager.v1.UpdateSiteRequestBA"H +BatchUpdateSitesResponse, +sites ( 2.google.ads.admanager.v1.Site"k +BatchDeactivateSitesRequest8 +parent ( B(AA" + admanager.googleapis.com/Network +names ( BA" +BatchDeactivateSitesResponse"r +"BatchSubmitSitesForApprovalRequest8 +parent ( B(AA" + admanager.googleapis.com/Network +names ( BA"% +#BatchSubmitSitesForApprovalResponse2 + SiteService +GetSite\'.google.ads.admanager.v1.GetSiteRequest.google.ads.admanager.v1.Site",Aname/v1/{name=networks/*/sites/*} + ListSites).google.ads.admanager.v1.ListSitesRequest*.google.ads.admanager.v1.ListSitesResponse".Aparent/v1/{parent=networks/*}/sites + +CreateSite*.google.ads.admanager.v1.CreateSiteRequest.google.ads.admanager.v1.Site"9A parent,site%"/v1/{parent=networks/*}/sites:site +BatchCreateSites0.google.ads.admanager.v1.BatchCreateSitesRequest1.google.ads.admanager.v1.BatchCreateSitesResponse"FAparent,requests.")/v1/{parent=networks/*}/sites:batchCreate:* + +UpdateSite*.google.ads.admanager.v1.UpdateSiteRequest.google.ads.admanager.v1.Site"CAsite,update_mask*2"/v1/{site.name=networks/*/sites/*}:site +BatchUpdateSites0.google.ads.admanager.v1.BatchUpdateSitesRequest1.google.ads.admanager.v1.BatchUpdateSitesResponse"FAparent,requests.")/v1/{parent=networks/*}/sites:batchUpdate:* +BatchDeactivateSites4.google.ads.admanager.v1.BatchDeactivateSitesRequest5.google.ads.admanager.v1.BatchDeactivateSitesResponse"GA parent,names2"-/v1/{parent=networks/*}/sites:batchDeactivate:* +BatchSubmitSitesForApproval;.google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest<.google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse"NA parent,names9"4/v1/{parent=networks/*}/sites:batchSubmitForApproval:*GAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BSiteServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/Targeting.php b/AdsAdManager/metadata/V1/Targeting.php index 234bef9bf222..cb8966f9dfa0 100644 Binary files a/AdsAdManager/metadata/V1/Targeting.php and b/AdsAdManager/metadata/V1/Targeting.php differ diff --git a/AdsAdManager/metadata/V1/TaxonomyTypeEnum.php b/AdsAdManager/metadata/V1/TaxonomyTypeEnum.php index 21b4cabf0e9c..9d886309b6d0 100644 Binary files a/AdsAdManager/metadata/V1/TaxonomyTypeEnum.php and b/AdsAdManager/metadata/V1/TaxonomyTypeEnum.php differ diff --git a/AdsAdManager/metadata/V1/TeamEnums.php b/AdsAdManager/metadata/V1/TeamEnums.php new file mode 100644 index 000000000000..31453703f5ce Binary files /dev/null and b/AdsAdManager/metadata/V1/TeamEnums.php differ diff --git a/AdsAdManager/metadata/V1/TeamMessages.php b/AdsAdManager/metadata/V1/TeamMessages.php index bd4c750c40cc..d998ab85165c 100644 Binary files a/AdsAdManager/metadata/V1/TeamMessages.php and b/AdsAdManager/metadata/V1/TeamMessages.php differ diff --git a/AdsAdManager/metadata/V1/TeamService.php b/AdsAdManager/metadata/V1/TeamService.php new file mode 100644 index 000000000000..6c191324e116 --- /dev/null +++ b/AdsAdManager/metadata/V1/TeamService.php @@ -0,0 +1,92 @@ +internalAddGeneratedFile( + ' + +*google/ads/admanager/v1/team_service.protogoogle.ads.admanager.v1google/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto google/protobuf/field_mask.proto"E +GetTeamRequest3 +name ( B%AA +admanager.googleapis.com/Team" +ListTeamsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network + page_size (BA + +page_token ( BA +filter ( BA +order_by ( BA +skip (BA"n +ListTeamsResponse, +teams ( 2.google.ads.admanager.v1.Team +next_page_token (  + +total_size (" +CreateTeamRequest8 +parent ( B(AA" + admanager.googleapis.com/Network0 +team ( 2.google.ads.admanager.v1.TeamBA" +BatchCreateTeamsRequest8 +parent ( B(AA" + admanager.googleapis.com/NetworkA +requests ( 2*.google.ads.admanager.v1.CreateTeamRequestBA"H +BatchCreateTeamsResponse, +teams ( 2.google.ads.admanager.v1.Team"{ +UpdateTeamRequest0 +team ( 2.google.ads.admanager.v1.TeamBA4 + update_mask ( 2.google.protobuf.FieldMaskBA" +BatchUpdateTeamsRequest8 +parent ( B(AA" + admanager.googleapis.com/NetworkA +requests ( 2*.google.ads.admanager.v1.UpdateTeamRequestBA"H +BatchUpdateTeamsResponse, +teams ( 2.google.ads.admanager.v1.Team" +BatchActivateTeamsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network4 +names ( B%AA +admanager.googleapis.com/Team" +BatchActivateTeamsResponse" +BatchDeactivateTeamsRequest8 +parent ( B(AA" + admanager.googleapis.com/Network4 +names ( B%AA +admanager.googleapis.com/Team" +BatchDeactivateTeamsResponse2 + TeamService +GetTeam\'.google.ads.admanager.v1.GetTeamRequest.google.ads.admanager.v1.Team",Aname/v1/{name=networks/*/teams/*} + ListTeams).google.ads.admanager.v1.ListTeamsRequest*.google.ads.admanager.v1.ListTeamsResponse".Aparent/v1/{parent=networks/*}/teams + +CreateTeam*.google.ads.admanager.v1.CreateTeamRequest.google.ads.admanager.v1.Team"9A parent,team%"/v1/{parent=networks/*}/teams:team +BatchCreateTeams0.google.ads.admanager.v1.BatchCreateTeamsRequest1.google.ads.admanager.v1.BatchCreateTeamsResponse"FAparent,requests.")/v1/{parent=networks/*}/teams:batchCreate:* + +UpdateTeam*.google.ads.admanager.v1.UpdateTeamRequest.google.ads.admanager.v1.Team"CAteam,update_mask*2"/v1/{team.name=networks/*/teams/*}:team +BatchUpdateTeams0.google.ads.admanager.v1.BatchUpdateTeamsRequest1.google.ads.admanager.v1.BatchUpdateTeamsResponse"FAparent,requests.")/v1/{parent=networks/*}/teams:batchUpdate:* +BatchActivateTeams2.google.ads.admanager.v1.BatchActivateTeamsRequest3.google.ads.admanager.v1.BatchActivateTeamsResponse"EA parent,names0"+/v1/{parent=networks/*}/teams:batchActivate:* +BatchDeactivateTeams4.google.ads.admanager.v1.BatchDeactivateTeamsRequest5.google.ads.admanager.v1.BatchDeactivateTeamsResponse"GA parent,names2"-/v1/{parent=networks/*}/teams:batchDeactivate:*GAadmanager.googleapis.comA)https://www.googleapis.com/auth/admanagerB +com.google.ads.admanager.v1BTeamServiceProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/WebProperty.php b/AdsAdManager/metadata/V1/WebProperty.php new file mode 100644 index 000000000000..0ccf7cd6744d --- /dev/null +++ b/AdsAdManager/metadata/V1/WebProperty.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile( + ' + +*google/ads/admanager/v1/web_property.protogoogle.ads.admanager.v1google/api/field_behavior.protogoogle/api/resource.proto" + WebProperty +name ( BA +web_property_code ( BAm + product_type (2R.google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProductBA +web_property_id (BA:{Ax +$admanager.googleapis.com/WebProperty4networks/{network_code}/webProperties/{web_property}* webProperties2 webPropertyB +com.google.ads.admanager.v1BWebPropertyProtoPZ@google.golang.org/genproto/googleapis/ads/admanager/v1;admanagerGoogle.Ads.AdManager.V1Google\\Ads\\AdManager\\V1Google::Ads::AdManager::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/samples/V1/AdReviewCenterAdServiceClient/batch_allow_ad_review_center_ads.php b/AdsAdManager/samples/V1/AdReviewCenterAdServiceClient/batch_allow_ad_review_center_ads.php new file mode 100644 index 000000000000..cc5f0266472c --- /dev/null +++ b/AdsAdManager/samples/V1/AdReviewCenterAdServiceClient/batch_allow_ad_review_center_ads.php @@ -0,0 +1,115 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $adReviewCenterAdServiceClient->batchAllowAdReviewCenterAds($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchAllowAdReviewCenterAdsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdReviewCenterAdServiceClient::webPropertyName( + '[NETWORK_CODE]', + '[WEB_PROPERTY]' + ); + $formattedNamesElement = AdReviewCenterAdServiceClient::adReviewCenterAdName( + '[NETWORK_CODE]', + '[WEB_PROPERTY_CODE]', + '[AD_REVIEW_CENTER_AD]' + ); + + batch_allow_ad_review_center_ads_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_AdReviewCenterAdService_BatchAllowAdReviewCenterAds_sync] diff --git a/AdsAdManager/samples/V1/AdReviewCenterAdServiceClient/batch_block_ad_review_center_ads.php b/AdsAdManager/samples/V1/AdReviewCenterAdServiceClient/batch_block_ad_review_center_ads.php new file mode 100644 index 000000000000..c43421e1a64c --- /dev/null +++ b/AdsAdManager/samples/V1/AdReviewCenterAdServiceClient/batch_block_ad_review_center_ads.php @@ -0,0 +1,115 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $adReviewCenterAdServiceClient->batchBlockAdReviewCenterAds($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchBlockAdReviewCenterAdsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdReviewCenterAdServiceClient::webPropertyName( + '[NETWORK_CODE]', + '[WEB_PROPERTY]' + ); + $formattedNamesElement = AdReviewCenterAdServiceClient::adReviewCenterAdName( + '[NETWORK_CODE]', + '[WEB_PROPERTY_CODE]', + '[AD_REVIEW_CENTER_AD]' + ); + + batch_block_ad_review_center_ads_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_AdReviewCenterAdService_BatchBlockAdReviewCenterAds_sync] diff --git a/AdsAdManager/samples/V1/AdReviewCenterAdServiceClient/search_ad_review_center_ads.php b/AdsAdManager/samples/V1/AdReviewCenterAdServiceClient/search_ad_review_center_ads.php new file mode 100644 index 000000000000..bc995e483f4f --- /dev/null +++ b/AdsAdManager/samples/V1/AdReviewCenterAdServiceClient/search_ad_review_center_ads.php @@ -0,0 +1,94 @@ +setParent($formattedParent) + ->setStatus($status); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $adReviewCenterAdServiceClient->searchAdReviewCenterAds($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AdReviewCenterAdServiceClient::webPropertyName( + '[NETWORK_CODE]', + '[WEB_PROPERTY]' + ); + $status = AdReviewCenterAdStatus::AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED; + + search_ad_review_center_ads_sample($formattedParent, $status); +} +// [END admanager_v1_generated_AdReviewCenterAdService_SearchAdReviewCenterAds_sync] diff --git a/AdsAdManager/samples/V1/ApplicationServiceClient/get_application.php b/AdsAdManager/samples/V1/ApplicationServiceClient/get_application.php new file mode 100644 index 000000000000..9ac83a331c59 --- /dev/null +++ b/AdsAdManager/samples/V1/ApplicationServiceClient/get_application.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Application $response */ + $response = $applicationServiceClient->getApplication($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ApplicationServiceClient::applicationName('[NETWORK_CODE]', '[APPLICATION]'); + + get_application_sample($formattedName); +} +// [END admanager_v1_generated_ApplicationService_GetApplication_sync] diff --git a/AdsAdManager/samples/V1/ApplicationServiceClient/list_applications.php b/AdsAdManager/samples/V1/ApplicationServiceClient/list_applications.php new file mode 100644 index 000000000000..9ac7644304a2 --- /dev/null +++ b/AdsAdManager/samples/V1/ApplicationServiceClient/list_applications.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $applicationServiceClient->listApplications($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ApplicationServiceClient::networkName('[NETWORK_CODE]'); + + list_applications_sample($formattedParent); +} +// [END admanager_v1_generated_ApplicationService_ListApplications_sync] diff --git a/AdsAdManager/samples/V1/AudienceSegmentServiceClient/get_audience_segment.php b/AdsAdManager/samples/V1/AudienceSegmentServiceClient/get_audience_segment.php new file mode 100644 index 000000000000..e7f8dd5fdc36 --- /dev/null +++ b/AdsAdManager/samples/V1/AudienceSegmentServiceClient/get_audience_segment.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AudienceSegment $response */ + $response = $audienceSegmentServiceClient->getAudienceSegment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AudienceSegmentServiceClient::audienceSegmentName( + '[NETWORK_CODE]', + '[AUDIENCE_SEGMENT]' + ); + + get_audience_segment_sample($formattedName); +} +// [END admanager_v1_generated_AudienceSegmentService_GetAudienceSegment_sync] diff --git a/AdsAdManager/samples/V1/AudienceSegmentServiceClient/list_audience_segments.php b/AdsAdManager/samples/V1/AudienceSegmentServiceClient/list_audience_segments.php new file mode 100644 index 000000000000..a892f2ee4269 --- /dev/null +++ b/AdsAdManager/samples/V1/AudienceSegmentServiceClient/list_audience_segments.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $audienceSegmentServiceClient->listAudienceSegments($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AudienceSegmentServiceClient::networkName('[NETWORK_CODE]'); + + list_audience_segments_sample($formattedParent); +} +// [END admanager_v1_generated_AudienceSegmentService_ListAudienceSegments_sync] diff --git a/AdsAdManager/samples/V1/BrowserLanguageServiceClient/get_browser_language.php b/AdsAdManager/samples/V1/BrowserLanguageServiceClient/get_browser_language.php new file mode 100644 index 000000000000..80de5a74b0da --- /dev/null +++ b/AdsAdManager/samples/V1/BrowserLanguageServiceClient/get_browser_language.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BrowserLanguage $response */ + $response = $browserLanguageServiceClient->getBrowserLanguage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BrowserLanguageServiceClient::browserLanguageName( + '[NETWORK_CODE]', + '[BROWSER_LANGUAGE]' + ); + + get_browser_language_sample($formattedName); +} +// [END admanager_v1_generated_BrowserLanguageService_GetBrowserLanguage_sync] diff --git a/AdsAdManager/samples/V1/BrowserLanguageServiceClient/list_browser_languages.php b/AdsAdManager/samples/V1/BrowserLanguageServiceClient/list_browser_languages.php new file mode 100644 index 000000000000..a6cb4b6855f2 --- /dev/null +++ b/AdsAdManager/samples/V1/BrowserLanguageServiceClient/list_browser_languages.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $browserLanguageServiceClient->listBrowserLanguages($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = BrowserLanguageServiceClient::networkName('[NETWORK_CODE]'); + + list_browser_languages_sample($formattedParent); +} +// [END admanager_v1_generated_BrowserLanguageService_ListBrowserLanguages_sync] diff --git a/AdsAdManager/samples/V1/BrowserServiceClient/get_browser.php b/AdsAdManager/samples/V1/BrowserServiceClient/get_browser.php new file mode 100644 index 000000000000..42b1106dbda0 --- /dev/null +++ b/AdsAdManager/samples/V1/BrowserServiceClient/get_browser.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Browser $response */ + $response = $browserServiceClient->getBrowser($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BrowserServiceClient::browserName('[NETWORK_CODE]', '[BROWSER]'); + + get_browser_sample($formattedName); +} +// [END admanager_v1_generated_BrowserService_GetBrowser_sync] diff --git a/AdsAdManager/samples/V1/BrowserServiceClient/list_browsers.php b/AdsAdManager/samples/V1/BrowserServiceClient/list_browsers.php new file mode 100644 index 000000000000..715b30f2dc7a --- /dev/null +++ b/AdsAdManager/samples/V1/BrowserServiceClient/list_browsers.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $browserServiceClient->listBrowsers($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = BrowserServiceClient::networkName('[NETWORK_CODE]'); + + list_browsers_sample($formattedParent); +} +// [END admanager_v1_generated_BrowserService_ListBrowsers_sync] diff --git a/AdsAdManager/samples/V1/CmsMetadataKeyServiceClient/get_cms_metadata_key.php b/AdsAdManager/samples/V1/CmsMetadataKeyServiceClient/get_cms_metadata_key.php new file mode 100644 index 000000000000..b6510d28c904 --- /dev/null +++ b/AdsAdManager/samples/V1/CmsMetadataKeyServiceClient/get_cms_metadata_key.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CmsMetadataKey $response */ + $response = $cmsMetadataKeyServiceClient->getCmsMetadataKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CmsMetadataKeyServiceClient::cmsMetadataKeyName( + '[NETWORK_CODE]', + '[CMS_METADATA_KEY]' + ); + + get_cms_metadata_key_sample($formattedName); +} +// [END admanager_v1_generated_CmsMetadataKeyService_GetCmsMetadataKey_sync] diff --git a/AdsAdManager/samples/V1/CmsMetadataKeyServiceClient/list_cms_metadata_keys.php b/AdsAdManager/samples/V1/CmsMetadataKeyServiceClient/list_cms_metadata_keys.php new file mode 100644 index 000000000000..92aba2475823 --- /dev/null +++ b/AdsAdManager/samples/V1/CmsMetadataKeyServiceClient/list_cms_metadata_keys.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $cmsMetadataKeyServiceClient->listCmsMetadataKeys($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CmsMetadataKeyServiceClient::networkName('[NETWORK_CODE]'); + + list_cms_metadata_keys_sample($formattedParent); +} +// [END admanager_v1_generated_CmsMetadataKeyService_ListCmsMetadataKeys_sync] diff --git a/AdsAdManager/samples/V1/CmsMetadataValueServiceClient/get_cms_metadata_value.php b/AdsAdManager/samples/V1/CmsMetadataValueServiceClient/get_cms_metadata_value.php new file mode 100644 index 000000000000..c717eba30a30 --- /dev/null +++ b/AdsAdManager/samples/V1/CmsMetadataValueServiceClient/get_cms_metadata_value.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CmsMetadataValue $response */ + $response = $cmsMetadataValueServiceClient->getCmsMetadataValue($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CmsMetadataValueServiceClient::cmsMetadataValueName( + '[NETWORK_CODE]', + '[CMS_METADATA_VALUE]' + ); + + get_cms_metadata_value_sample($formattedName); +} +// [END admanager_v1_generated_CmsMetadataValueService_GetCmsMetadataValue_sync] diff --git a/AdsAdManager/samples/V1/CmsMetadataValueServiceClient/list_cms_metadata_values.php b/AdsAdManager/samples/V1/CmsMetadataValueServiceClient/list_cms_metadata_values.php new file mode 100644 index 000000000000..c970e59e17eb --- /dev/null +++ b/AdsAdManager/samples/V1/CmsMetadataValueServiceClient/list_cms_metadata_values.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $cmsMetadataValueServiceClient->listCmsMetadataValues($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CmsMetadataValueServiceClient::networkName('[NETWORK_CODE]'); + + list_cms_metadata_values_sample($formattedParent); +} +// [END admanager_v1_generated_CmsMetadataValueService_ListCmsMetadataValues_sync] diff --git a/AdsAdManager/samples/V1/ContactServiceClient/batch_create_contacts.php b/AdsAdManager/samples/V1/ContactServiceClient/batch_create_contacts.php new file mode 100644 index 000000000000..9512a96dc9fd --- /dev/null +++ b/AdsAdManager/samples/V1/ContactServiceClient/batch_create_contacts.php @@ -0,0 +1,104 @@ +setDisplayName($requestsContactDisplayName) + ->setCompany($formattedRequestsContactCompany); + $createContactRequest = (new CreateContactRequest()) + ->setParent($formattedRequestsParent) + ->setContact($requestsContact); + $requests = [$createContactRequest,]; + $request = (new BatchCreateContactsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchCreateContactsResponse $response */ + $response = $contactServiceClient->batchCreateContacts($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactServiceClient::networkName('[NETWORK_CODE]'); + $formattedRequestsParent = ContactServiceClient::networkName('[NETWORK_CODE]'); + $requestsContactDisplayName = '[DISPLAY_NAME]'; + $formattedRequestsContactCompany = ContactServiceClient::companyName('[NETWORK_CODE]', '[COMPANY]'); + + batch_create_contacts_sample( + $formattedParent, + $formattedRequestsParent, + $requestsContactDisplayName, + $formattedRequestsContactCompany + ); +} +// [END admanager_v1_generated_ContactService_BatchCreateContacts_sync] diff --git a/AdsAdManager/samples/V1/ContactServiceClient/batch_update_contacts.php b/AdsAdManager/samples/V1/ContactServiceClient/batch_update_contacts.php new file mode 100644 index 000000000000..52164012b944 --- /dev/null +++ b/AdsAdManager/samples/V1/ContactServiceClient/batch_update_contacts.php @@ -0,0 +1,100 @@ +setDisplayName($requestsContactDisplayName) + ->setCompany($formattedRequestsContactCompany); + $requestsUpdateMask = new FieldMask(); + $updateContactRequest = (new UpdateContactRequest()) + ->setContact($requestsContact) + ->setUpdateMask($requestsUpdateMask); + $requests = [$updateContactRequest,]; + $request = (new BatchUpdateContactsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdateContactsResponse $response */ + $response = $contactServiceClient->batchUpdateContacts($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactServiceClient::networkName('[NETWORK_CODE]'); + $requestsContactDisplayName = '[DISPLAY_NAME]'; + $formattedRequestsContactCompany = ContactServiceClient::companyName('[NETWORK_CODE]', '[COMPANY]'); + + batch_update_contacts_sample( + $formattedParent, + $requestsContactDisplayName, + $formattedRequestsContactCompany + ); +} +// [END admanager_v1_generated_ContactService_BatchUpdateContacts_sync] diff --git a/AdsAdManager/samples/V1/ContactServiceClient/create_contact.php b/AdsAdManager/samples/V1/ContactServiceClient/create_contact.php new file mode 100644 index 000000000000..89fbb277a04e --- /dev/null +++ b/AdsAdManager/samples/V1/ContactServiceClient/create_contact.php @@ -0,0 +1,86 @@ +setDisplayName($contactDisplayName) + ->setCompany($formattedContactCompany); + $request = (new CreateContactRequest()) + ->setParent($formattedParent) + ->setContact($contact); + + // Call the API and handle any network failures. + try { + /** @var Contact $response */ + $response = $contactServiceClient->createContact($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactServiceClient::networkName('[NETWORK_CODE]'); + $contactDisplayName = '[DISPLAY_NAME]'; + $formattedContactCompany = ContactServiceClient::companyName('[NETWORK_CODE]', '[COMPANY]'); + + create_contact_sample($formattedParent, $contactDisplayName, $formattedContactCompany); +} +// [END admanager_v1_generated_ContactService_CreateContact_sync] diff --git a/AdsAdManager/samples/V1/ContactServiceClient/get_contact.php b/AdsAdManager/samples/V1/ContactServiceClient/get_contact.php new file mode 100644 index 000000000000..d0f26c11593e --- /dev/null +++ b/AdsAdManager/samples/V1/ContactServiceClient/get_contact.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Contact $response */ + $response = $contactServiceClient->getContact($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ContactServiceClient::contactName('[NETWORK_CODE]', '[CONTACT]'); + + get_contact_sample($formattedName); +} +// [END admanager_v1_generated_ContactService_GetContact_sync] diff --git a/AdsAdManager/samples/V1/ContactServiceClient/list_contacts.php b/AdsAdManager/samples/V1/ContactServiceClient/list_contacts.php new file mode 100644 index 000000000000..221cf59ccfb5 --- /dev/null +++ b/AdsAdManager/samples/V1/ContactServiceClient/list_contacts.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $contactServiceClient->listContacts($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContactServiceClient::networkName('[NETWORK_CODE]'); + + list_contacts_sample($formattedParent); +} +// [END admanager_v1_generated_ContactService_ListContacts_sync] diff --git a/AdsAdManager/samples/V1/ContactServiceClient/update_contact.php b/AdsAdManager/samples/V1/ContactServiceClient/update_contact.php new file mode 100644 index 000000000000..22475a260661 --- /dev/null +++ b/AdsAdManager/samples/V1/ContactServiceClient/update_contact.php @@ -0,0 +1,81 @@ +setDisplayName($contactDisplayName) + ->setCompany($formattedContactCompany); + $updateMask = new FieldMask(); + $request = (new UpdateContactRequest()) + ->setContact($contact) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Contact $response */ + $response = $contactServiceClient->updateContact($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $contactDisplayName = '[DISPLAY_NAME]'; + $formattedContactCompany = ContactServiceClient::companyName('[NETWORK_CODE]', '[COMPANY]'); + + update_contact_sample($contactDisplayName, $formattedContactCompany); +} +// [END admanager_v1_generated_ContactService_UpdateContact_sync] diff --git a/AdsAdManager/samples/V1/ContentBundleServiceClient/get_content_bundle.php b/AdsAdManager/samples/V1/ContentBundleServiceClient/get_content_bundle.php new file mode 100644 index 000000000000..9d6ef0a40faf --- /dev/null +++ b/AdsAdManager/samples/V1/ContentBundleServiceClient/get_content_bundle.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ContentBundle $response */ + $response = $contentBundleServiceClient->getContentBundle($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ContentBundleServiceClient::contentBundleName( + '[NETWORK_CODE]', + '[CONTENT_BUNDLE]' + ); + + get_content_bundle_sample($formattedName); +} +// [END admanager_v1_generated_ContentBundleService_GetContentBundle_sync] diff --git a/AdsAdManager/samples/V1/ContentBundleServiceClient/list_content_bundles.php b/AdsAdManager/samples/V1/ContentBundleServiceClient/list_content_bundles.php new file mode 100644 index 000000000000..a3067a7b6a2c --- /dev/null +++ b/AdsAdManager/samples/V1/ContentBundleServiceClient/list_content_bundles.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $contentBundleServiceClient->listContentBundles($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContentBundleServiceClient::networkName('[NETWORK_CODE]'); + + list_content_bundles_sample($formattedParent); +} +// [END admanager_v1_generated_ContentBundleService_ListContentBundles_sync] diff --git a/AdsAdManager/samples/V1/ContentLabelServiceClient/get_content_label.php b/AdsAdManager/samples/V1/ContentLabelServiceClient/get_content_label.php new file mode 100644 index 000000000000..db8295a0e698 --- /dev/null +++ b/AdsAdManager/samples/V1/ContentLabelServiceClient/get_content_label.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ContentLabel $response */ + $response = $contentLabelServiceClient->getContentLabel($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ContentLabelServiceClient::contentLabelName('[NETWORK_CODE]', '[CONTENT_LABEL]'); + + get_content_label_sample($formattedName); +} +// [END admanager_v1_generated_ContentLabelService_GetContentLabel_sync] diff --git a/AdsAdManager/samples/V1/ContentLabelServiceClient/list_content_labels.php b/AdsAdManager/samples/V1/ContentLabelServiceClient/list_content_labels.php new file mode 100644 index 000000000000..40b84eff9241 --- /dev/null +++ b/AdsAdManager/samples/V1/ContentLabelServiceClient/list_content_labels.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $contentLabelServiceClient->listContentLabels($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContentLabelServiceClient::networkName('[NETWORK_CODE]'); + + list_content_labels_sample($formattedParent); +} +// [END admanager_v1_generated_ContentLabelService_ListContentLabels_sync] diff --git a/AdsAdManager/samples/V1/ContentServiceClient/get_content.php b/AdsAdManager/samples/V1/ContentServiceClient/get_content.php new file mode 100644 index 000000000000..9b05117bbcc4 --- /dev/null +++ b/AdsAdManager/samples/V1/ContentServiceClient/get_content.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Content $response */ + $response = $contentServiceClient->getContent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ContentServiceClient::contentName('[NETWORK_CODE]', '[CONTENT]'); + + get_content_sample($formattedName); +} +// [END admanager_v1_generated_ContentService_GetContent_sync] diff --git a/AdsAdManager/samples/V1/ContentServiceClient/list_content.php b/AdsAdManager/samples/V1/ContentServiceClient/list_content.php new file mode 100644 index 000000000000..4170a42ba82b --- /dev/null +++ b/AdsAdManager/samples/V1/ContentServiceClient/list_content.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $contentServiceClient->listContent($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ContentServiceClient::networkName('[NETWORK_CODE]'); + + list_content_sample($formattedParent); +} +// [END admanager_v1_generated_ContentService_ListContent_sync] diff --git a/AdsAdManager/samples/V1/CreativeTemplateServiceClient/get_creative_template.php b/AdsAdManager/samples/V1/CreativeTemplateServiceClient/get_creative_template.php new file mode 100644 index 000000000000..65c93e453e5f --- /dev/null +++ b/AdsAdManager/samples/V1/CreativeTemplateServiceClient/get_creative_template.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CreativeTemplate $response */ + $response = $creativeTemplateServiceClient->getCreativeTemplate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CreativeTemplateServiceClient::creativeTemplateName( + '[NETWORK_CODE]', + '[CREATIVE_TEMPLATE]' + ); + + get_creative_template_sample($formattedName); +} +// [END admanager_v1_generated_CreativeTemplateService_GetCreativeTemplate_sync] diff --git a/AdsAdManager/samples/V1/CreativeTemplateServiceClient/list_creative_templates.php b/AdsAdManager/samples/V1/CreativeTemplateServiceClient/list_creative_templates.php new file mode 100644 index 000000000000..1911814649a2 --- /dev/null +++ b/AdsAdManager/samples/V1/CreativeTemplateServiceClient/list_creative_templates.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $creativeTemplateServiceClient->listCreativeTemplates($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CreativeTemplateServiceClient::networkName('[NETWORK_CODE]'); + + list_creative_templates_sample($formattedParent); +} +// [END admanager_v1_generated_CreativeTemplateService_ListCreativeTemplates_sync] diff --git a/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_activate_custom_fields.php b/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_activate_custom_fields.php new file mode 100644 index 000000000000..78a714090dde --- /dev/null +++ b/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_activate_custom_fields.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchActivateCustomFieldsResponse $response */ + $response = $customFieldServiceClient->batchActivateCustomFields($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CustomFieldServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = CustomFieldServiceClient::customFieldName( + '[NETWORK_CODE]', + '[CUSTOM_FIELD]' + ); + + batch_activate_custom_fields_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_CustomFieldService_BatchActivateCustomFields_sync] diff --git a/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_create_custom_fields.php b/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_create_custom_fields.php new file mode 100644 index 000000000000..739a3777c644 --- /dev/null +++ b/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_create_custom_fields.php @@ -0,0 +1,114 @@ +setDisplayName($requestsCustomFieldDisplayName) + ->setEntityType($requestsCustomFieldEntityType) + ->setDataType($requestsCustomFieldDataType) + ->setVisibility($requestsCustomFieldVisibility); + $createCustomFieldRequest = (new CreateCustomFieldRequest()) + ->setParent($formattedRequestsParent) + ->setCustomField($requestsCustomField); + $requests = [$createCustomFieldRequest,]; + $request = (new BatchCreateCustomFieldsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchCreateCustomFieldsResponse $response */ + $response = $customFieldServiceClient->batchCreateCustomFields($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CustomFieldServiceClient::networkName('[NETWORK_CODE]'); + $formattedRequestsParent = CustomFieldServiceClient::networkName('[NETWORK_CODE]'); + $requestsCustomFieldDisplayName = '[DISPLAY_NAME]'; + $requestsCustomFieldEntityType = CustomFieldEntityType::CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED; + $requestsCustomFieldDataType = CustomFieldDataType::CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED; + $requestsCustomFieldVisibility = CustomFieldVisibility::CUSTOM_FIELD_VISIBILITY_UNSPECIFIED; + + batch_create_custom_fields_sample( + $formattedParent, + $formattedRequestsParent, + $requestsCustomFieldDisplayName, + $requestsCustomFieldEntityType, + $requestsCustomFieldDataType, + $requestsCustomFieldVisibility + ); +} +// [END admanager_v1_generated_CustomFieldService_BatchCreateCustomFields_sync] diff --git a/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_deactivate_custom_fields.php b/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_deactivate_custom_fields.php new file mode 100644 index 000000000000..782e0a0efb64 --- /dev/null +++ b/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_deactivate_custom_fields.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchDeactivateCustomFieldsResponse $response */ + $response = $customFieldServiceClient->batchDeactivateCustomFields($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CustomFieldServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = CustomFieldServiceClient::customFieldName( + '[NETWORK_CODE]', + '[CUSTOM_FIELD]' + ); + + batch_deactivate_custom_fields_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_CustomFieldService_BatchDeactivateCustomFields_sync] diff --git a/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_update_custom_fields.php b/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_update_custom_fields.php new file mode 100644 index 000000000000..4d2a494c1a88 --- /dev/null +++ b/AdsAdManager/samples/V1/CustomFieldServiceClient/batch_update_custom_fields.php @@ -0,0 +1,110 @@ +setDisplayName($requestsCustomFieldDisplayName) + ->setEntityType($requestsCustomFieldEntityType) + ->setDataType($requestsCustomFieldDataType) + ->setVisibility($requestsCustomFieldVisibility); + $requestsUpdateMask = new FieldMask(); + $updateCustomFieldRequest = (new UpdateCustomFieldRequest()) + ->setCustomField($requestsCustomField) + ->setUpdateMask($requestsUpdateMask); + $requests = [$updateCustomFieldRequest,]; + $request = (new BatchUpdateCustomFieldsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdateCustomFieldsResponse $response */ + $response = $customFieldServiceClient->batchUpdateCustomFields($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CustomFieldServiceClient::networkName('[NETWORK_CODE]'); + $requestsCustomFieldDisplayName = '[DISPLAY_NAME]'; + $requestsCustomFieldEntityType = CustomFieldEntityType::CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED; + $requestsCustomFieldDataType = CustomFieldDataType::CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED; + $requestsCustomFieldVisibility = CustomFieldVisibility::CUSTOM_FIELD_VISIBILITY_UNSPECIFIED; + + batch_update_custom_fields_sample( + $formattedParent, + $requestsCustomFieldDisplayName, + $requestsCustomFieldEntityType, + $requestsCustomFieldDataType, + $requestsCustomFieldVisibility + ); +} +// [END admanager_v1_generated_CustomFieldService_BatchUpdateCustomFields_sync] diff --git a/AdsAdManager/samples/V1/CustomFieldServiceClient/create_custom_field.php b/AdsAdManager/samples/V1/CustomFieldServiceClient/create_custom_field.php new file mode 100644 index 000000000000..61036e57b07b --- /dev/null +++ b/AdsAdManager/samples/V1/CustomFieldServiceClient/create_custom_field.php @@ -0,0 +1,100 @@ +setDisplayName($customFieldDisplayName) + ->setEntityType($customFieldEntityType) + ->setDataType($customFieldDataType) + ->setVisibility($customFieldVisibility); + $request = (new CreateCustomFieldRequest()) + ->setParent($formattedParent) + ->setCustomField($customField); + + // Call the API and handle any network failures. + try { + /** @var CustomField $response */ + $response = $customFieldServiceClient->createCustomField($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CustomFieldServiceClient::networkName('[NETWORK_CODE]'); + $customFieldDisplayName = '[DISPLAY_NAME]'; + $customFieldEntityType = CustomFieldEntityType::CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED; + $customFieldDataType = CustomFieldDataType::CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED; + $customFieldVisibility = CustomFieldVisibility::CUSTOM_FIELD_VISIBILITY_UNSPECIFIED; + + create_custom_field_sample( + $formattedParent, + $customFieldDisplayName, + $customFieldEntityType, + $customFieldDataType, + $customFieldVisibility + ); +} +// [END admanager_v1_generated_CustomFieldService_CreateCustomField_sync] diff --git a/AdsAdManager/samples/V1/CustomFieldServiceClient/update_custom_field.php b/AdsAdManager/samples/V1/CustomFieldServiceClient/update_custom_field.php new file mode 100644 index 000000000000..e3f1eb0caa88 --- /dev/null +++ b/AdsAdManager/samples/V1/CustomFieldServiceClient/update_custom_field.php @@ -0,0 +1,96 @@ +setDisplayName($customFieldDisplayName) + ->setEntityType($customFieldEntityType) + ->setDataType($customFieldDataType) + ->setVisibility($customFieldVisibility); + $updateMask = new FieldMask(); + $request = (new UpdateCustomFieldRequest()) + ->setCustomField($customField) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var CustomField $response */ + $response = $customFieldServiceClient->updateCustomField($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $customFieldDisplayName = '[DISPLAY_NAME]'; + $customFieldEntityType = CustomFieldEntityType::CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED; + $customFieldDataType = CustomFieldDataType::CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED; + $customFieldVisibility = CustomFieldVisibility::CUSTOM_FIELD_VISIBILITY_UNSPECIFIED; + + update_custom_field_sample( + $customFieldDisplayName, + $customFieldEntityType, + $customFieldDataType, + $customFieldVisibility + ); +} +// [END admanager_v1_generated_CustomFieldService_UpdateCustomField_sync] diff --git a/AdsAdManager/samples/V1/DeviceCapabilityServiceClient/get_device_capability.php b/AdsAdManager/samples/V1/DeviceCapabilityServiceClient/get_device_capability.php new file mode 100644 index 000000000000..563a997d0e3e --- /dev/null +++ b/AdsAdManager/samples/V1/DeviceCapabilityServiceClient/get_device_capability.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DeviceCapability $response */ + $response = $deviceCapabilityServiceClient->getDeviceCapability($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeviceCapabilityServiceClient::deviceCapabilityName( + '[NETWORK_CODE]', + '[DEVICE_CAPABILITY]' + ); + + get_device_capability_sample($formattedName); +} +// [END admanager_v1_generated_DeviceCapabilityService_GetDeviceCapability_sync] diff --git a/AdsAdManager/samples/V1/DeviceCapabilityServiceClient/list_device_capabilities.php b/AdsAdManager/samples/V1/DeviceCapabilityServiceClient/list_device_capabilities.php new file mode 100644 index 000000000000..939cf69c2c62 --- /dev/null +++ b/AdsAdManager/samples/V1/DeviceCapabilityServiceClient/list_device_capabilities.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $deviceCapabilityServiceClient->listDeviceCapabilities($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DeviceCapabilityServiceClient::networkName('[NETWORK_CODE]'); + + list_device_capabilities_sample($formattedParent); +} +// [END admanager_v1_generated_DeviceCapabilityService_ListDeviceCapabilities_sync] diff --git a/AdsAdManager/samples/V1/DeviceManufacturerServiceClient/get_device_manufacturer.php b/AdsAdManager/samples/V1/DeviceManufacturerServiceClient/get_device_manufacturer.php new file mode 100644 index 000000000000..7789385da8de --- /dev/null +++ b/AdsAdManager/samples/V1/DeviceManufacturerServiceClient/get_device_manufacturer.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DeviceManufacturer $response */ + $response = $deviceManufacturerServiceClient->getDeviceManufacturer($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeviceManufacturerServiceClient::deviceManufacturerName( + '[NETWORK_CODE]', + '[DEVICE_MANUFACTURER]' + ); + + get_device_manufacturer_sample($formattedName); +} +// [END admanager_v1_generated_DeviceManufacturerService_GetDeviceManufacturer_sync] diff --git a/AdsAdManager/samples/V1/DeviceManufacturerServiceClient/list_device_manufacturers.php b/AdsAdManager/samples/V1/DeviceManufacturerServiceClient/list_device_manufacturers.php new file mode 100644 index 000000000000..b033b474d2d0 --- /dev/null +++ b/AdsAdManager/samples/V1/DeviceManufacturerServiceClient/list_device_manufacturers.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $deviceManufacturerServiceClient->listDeviceManufacturers($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DeviceManufacturerServiceClient::networkName('[NETWORK_CODE]'); + + list_device_manufacturers_sample($formattedParent); +} +// [END admanager_v1_generated_DeviceManufacturerService_ListDeviceManufacturers_sync] diff --git a/AdsAdManager/samples/V1/MobileCarrierServiceClient/get_mobile_carrier.php b/AdsAdManager/samples/V1/MobileCarrierServiceClient/get_mobile_carrier.php new file mode 100644 index 000000000000..3247b64f386f --- /dev/null +++ b/AdsAdManager/samples/V1/MobileCarrierServiceClient/get_mobile_carrier.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MobileCarrier $response */ + $response = $mobileCarrierServiceClient->getMobileCarrier($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MobileCarrierServiceClient::mobileCarrierName( + '[NETWORK_CODE]', + '[MOBILE_CARRIER]' + ); + + get_mobile_carrier_sample($formattedName); +} +// [END admanager_v1_generated_MobileCarrierService_GetMobileCarrier_sync] diff --git a/AdsAdManager/samples/V1/MobileCarrierServiceClient/list_mobile_carriers.php b/AdsAdManager/samples/V1/MobileCarrierServiceClient/list_mobile_carriers.php new file mode 100644 index 000000000000..8defa00e4cfe --- /dev/null +++ b/AdsAdManager/samples/V1/MobileCarrierServiceClient/list_mobile_carriers.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $mobileCarrierServiceClient->listMobileCarriers($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MobileCarrierServiceClient::networkName('[NETWORK_CODE]'); + + list_mobile_carriers_sample($formattedParent); +} +// [END admanager_v1_generated_MobileCarrierService_ListMobileCarriers_sync] diff --git a/AdsAdManager/samples/V1/MobileDeviceServiceClient/get_mobile_device.php b/AdsAdManager/samples/V1/MobileDeviceServiceClient/get_mobile_device.php new file mode 100644 index 000000000000..e310765cb5fd --- /dev/null +++ b/AdsAdManager/samples/V1/MobileDeviceServiceClient/get_mobile_device.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MobileDevice $response */ + $response = $mobileDeviceServiceClient->getMobileDevice($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MobileDeviceServiceClient::mobileDeviceName('[NETWORK_CODE]', '[MOBILE_DEVICE]'); + + get_mobile_device_sample($formattedName); +} +// [END admanager_v1_generated_MobileDeviceService_GetMobileDevice_sync] diff --git a/AdsAdManager/samples/V1/MobileDeviceServiceClient/list_mobile_devices.php b/AdsAdManager/samples/V1/MobileDeviceServiceClient/list_mobile_devices.php new file mode 100644 index 000000000000..ed62d7424649 --- /dev/null +++ b/AdsAdManager/samples/V1/MobileDeviceServiceClient/list_mobile_devices.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $mobileDeviceServiceClient->listMobileDevices($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MobileDeviceServiceClient::networkName('[NETWORK_CODE]'); + + list_mobile_devices_sample($formattedParent); +} +// [END admanager_v1_generated_MobileDeviceService_ListMobileDevices_sync] diff --git a/AdsAdManager/samples/V1/MobileDeviceSubmodelServiceClient/get_mobile_device_submodel.php b/AdsAdManager/samples/V1/MobileDeviceSubmodelServiceClient/get_mobile_device_submodel.php new file mode 100644 index 000000000000..d5ab581f07b8 --- /dev/null +++ b/AdsAdManager/samples/V1/MobileDeviceSubmodelServiceClient/get_mobile_device_submodel.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MobileDeviceSubmodel $response */ + $response = $mobileDeviceSubmodelServiceClient->getMobileDeviceSubmodel($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MobileDeviceSubmodelServiceClient::mobileDeviceSubmodelName( + '[NETWORK_CODE]', + '[MOBILE_DEVICE_SUBMODEL]' + ); + + get_mobile_device_submodel_sample($formattedName); +} +// [END admanager_v1_generated_MobileDeviceSubmodelService_GetMobileDeviceSubmodel_sync] diff --git a/AdsAdManager/samples/V1/MobileDeviceSubmodelServiceClient/list_mobile_device_submodels.php b/AdsAdManager/samples/V1/MobileDeviceSubmodelServiceClient/list_mobile_device_submodels.php new file mode 100644 index 000000000000..667feea4be02 --- /dev/null +++ b/AdsAdManager/samples/V1/MobileDeviceSubmodelServiceClient/list_mobile_device_submodels.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $mobileDeviceSubmodelServiceClient->listMobileDeviceSubmodels($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MobileDeviceSubmodelServiceClient::networkName('[NETWORK_CODE]'); + + list_mobile_device_submodels_sample($formattedParent); +} +// [END admanager_v1_generated_MobileDeviceSubmodelService_ListMobileDeviceSubmodels_sync] diff --git a/AdsAdManager/samples/V1/PlacementServiceClient/batch_activate_placements.php b/AdsAdManager/samples/V1/PlacementServiceClient/batch_activate_placements.php new file mode 100644 index 000000000000..599b766d579c --- /dev/null +++ b/AdsAdManager/samples/V1/PlacementServiceClient/batch_activate_placements.php @@ -0,0 +1,79 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchActivatePlacementsResponse $response */ + $response = $placementServiceClient->batchActivatePlacements($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PlacementServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = PlacementServiceClient::placementName('[NETWORK_CODE]', '[PLACEMENT]'); + + batch_activate_placements_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_PlacementService_BatchActivatePlacements_sync] diff --git a/AdsAdManager/samples/V1/PlacementServiceClient/batch_archive_placements.php b/AdsAdManager/samples/V1/PlacementServiceClient/batch_archive_placements.php new file mode 100644 index 000000000000..ce56d8ae9163 --- /dev/null +++ b/AdsAdManager/samples/V1/PlacementServiceClient/batch_archive_placements.php @@ -0,0 +1,79 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchArchivePlacementsResponse $response */ + $response = $placementServiceClient->batchArchivePlacements($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PlacementServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = PlacementServiceClient::placementName('[NETWORK_CODE]', '[PLACEMENT]'); + + batch_archive_placements_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_PlacementService_BatchArchivePlacements_sync] diff --git a/AdsAdManager/samples/V1/PlacementServiceClient/batch_create_placements.php b/AdsAdManager/samples/V1/PlacementServiceClient/batch_create_placements.php new file mode 100644 index 000000000000..9f602d326f00 --- /dev/null +++ b/AdsAdManager/samples/V1/PlacementServiceClient/batch_create_placements.php @@ -0,0 +1,97 @@ +setDisplayName($requestsPlacementDisplayName); + $createPlacementRequest = (new CreatePlacementRequest()) + ->setParent($formattedRequestsParent) + ->setPlacement($requestsPlacement); + $requests = [$createPlacementRequest,]; + $request = (new BatchCreatePlacementsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchCreatePlacementsResponse $response */ + $response = $placementServiceClient->batchCreatePlacements($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PlacementServiceClient::networkName('[NETWORK_CODE]'); + $formattedRequestsParent = PlacementServiceClient::networkName('[NETWORK_CODE]'); + $requestsPlacementDisplayName = '[DISPLAY_NAME]'; + + batch_create_placements_sample( + $formattedParent, + $formattedRequestsParent, + $requestsPlacementDisplayName + ); +} +// [END admanager_v1_generated_PlacementService_BatchCreatePlacements_sync] diff --git a/AdsAdManager/samples/V1/PlacementServiceClient/batch_deactivate_placements.php b/AdsAdManager/samples/V1/PlacementServiceClient/batch_deactivate_placements.php new file mode 100644 index 000000000000..a81415b072dd --- /dev/null +++ b/AdsAdManager/samples/V1/PlacementServiceClient/batch_deactivate_placements.php @@ -0,0 +1,79 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchDeactivatePlacementsResponse $response */ + $response = $placementServiceClient->batchDeactivatePlacements($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PlacementServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = PlacementServiceClient::placementName('[NETWORK_CODE]', '[PLACEMENT]'); + + batch_deactivate_placements_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_PlacementService_BatchDeactivatePlacements_sync] diff --git a/AdsAdManager/samples/V1/PlacementServiceClient/batch_update_placements.php b/AdsAdManager/samples/V1/PlacementServiceClient/batch_update_placements.php new file mode 100644 index 000000000000..4a86ec217a1c --- /dev/null +++ b/AdsAdManager/samples/V1/PlacementServiceClient/batch_update_placements.php @@ -0,0 +1,90 @@ +setDisplayName($requestsPlacementDisplayName); + $requestsUpdateMask = new FieldMask(); + $updatePlacementRequest = (new UpdatePlacementRequest()) + ->setPlacement($requestsPlacement) + ->setUpdateMask($requestsUpdateMask); + $requests = [$updatePlacementRequest,]; + $request = (new BatchUpdatePlacementsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdatePlacementsResponse $response */ + $response = $placementServiceClient->batchUpdatePlacements($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PlacementServiceClient::networkName('[NETWORK_CODE]'); + $requestsPlacementDisplayName = '[DISPLAY_NAME]'; + + batch_update_placements_sample($formattedParent, $requestsPlacementDisplayName); +} +// [END admanager_v1_generated_PlacementService_BatchUpdatePlacements_sync] diff --git a/AdsAdManager/samples/V1/PlacementServiceClient/create_placement.php b/AdsAdManager/samples/V1/PlacementServiceClient/create_placement.php new file mode 100644 index 000000000000..8e635181e5f8 --- /dev/null +++ b/AdsAdManager/samples/V1/PlacementServiceClient/create_placement.php @@ -0,0 +1,78 @@ +setDisplayName($placementDisplayName); + $request = (new CreatePlacementRequest()) + ->setParent($formattedParent) + ->setPlacement($placement); + + // Call the API and handle any network failures. + try { + /** @var Placement $response */ + $response = $placementServiceClient->createPlacement($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PlacementServiceClient::networkName('[NETWORK_CODE]'); + $placementDisplayName = '[DISPLAY_NAME]'; + + create_placement_sample($formattedParent, $placementDisplayName); +} +// [END admanager_v1_generated_PlacementService_CreatePlacement_sync] diff --git a/AdsAdManager/samples/V1/PlacementServiceClient/update_placement.php b/AdsAdManager/samples/V1/PlacementServiceClient/update_placement.php new file mode 100644 index 000000000000..8e7b92ad31cd --- /dev/null +++ b/AdsAdManager/samples/V1/PlacementServiceClient/update_placement.php @@ -0,0 +1,76 @@ +setDisplayName($placementDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdatePlacementRequest()) + ->setPlacement($placement) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Placement $response */ + $response = $placementServiceClient->updatePlacement($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $placementDisplayName = '[DISPLAY_NAME]'; + + update_placement_sample($placementDisplayName); +} +// [END admanager_v1_generated_PlacementService_UpdatePlacement_sync] diff --git a/AdsAdManager/samples/V1/ReportServiceClient/create_report.php b/AdsAdManager/samples/V1/ReportServiceClient/create_report.php index ca38b7b8f5fe..b6b6558621db 100644 --- a/AdsAdManager/samples/V1/ReportServiceClient/create_report.php +++ b/AdsAdManager/samples/V1/ReportServiceClient/create_report.php @@ -27,10 +27,10 @@ use Google\Ads\AdManager\V1\CreateReportRequest; use Google\Ads\AdManager\V1\Report; use Google\Ads\AdManager\V1\ReportDefinition; -use Google\Ads\AdManager\V1\Report\DateRange; -use Google\Ads\AdManager\V1\Report\Dimension; -use Google\Ads\AdManager\V1\Report\Metric; -use Google\Ads\AdManager\V1\Report\ReportType; +use Google\Ads\AdManager\V1\ReportDefinition\DateRange; +use Google\Ads\AdManager\V1\ReportDefinition\Dimension; +use Google\Ads\AdManager\V1\ReportDefinition\Metric; +use Google\Ads\AdManager\V1\ReportDefinition\ReportType; use Google\ApiCore\ApiException; /** diff --git a/AdsAdManager/samples/V1/ReportServiceClient/run_report.php b/AdsAdManager/samples/V1/ReportServiceClient/run_report.php index d3e4d98a6ef8..8e203d2ead0f 100644 --- a/AdsAdManager/samples/V1/ReportServiceClient/run_report.php +++ b/AdsAdManager/samples/V1/ReportServiceClient/run_report.php @@ -32,7 +32,7 @@ /** * Initiates the execution of an existing report asynchronously. Users can - * get the report by polling this operation via + * get the report by polling this operation using * `OperationsService.GetOperation`. * Poll every 5 seconds initially, with an exponential * backoff. Once a report is complete, the operation will contain a diff --git a/AdsAdManager/samples/V1/ReportServiceClient/update_report.php b/AdsAdManager/samples/V1/ReportServiceClient/update_report.php index 84e9e65464c1..76d4eb28b7f9 100644 --- a/AdsAdManager/samples/V1/ReportServiceClient/update_report.php +++ b/AdsAdManager/samples/V1/ReportServiceClient/update_report.php @@ -26,10 +26,10 @@ use Google\Ads\AdManager\V1\Client\ReportServiceClient; use Google\Ads\AdManager\V1\Report; use Google\Ads\AdManager\V1\ReportDefinition; -use Google\Ads\AdManager\V1\Report\DateRange; -use Google\Ads\AdManager\V1\Report\Dimension; -use Google\Ads\AdManager\V1\Report\Metric; -use Google\Ads\AdManager\V1\Report\ReportType; +use Google\Ads\AdManager\V1\ReportDefinition\DateRange; +use Google\Ads\AdManager\V1\ReportDefinition\Dimension; +use Google\Ads\AdManager\V1\ReportDefinition\Metric; +use Google\Ads\AdManager\V1\ReportDefinition\ReportType; use Google\Ads\AdManager\V1\UpdateReportRequest; use Google\ApiCore\ApiException; use Google\Protobuf\FieldMask; diff --git a/AdsAdManager/samples/V1/SiteServiceClient/batch_create_sites.php b/AdsAdManager/samples/V1/SiteServiceClient/batch_create_sites.php new file mode 100644 index 000000000000..3c902352aa9c --- /dev/null +++ b/AdsAdManager/samples/V1/SiteServiceClient/batch_create_sites.php @@ -0,0 +1,92 @@ +setUrl($requestsSiteUrl); + $createSiteRequest = (new CreateSiteRequest()) + ->setParent($formattedRequestsParent) + ->setSite($requestsSite); + $requests = [$createSiteRequest,]; + $request = (new BatchCreateSitesRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchCreateSitesResponse $response */ + $response = $siteServiceClient->batchCreateSites($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SiteServiceClient::networkName('[NETWORK_CODE]'); + $formattedRequestsParent = SiteServiceClient::networkName('[NETWORK_CODE]'); + $requestsSiteUrl = '[URL]'; + + batch_create_sites_sample($formattedParent, $formattedRequestsParent, $requestsSiteUrl); +} +// [END admanager_v1_generated_SiteService_BatchCreateSites_sync] diff --git a/AdsAdManager/samples/V1/SiteServiceClient/batch_deactivate_sites.php b/AdsAdManager/samples/V1/SiteServiceClient/batch_deactivate_sites.php new file mode 100644 index 000000000000..0e54a1fdea9d --- /dev/null +++ b/AdsAdManager/samples/V1/SiteServiceClient/batch_deactivate_sites.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setNames($names); + + // Call the API and handle any network failures. + try { + /** @var BatchDeactivateSitesResponse $response */ + $response = $siteServiceClient->batchDeactivateSites($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SiteServiceClient::networkName('[NETWORK_CODE]'); + $namesElement = '[NAMES]'; + + batch_deactivate_sites_sample($formattedParent, $namesElement); +} +// [END admanager_v1_generated_SiteService_BatchDeactivateSites_sync] diff --git a/AdsAdManager/samples/V1/SiteServiceClient/batch_submit_sites_for_approval.php b/AdsAdManager/samples/V1/SiteServiceClient/batch_submit_sites_for_approval.php new file mode 100644 index 000000000000..768ed310ad7d --- /dev/null +++ b/AdsAdManager/samples/V1/SiteServiceClient/batch_submit_sites_for_approval.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setNames($names); + + // Call the API and handle any network failures. + try { + /** @var BatchSubmitSitesForApprovalResponse $response */ + $response = $siteServiceClient->batchSubmitSitesForApproval($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SiteServiceClient::networkName('[NETWORK_CODE]'); + $namesElement = '[NAMES]'; + + batch_submit_sites_for_approval_sample($formattedParent, $namesElement); +} +// [END admanager_v1_generated_SiteService_BatchSubmitSitesForApproval_sync] diff --git a/AdsAdManager/samples/V1/SiteServiceClient/batch_update_sites.php b/AdsAdManager/samples/V1/SiteServiceClient/batch_update_sites.php new file mode 100644 index 000000000000..3f7a83882c2d --- /dev/null +++ b/AdsAdManager/samples/V1/SiteServiceClient/batch_update_sites.php @@ -0,0 +1,87 @@ +setUrl($requestsSiteUrl); + $requestsUpdateMask = new FieldMask(); + $updateSiteRequest = (new UpdateSiteRequest()) + ->setSite($requestsSite) + ->setUpdateMask($requestsUpdateMask); + $requests = [$updateSiteRequest,]; + $request = (new BatchUpdateSitesRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdateSitesResponse $response */ + $response = $siteServiceClient->batchUpdateSites($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SiteServiceClient::networkName('[NETWORK_CODE]'); + $requestsSiteUrl = '[URL]'; + + batch_update_sites_sample($formattedParent, $requestsSiteUrl); +} +// [END admanager_v1_generated_SiteService_BatchUpdateSites_sync] diff --git a/AdsAdManager/samples/V1/SiteServiceClient/create_site.php b/AdsAdManager/samples/V1/SiteServiceClient/create_site.php new file mode 100644 index 000000000000..c458d2409708 --- /dev/null +++ b/AdsAdManager/samples/V1/SiteServiceClient/create_site.php @@ -0,0 +1,77 @@ +setUrl($siteUrl); + $request = (new CreateSiteRequest()) + ->setParent($formattedParent) + ->setSite($site); + + // Call the API and handle any network failures. + try { + /** @var Site $response */ + $response = $siteServiceClient->createSite($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SiteServiceClient::networkName('[NETWORK_CODE]'); + $siteUrl = '[URL]'; + + create_site_sample($formattedParent, $siteUrl); +} +// [END admanager_v1_generated_SiteService_CreateSite_sync] diff --git a/AdsAdManager/samples/V1/SiteServiceClient/get_site.php b/AdsAdManager/samples/V1/SiteServiceClient/get_site.php new file mode 100644 index 000000000000..45771c513acc --- /dev/null +++ b/AdsAdManager/samples/V1/SiteServiceClient/get_site.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Site $response */ + $response = $siteServiceClient->getSite($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SiteServiceClient::siteName('[NETWORK_CODE]', '[SITE]'); + + get_site_sample($formattedName); +} +// [END admanager_v1_generated_SiteService_GetSite_sync] diff --git a/AdsAdManager/samples/V1/SiteServiceClient/list_sites.php b/AdsAdManager/samples/V1/SiteServiceClient/list_sites.php new file mode 100644 index 000000000000..70c2daaa91a4 --- /dev/null +++ b/AdsAdManager/samples/V1/SiteServiceClient/list_sites.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $siteServiceClient->listSites($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SiteServiceClient::networkName('[NETWORK_CODE]'); + + list_sites_sample($formattedParent); +} +// [END admanager_v1_generated_SiteService_ListSites_sync] diff --git a/AdsAdManager/samples/V1/SiteServiceClient/update_site.php b/AdsAdManager/samples/V1/SiteServiceClient/update_site.php new file mode 100644 index 000000000000..1d93891aaf5d --- /dev/null +++ b/AdsAdManager/samples/V1/SiteServiceClient/update_site.php @@ -0,0 +1,75 @@ +setUrl($siteUrl); + $updateMask = new FieldMask(); + $request = (new UpdateSiteRequest()) + ->setSite($site) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Site $response */ + $response = $siteServiceClient->updateSite($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $siteUrl = '[URL]'; + + update_site_sample($siteUrl); +} +// [END admanager_v1_generated_SiteService_UpdateSite_sync] diff --git a/AdsAdManager/samples/V1/TeamServiceClient/batch_activate_teams.php b/AdsAdManager/samples/V1/TeamServiceClient/batch_activate_teams.php new file mode 100644 index 000000000000..45f5f635fbdf --- /dev/null +++ b/AdsAdManager/samples/V1/TeamServiceClient/batch_activate_teams.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchActivateTeamsResponse $response */ + $response = $teamServiceClient->batchActivateTeams($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TeamServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = TeamServiceClient::teamName('[NETWORK_CODE]', '[TEAM]'); + + batch_activate_teams_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_TeamService_BatchActivateTeams_sync] diff --git a/AdsAdManager/samples/V1/TeamServiceClient/batch_create_teams.php b/AdsAdManager/samples/V1/TeamServiceClient/batch_create_teams.php new file mode 100644 index 000000000000..10e8b18f74ad --- /dev/null +++ b/AdsAdManager/samples/V1/TeamServiceClient/batch_create_teams.php @@ -0,0 +1,93 @@ +setDisplayName($requestsTeamDisplayName); + $createTeamRequest = (new CreateTeamRequest()) + ->setParent($formattedRequestsParent) + ->setTeam($requestsTeam); + $requests = [$createTeamRequest,]; + $request = (new BatchCreateTeamsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchCreateTeamsResponse $response */ + $response = $teamServiceClient->batchCreateTeams($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TeamServiceClient::networkName('[NETWORK_CODE]'); + $formattedRequestsParent = TeamServiceClient::networkName('[NETWORK_CODE]'); + $requestsTeamDisplayName = '[DISPLAY_NAME]'; + + batch_create_teams_sample($formattedParent, $formattedRequestsParent, $requestsTeamDisplayName); +} +// [END admanager_v1_generated_TeamService_BatchCreateTeams_sync] diff --git a/AdsAdManager/samples/V1/TeamServiceClient/batch_deactivate_teams.php b/AdsAdManager/samples/V1/TeamServiceClient/batch_deactivate_teams.php new file mode 100644 index 000000000000..b401d6c64267 --- /dev/null +++ b/AdsAdManager/samples/V1/TeamServiceClient/batch_deactivate_teams.php @@ -0,0 +1,79 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchDeactivateTeamsResponse $response */ + $response = $teamServiceClient->batchDeactivateTeams($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TeamServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = TeamServiceClient::teamName('[NETWORK_CODE]', '[TEAM]'); + + batch_deactivate_teams_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_TeamService_BatchDeactivateTeams_sync] diff --git a/AdsAdManager/samples/V1/TeamServiceClient/batch_update_teams.php b/AdsAdManager/samples/V1/TeamServiceClient/batch_update_teams.php new file mode 100644 index 000000000000..87cc83bbffd5 --- /dev/null +++ b/AdsAdManager/samples/V1/TeamServiceClient/batch_update_teams.php @@ -0,0 +1,88 @@ +setDisplayName($requestsTeamDisplayName); + $requestsUpdateMask = new FieldMask(); + $updateTeamRequest = (new UpdateTeamRequest()) + ->setTeam($requestsTeam) + ->setUpdateMask($requestsUpdateMask); + $requests = [$updateTeamRequest,]; + $request = (new BatchUpdateTeamsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdateTeamsResponse $response */ + $response = $teamServiceClient->batchUpdateTeams($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TeamServiceClient::networkName('[NETWORK_CODE]'); + $requestsTeamDisplayName = '[DISPLAY_NAME]'; + + batch_update_teams_sample($formattedParent, $requestsTeamDisplayName); +} +// [END admanager_v1_generated_TeamService_BatchUpdateTeams_sync] diff --git a/AdsAdManager/samples/V1/TeamServiceClient/create_team.php b/AdsAdManager/samples/V1/TeamServiceClient/create_team.php new file mode 100644 index 000000000000..fa220eb9d4f2 --- /dev/null +++ b/AdsAdManager/samples/V1/TeamServiceClient/create_team.php @@ -0,0 +1,78 @@ +setDisplayName($teamDisplayName); + $request = (new CreateTeamRequest()) + ->setParent($formattedParent) + ->setTeam($team); + + // Call the API and handle any network failures. + try { + /** @var Team $response */ + $response = $teamServiceClient->createTeam($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TeamServiceClient::networkName('[NETWORK_CODE]'); + $teamDisplayName = '[DISPLAY_NAME]'; + + create_team_sample($formattedParent, $teamDisplayName); +} +// [END admanager_v1_generated_TeamService_CreateTeam_sync] diff --git a/AdsAdManager/samples/V1/TeamServiceClient/get_team.php b/AdsAdManager/samples/V1/TeamServiceClient/get_team.php new file mode 100644 index 000000000000..a735ed2fb7e4 --- /dev/null +++ b/AdsAdManager/samples/V1/TeamServiceClient/get_team.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Team $response */ + $response = $teamServiceClient->getTeam($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TeamServiceClient::teamName('[NETWORK_CODE]', '[TEAM]'); + + get_team_sample($formattedName); +} +// [END admanager_v1_generated_TeamService_GetTeam_sync] diff --git a/AdsAdManager/samples/V1/TeamServiceClient/list_teams.php b/AdsAdManager/samples/V1/TeamServiceClient/list_teams.php new file mode 100644 index 000000000000..a36097046e4a --- /dev/null +++ b/AdsAdManager/samples/V1/TeamServiceClient/list_teams.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $teamServiceClient->listTeams($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = TeamServiceClient::networkName('[NETWORK_CODE]'); + + list_teams_sample($formattedParent); +} +// [END admanager_v1_generated_TeamService_ListTeams_sync] diff --git a/AdsAdManager/samples/V1/TeamServiceClient/update_team.php b/AdsAdManager/samples/V1/TeamServiceClient/update_team.php new file mode 100644 index 000000000000..a0570a5a99a5 --- /dev/null +++ b/AdsAdManager/samples/V1/TeamServiceClient/update_team.php @@ -0,0 +1,76 @@ +setDisplayName($teamDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateTeamRequest()) + ->setTeam($team) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Team $response */ + $response = $teamServiceClient->updateTeam($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $teamDisplayName = '[DISPLAY_NAME]'; + + update_team_sample($teamDisplayName); +} +// [END admanager_v1_generated_TeamService_UpdateTeam_sync] diff --git a/AdsAdManager/src/V1/AdReviewCenterAd.php b/AdsAdManager/src/V1/AdReviewCenterAd.php new file mode 100644 index 000000000000..484822fd3018 --- /dev/null +++ b/AdsAdManager/src/V1/AdReviewCenterAd.php @@ -0,0 +1,234 @@ +google.ads.admanager.v1.AdReviewCenterAd + */ +class AdReviewCenterAd extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the AdReviewCenterAd. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. `AdReviewCenterAd` ID. + * + * Generated from protobuf field string ad_review_center_ad_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ad_review_center_ad_id = ''; + /** + * Output only. Specifies the ExchangeSyndicationProduct for this + * AdReviewCenterAd. + * + * Generated from protobuf field .google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $product_type = 0; + /** + * The status of the AdReviewCenterAd. + * + * Generated from protobuf field .google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus status = 4; + */ + protected $status = 0; + /** + * Output only. The preview URL that can be embedded or accessed directly + * which will present the rendered contents of the ad. (This URL expires 72 + * hours after being retrieved.). + * + * Generated from protobuf field optional string preview_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $preview_url = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the AdReviewCenterAd. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * @type string $ad_review_center_ad_id + * Output only. `AdReviewCenterAd` ID. + * @type int $product_type + * Output only. Specifies the ExchangeSyndicationProduct for this + * AdReviewCenterAd. + * @type int $status + * The status of the AdReviewCenterAd. + * @type string $preview_url + * Output only. The preview URL that can be embedded or accessed directly + * which will present the rendered contents of the ad. (This URL expires 72 + * hours after being retrieved.). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdReviewCenterAdMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the AdReviewCenterAd. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the AdReviewCenterAd. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. `AdReviewCenterAd` ID. + * + * Generated from protobuf field string ad_review_center_ad_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAdReviewCenterAdId() + { + return $this->ad_review_center_ad_id; + } + + /** + * Output only. `AdReviewCenterAd` ID. + * + * Generated from protobuf field string ad_review_center_ad_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAdReviewCenterAdId($var) + { + GPBUtil::checkString($var, True); + $this->ad_review_center_ad_id = $var; + + return $this; + } + + /** + * Output only. Specifies the ExchangeSyndicationProduct for this + * AdReviewCenterAd. + * + * Generated from protobuf field .google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProductType() + { + return $this->product_type; + } + + /** + * Output only. Specifies the ExchangeSyndicationProduct for this + * AdReviewCenterAd. + * + * Generated from protobuf field .google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProductType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ExchangeSyndicationProductEnum\ExchangeSyndicationProduct::class); + $this->product_type = $var; + + return $this; + } + + /** + * The status of the AdReviewCenterAd. + * + * Generated from protobuf field .google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus status = 4; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of the AdReviewCenterAd. + * + * Generated from protobuf field .google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus status = 4; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\AdReviewCenterAdStatusEnum\AdReviewCenterAdStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Output only. The preview URL that can be embedded or accessed directly + * which will present the rendered contents of the ad. (This URL expires 72 + * hours after being retrieved.). + * + * Generated from protobuf field optional string preview_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPreviewUrl() + { + return isset($this->preview_url) ? $this->preview_url : ''; + } + + public function hasPreviewUrl() + { + return isset($this->preview_url); + } + + public function clearPreviewUrl() + { + unset($this->preview_url); + } + + /** + * Output only. The preview URL that can be embedded or accessed directly + * which will present the rendered contents of the ad. (This URL expires 72 + * hours after being retrieved.). + * + * Generated from protobuf field optional string preview_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPreviewUrl($var) + { + GPBUtil::checkString($var, True); + $this->preview_url = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/AdReviewCenterAdStatusEnum.php b/AdsAdManager/src/V1/AdReviewCenterAdStatusEnum.php new file mode 100644 index 000000000000..3803c007729b --- /dev/null +++ b/AdsAdManager/src/V1/AdReviewCenterAdStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.AdReviewCenterAdStatusEnum + */ +class AdReviewCenterAdStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdReviewCenterAdEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/AdReviewCenterAdStatusEnum/AdReviewCenterAdStatus.php b/AdsAdManager/src/V1/AdReviewCenterAdStatusEnum/AdReviewCenterAdStatus.php new file mode 100644 index 000000000000..22ce595daba1 --- /dev/null +++ b/AdsAdManager/src/V1/AdReviewCenterAdStatusEnum/AdReviewCenterAdStatus.php @@ -0,0 +1,69 @@ +google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus + */ +class AdReviewCenterAdStatus +{ + /** + * Not specified value + * + * Generated from protobuf enum AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED = 0; + */ + const AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED = 0; + /** + * This ad has been explicitly allowed to serve. + * + * Generated from protobuf enum ALLOWED = 1; + */ + const ALLOWED = 1; + /** + * This ad has been explicitly blocked from serving. + * + * Generated from protobuf enum BLOCKED = 2; + */ + const BLOCKED = 2; + /** + * This ad is allowed to serve by default and has not been reviewed. + * + * Generated from protobuf enum UNREVIEWED = 3; + */ + const UNREVIEWED = 3; + + private static $valueToName = [ + self::AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED => 'AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED', + self::ALLOWED => 'ALLOWED', + self::BLOCKED => 'BLOCKED', + self::UNREVIEWED => 'UNREVIEWED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/AdUnitParent.php b/AdsAdManager/src/V1/AdUnitParent.php index 558682858ed9..769f73062c74 100644 --- a/AdsAdManager/src/V1/AdUnitParent.php +++ b/AdsAdManager/src/V1/AdUnitParent.php @@ -19,22 +19,22 @@ class AdUnitParent extends \Google\Protobuf\Internal\Message * Output only. The parent of the current AdUnit * Format: `networks/{network_code}/adUnits/{ad_unit_id}` * - * Generated from protobuf field string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * Generated from protobuf field optional string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { */ - protected $parent_ad_unit = ''; + protected $parent_ad_unit = null; /** * Output only. The display name of the parent AdUnit. * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $display_name = ''; + protected $display_name = null; /** * Output only. A string used to uniquely identify the ad unit for the * purposes of serving the ad. * - * Generated from protobuf field string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $ad_unit_code = ''; + protected $ad_unit_code = null; /** * Constructor. @@ -61,19 +61,29 @@ public function __construct($data = NULL) { * Output only. The parent of the current AdUnit * Format: `networks/{network_code}/adUnits/{ad_unit_id}` * - * Generated from protobuf field string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * Generated from protobuf field optional string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { * @return string */ public function getParentAdUnit() { - return $this->parent_ad_unit; + return isset($this->parent_ad_unit) ? $this->parent_ad_unit : ''; + } + + public function hasParentAdUnit() + { + return isset($this->parent_ad_unit); + } + + public function clearParentAdUnit() + { + unset($this->parent_ad_unit); } /** * Output only. The parent of the current AdUnit * Format: `networks/{network_code}/adUnits/{ad_unit_id}` * - * Generated from protobuf field string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * Generated from protobuf field optional string parent_ad_unit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { * @param string $var * @return $this */ @@ -88,18 +98,28 @@ public function setParentAdUnit($var) /** * Output only. The display name of the parent AdUnit. * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getDisplayName() { - return $this->display_name; + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); } /** * Output only. The display name of the parent AdUnit. * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ @@ -115,19 +135,29 @@ public function setDisplayName($var) * Output only. A string used to uniquely identify the ad unit for the * purposes of serving the ad. * - * Generated from protobuf field string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getAdUnitCode() { - return $this->ad_unit_code; + return isset($this->ad_unit_code) ? $this->ad_unit_code : ''; + } + + public function hasAdUnitCode() + { + return isset($this->ad_unit_code); + } + + public function clearAdUnitCode() + { + unset($this->ad_unit_code); } /** * Output only. A string used to uniquely identify the ad unit for the * purposes of serving the ad. * - * Generated from protobuf field string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional string ad_unit_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ diff --git a/AdsAdManager/src/V1/AdUnitSize.php b/AdsAdManager/src/V1/AdUnitSize.php index 43ee5cd761d8..5e828df22a2c 100644 --- a/AdsAdManager/src/V1/AdUnitSize.php +++ b/AdsAdManager/src/V1/AdUnitSize.php @@ -18,15 +18,15 @@ class AdUnitSize extends \Google\Protobuf\Internal\Message /** * Required. The Size of the AdUnit. * - * Generated from protobuf field .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; */ protected $size = null; /** * Required. The EnvironmentType of the AdUnit * - * Generated from protobuf field .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED]; */ - protected $environment_type = 0; + protected $environment_type = null; /** * The companions for this ad unit size. Companions are only valid if the * environment is @@ -60,7 +60,7 @@ public function __construct($data = NULL) { /** * Required. The Size of the AdUnit. * - * Generated from protobuf field .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Ads\AdManager\V1\Size|null */ public function getSize() @@ -81,7 +81,7 @@ public function clearSize() /** * Required. The Size of the AdUnit. * - * Generated from protobuf field .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Ads\AdManager\V1\Size $var * @return $this */ @@ -96,18 +96,28 @@ public function setSize($var) /** * Required. The EnvironmentType of the AdUnit * - * Generated from protobuf field .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED]; * @return int */ public function getEnvironmentType() { - return $this->environment_type; + return isset($this->environment_type) ? $this->environment_type : 0; + } + + public function hasEnvironmentType() + { + return isset($this->environment_type); + } + + public function clearEnvironmentType() + { + unset($this->environment_type); } /** * Required. The EnvironmentType of the AdUnit * - * Generated from protobuf field .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED]; * @param int $var * @return $this */ diff --git a/AdsAdManager/src/V1/Application.php b/AdsAdManager/src/V1/Application.php new file mode 100644 index 000000000000..e84631bece78 --- /dev/null +++ b/AdsAdManager/src/V1/Application.php @@ -0,0 +1,120 @@ +google.ads.admanager.v1.Application + */ +class Application extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Application`. + * Format: `networks/{network_code}/applications/{application_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The display name of the application. This attribute is required + * and has a maximum length of 80 characters. + * + * Generated from protobuf field optional string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Application`. + * Format: `networks/{network_code}/applications/{application_id}` + * @type string $display_name + * Optional. The display name of the application. This attribute is required + * and has a maximum length of 80 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ApplicationMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Application`. + * Format: `networks/{network_code}/applications/{application_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `Application`. + * Format: `networks/{network_code}/applications/{application_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The display name of the application. This attribute is required + * and has a maximum length of 80 characters. + * + * Generated from protobuf field optional string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Optional. The display name of the application. This attribute is required + * and has a maximum length of 80 characters. + * + * Generated from protobuf field optional string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/AudienceSegment.php b/AdsAdManager/src/V1/AudienceSegment.php new file mode 100644 index 000000000000..2692e2aea4cd --- /dev/null +++ b/AdsAdManager/src/V1/AudienceSegment.php @@ -0,0 +1,131 @@ +google.ads.admanager.v1.AudienceSegment + */ +class AudienceSegment extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `AudienceSegment`. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + * The `audience_segment_id` may have up to 1 of the following suffixes: + * - `~direct` for directly licensed third-party segments + * - `~global` for globally licensed third-party segments + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Display name of the `AudienceSegment`. The attribute has a + * maximum length of 255 characters. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `AudienceSegment`. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + * The `audience_segment_id` may have up to 1 of the following suffixes: + * - `~direct` for directly licensed third-party segments + * - `~global` for globally licensed third-party segments + * @type string $display_name + * Required. Display name of the `AudienceSegment`. The attribute has a + * maximum length of 255 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AudienceSegmentMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `AudienceSegment`. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + * The `audience_segment_id` may have up to 1 of the following suffixes: + * - `~direct` for directly licensed third-party segments + * - `~global` for globally licensed third-party segments + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `AudienceSegment`. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + * The `audience_segment_id` may have up to 1 of the following suffixes: + * - `~direct` for directly licensed third-party segments + * - `~global` for globally licensed third-party segments + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Display name of the `AudienceSegment`. The attribute has a + * maximum length of 255 characters. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Required. Display name of the `AudienceSegment`. The attribute has a + * maximum length of 255 characters. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/AudienceSegmentTargeting.php b/AdsAdManager/src/V1/AudienceSegmentTargeting.php new file mode 100644 index 000000000000..78f0635e1c92 --- /dev/null +++ b/AdsAdManager/src/V1/AudienceSegmentTargeting.php @@ -0,0 +1,136 @@ +google.ads.admanager.v1.AudienceSegmentTargeting + */ +class AudienceSegmentTargeting extends \Google\Protobuf\Internal\Message +{ + /** + * Whether this expression is negatively targeted, meaning it matches + * ad requests that exclude the below values. + * + * Generated from protobuf field optional bool negative = 1; + */ + protected $negative = null; + /** + * Optional. The targeted audience segments. + * This is either the resource name of a first-party audience segment or an + * alias to the effective third-party audience segment. Third-party audience + * segment resource names containing `~direct` or `~global` will be normalized + * by the server. For example, `networks/1234/audienceSegments/4567~direct` + * will be normalized to `networks/1234/audienceSegments/4567`. + * + * Generated from protobuf field repeated string audience_segments = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $audience_segments; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $negative + * Whether this expression is negatively targeted, meaning it matches + * ad requests that exclude the below values. + * @type array|\Google\Protobuf\Internal\RepeatedField $audience_segments + * Optional. The targeted audience segments. + * This is either the resource name of a first-party audience segment or an + * alias to the effective third-party audience segment. Third-party audience + * segment resource names containing `~direct` or `~global` will be normalized + * by the server. For example, `networks/1234/audienceSegments/4567~direct` + * will be normalized to `networks/1234/audienceSegments/4567`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + parent::__construct($data); + } + + /** + * Whether this expression is negatively targeted, meaning it matches + * ad requests that exclude the below values. + * + * Generated from protobuf field optional bool negative = 1; + * @return bool + */ + public function getNegative() + { + return isset($this->negative) ? $this->negative : false; + } + + public function hasNegative() + { + return isset($this->negative); + } + + public function clearNegative() + { + unset($this->negative); + } + + /** + * Whether this expression is negatively targeted, meaning it matches + * ad requests that exclude the below values. + * + * Generated from protobuf field optional bool negative = 1; + * @param bool $var + * @return $this + */ + public function setNegative($var) + { + GPBUtil::checkBool($var); + $this->negative = $var; + + return $this; + } + + /** + * Optional. The targeted audience segments. + * This is either the resource name of a first-party audience segment or an + * alias to the effective third-party audience segment. Third-party audience + * segment resource names containing `~direct` or `~global` will be normalized + * by the server. For example, `networks/1234/audienceSegments/4567~direct` + * will be normalized to `networks/1234/audienceSegments/4567`. + * + * Generated from protobuf field repeated string audience_segments = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAudienceSegments() + { + return $this->audience_segments; + } + + /** + * Optional. The targeted audience segments. + * This is either the resource name of a first-party audience segment or an + * alias to the effective third-party audience segment. Third-party audience + * segment resource names containing `~direct` or `~global` will be normalized + * by the server. For example, `networks/1234/audienceSegments/4567~direct` + * will be normalized to `networks/1234/audienceSegments/4567`. + * + * Generated from protobuf field repeated string audience_segments = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAudienceSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->audience_segments = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchActivateCustomFieldsRequest.php b/AdsAdManager/src/V1/BatchActivateCustomFieldsRequest.php new file mode 100644 index 000000000000..c22b27d4bb20 --- /dev/null +++ b/AdsAdManager/src/V1/BatchActivateCustomFieldsRequest.php @@ -0,0 +1,123 @@ +google.ads.admanager.v1.BatchActivateCustomFieldsRequest + */ +class BatchActivateCustomFieldsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource names of the `CustomField` objects to activate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. Format: `networks/{network_code}` + * Please see {@see CustomFieldServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the `CustomField` objects to activate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * Please see {@see CustomFieldServiceClient::customFieldName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchActivateCustomFieldsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `networks/{network_code}` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The resource names of the `CustomField` objects to activate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource names of the `CustomField` objects to activate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the `CustomField` objects to activate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchActivateCustomFieldsResponse.php b/AdsAdManager/src/V1/BatchActivateCustomFieldsResponse.php new file mode 100644 index 000000000000..5160bb39e9d9 --- /dev/null +++ b/AdsAdManager/src/V1/BatchActivateCustomFieldsResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchActivateCustomFieldsResponse + */ +class BatchActivateCustomFieldsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchActivatePlacementsRequest.php b/AdsAdManager/src/V1/BatchActivatePlacementsRequest.php new file mode 100644 index 000000000000..060ac81adebe --- /dev/null +++ b/AdsAdManager/src/V1/BatchActivatePlacementsRequest.php @@ -0,0 +1,123 @@ +google.ads.admanager.v1.BatchActivatePlacementsRequest + */ +class BatchActivatePlacementsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The names of the `Placement` objects to activate. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. Format: `networks/{network_code}` + * Please see {@see PlacementServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The names of the `Placement` objects to activate. + * Format: `networks/{network_code}/placements/{placement_id}` + * Please see {@see PlacementServiceClient::placementName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchActivatePlacementsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `networks/{network_code}` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The names of the `Placement` objects to activate. + * Format: `networks/{network_code}/placements/{placement_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The names of the `Placement` objects to activate. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The names of the `Placement` objects to activate. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchActivatePlacementsResponse.php b/AdsAdManager/src/V1/BatchActivatePlacementsResponse.php new file mode 100644 index 000000000000..feb3c8a2bef6 --- /dev/null +++ b/AdsAdManager/src/V1/BatchActivatePlacementsResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchActivatePlacementsResponse + */ +class BatchActivatePlacementsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchActivateTeamsRequest.php b/AdsAdManager/src/V1/BatchActivateTeamsRequest.php new file mode 100644 index 000000000000..ffb18294ed16 --- /dev/null +++ b/AdsAdManager/src/V1/BatchActivateTeamsRequest.php @@ -0,0 +1,123 @@ +google.ads.admanager.v1.BatchActivateTeamsRequest + */ +class BatchActivateTeamsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource names of the `Team`s to activate. + * Format: `networks/{network_code}/teams/{team_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. Format: `networks/{network_code}` + * Please see {@see TeamServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the `Team`s to activate. + * Format: `networks/{network_code}/teams/{team_id}` + * Please see {@see TeamServiceClient::teamName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchActivateTeamsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `networks/{network_code}` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The resource names of the `Team`s to activate. + * Format: `networks/{network_code}/teams/{team_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource names of the `Team`s to activate. + * Format: `networks/{network_code}/teams/{team_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the `Team`s to activate. + * Format: `networks/{network_code}/teams/{team_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchActivateTeamsResponse.php b/AdsAdManager/src/V1/BatchActivateTeamsResponse.php new file mode 100644 index 000000000000..e3d800fd9df4 --- /dev/null +++ b/AdsAdManager/src/V1/BatchActivateTeamsResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchActivateTeamsResponse + */ +class BatchActivateTeamsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchAdReviewCenterAdsOperationMetadata.php b/AdsAdManager/src/V1/BatchAdReviewCenterAdsOperationMetadata.php new file mode 100644 index 000000000000..28edd5b90bb6 --- /dev/null +++ b/AdsAdManager/src/V1/BatchAdReviewCenterAdsOperationMetadata.php @@ -0,0 +1,72 @@ +google.ads.admanager.v1.BatchAdReviewCenterAdsOperationMetadata + */ +class BatchAdReviewCenterAdsOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The status of each failed request, keyed by the index of the corresponding + * request in the batch request. + * + * Generated from protobuf field map failed_requests = 1; + */ + private $failed_requests; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $failed_requests + * The status of each failed request, keyed by the index of the corresponding + * request in the batch request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdReviewCenterAdService::initOnce(); + parent::__construct($data); + } + + /** + * The status of each failed request, keyed by the index of the corresponding + * request in the batch request. + * + * Generated from protobuf field map failed_requests = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFailedRequests() + { + return $this->failed_requests; + } + + /** + * The status of each failed request, keyed by the index of the corresponding + * request in the batch request. + * + * Generated from protobuf field map failed_requests = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFailedRequests($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->failed_requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchAllowAdReviewCenterAdsRequest.php b/AdsAdManager/src/V1/BatchAllowAdReviewCenterAdsRequest.php new file mode 100644 index 000000000000..4bcfaf3f372f --- /dev/null +++ b/AdsAdManager/src/V1/BatchAllowAdReviewCenterAdsRequest.php @@ -0,0 +1,168 @@ +google.ads.admanager.v1.BatchAllowAdReviewCenterAdsRequest + */ +class BatchAllowAdReviewCenterAdsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource names of the `AdReviewCenterAd`s to allow. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * + * `networks/{network_code}/webProperties/display` + * + * `networks/{network_code}/webProperties/videoAndAudio` + * + * `networks/{network_code}/webProperties/mobileApp` + * + * `networks/{network_code}/webProperties/games` + * Please see {@see AdReviewCenterAdServiceClient::webPropertyName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchAllowAdReviewCenterAdsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The resource names of the `AdReviewCenterAd`s to allow. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdReviewCenterAdService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource names of the `AdReviewCenterAd`s to allow. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the `AdReviewCenterAd`s to allow. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchAllowAdReviewCenterAdsResponse.php b/AdsAdManager/src/V1/BatchAllowAdReviewCenterAdsResponse.php new file mode 100644 index 000000000000..b161bfc12d77 --- /dev/null +++ b/AdsAdManager/src/V1/BatchAllowAdReviewCenterAdsResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchAllowAdReviewCenterAdsResponse + */ +class BatchAllowAdReviewCenterAdsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdReviewCenterAdService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchArchivePlacementsRequest.php b/AdsAdManager/src/V1/BatchArchivePlacementsRequest.php new file mode 100644 index 000000000000..035188fb150f --- /dev/null +++ b/AdsAdManager/src/V1/BatchArchivePlacementsRequest.php @@ -0,0 +1,123 @@ +google.ads.admanager.v1.BatchArchivePlacementsRequest + */ +class BatchArchivePlacementsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The names of the `Placement` objects to archive. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. Format: `networks/{network_code}` + * Please see {@see PlacementServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The names of the `Placement` objects to archive. + * Format: `networks/{network_code}/placements/{placement_id}` + * Please see {@see PlacementServiceClient::placementName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchArchivePlacementsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `networks/{network_code}` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The names of the `Placement` objects to archive. + * Format: `networks/{network_code}/placements/{placement_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The names of the `Placement` objects to archive. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The names of the `Placement` objects to archive. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchArchivePlacementsResponse.php b/AdsAdManager/src/V1/BatchArchivePlacementsResponse.php new file mode 100644 index 000000000000..dcded5d2f034 --- /dev/null +++ b/AdsAdManager/src/V1/BatchArchivePlacementsResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchArchivePlacementsResponse + */ +class BatchArchivePlacementsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchBlockAdReviewCenterAdsRequest.php b/AdsAdManager/src/V1/BatchBlockAdReviewCenterAdsRequest.php new file mode 100644 index 000000000000..d2d7dd0d45d4 --- /dev/null +++ b/AdsAdManager/src/V1/BatchBlockAdReviewCenterAdsRequest.php @@ -0,0 +1,168 @@ +google.ads.admanager.v1.BatchBlockAdReviewCenterAdsRequest + */ +class BatchBlockAdReviewCenterAdsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource names of the `AdReviewCenterAd`s to block. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * + * `networks/{network_code}/webProperties/display` + * + * `networks/{network_code}/webProperties/videoAndAudio` + * + * `networks/{network_code}/webProperties/mobileApp` + * + * `networks/{network_code}/webProperties/games` + * Please see {@see AdReviewCenterAdServiceClient::webPropertyName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchBlockAdReviewCenterAdsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The resource names of the `AdReviewCenterAd`s to block. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdReviewCenterAdService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource names of the `AdReviewCenterAd`s to block. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the `AdReviewCenterAd`s to block. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchBlockAdReviewCenterAdsResponse.php b/AdsAdManager/src/V1/BatchBlockAdReviewCenterAdsResponse.php new file mode 100644 index 000000000000..d2e38343adce --- /dev/null +++ b/AdsAdManager/src/V1/BatchBlockAdReviewCenterAdsResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchBlockAdReviewCenterAdsResponse + */ +class BatchBlockAdReviewCenterAdsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdReviewCenterAdService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateContactsRequest.php b/AdsAdManager/src/V1/BatchCreateContactsRequest.php new file mode 100644 index 000000000000..a7ba7b527108 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateContactsRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchCreateContactsRequest + */ +class BatchCreateContactsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Contacts` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateContactRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Contact` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateContactRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Contacts` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateContactRequest must match this + * field. Please see + * {@see ContactServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\CreateContactRequest[] $requests Required. The `Contact` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchCreateContactsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `Contacts` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateContactRequest must match this + * field. + * @type array<\Google\Ads\AdManager\V1\CreateContactRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `Contact` objects to create. + * A maximum of 100 objects can be created in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Contacts` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateContactRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where `Contacts` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateContactRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Contact` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateContactRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Contact` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateContactRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\CreateContactRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreateContactRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateContactsResponse.php b/AdsAdManager/src/V1/BatchCreateContactsResponse.php new file mode 100644 index 000000000000..50790d5194f9 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateContactsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchCreateContactsResponse + */ +class BatchCreateContactsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Contact` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Contact contacts = 1; + */ + private $contacts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $contacts + * The `Contact` objects created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactService::initOnce(); + parent::__construct($data); + } + + /** + * The `Contact` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Contact contacts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContacts() + { + return $this->contacts; + } + + /** + * The `Contact` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Contact contacts = 1; + * @param array<\Google\Ads\AdManager\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Contact::class); + $this->contacts = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateCustomFieldsRequest.php b/AdsAdManager/src/V1/BatchCreateCustomFieldsRequest.php new file mode 100644 index 000000000000..f1d58a0125a6 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateCustomFieldsRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchCreateCustomFieldsRequest + */ +class BatchCreateCustomFieldsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `CustomFields` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateCustomFieldRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `CustomField` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateCustomFieldRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `CustomFields` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateCustomFieldRequest must match this + * field. Please see + * {@see CustomFieldServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\CreateCustomFieldRequest[] $requests Required. The `CustomField` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchCreateCustomFieldsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `CustomFields` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateCustomFieldRequest must match this + * field. + * @type array<\Google\Ads\AdManager\V1\CreateCustomFieldRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `CustomField` objects to create. + * A maximum of 100 objects can be created in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `CustomFields` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateCustomFieldRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where `CustomFields` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateCustomFieldRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `CustomField` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateCustomFieldRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `CustomField` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateCustomFieldRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\CreateCustomFieldRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreateCustomFieldRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateCustomFieldsResponse.php b/AdsAdManager/src/V1/BatchCreateCustomFieldsResponse.php new file mode 100644 index 000000000000..6cda005ff91d --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateCustomFieldsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchCreateCustomFieldsResponse + */ +class BatchCreateCustomFieldsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `CustomField` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomField custom_fields = 1; + */ + private $custom_fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\CustomField>|\Google\Protobuf\Internal\RepeatedField $custom_fields + * The `CustomField` objects created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * The `CustomField` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomField custom_fields = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomFields() + { + return $this->custom_fields; + } + + /** + * The `CustomField` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomField custom_fields = 1; + * @param array<\Google\Ads\AdManager\V1\CustomField>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CustomField::class); + $this->custom_fields = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreatePlacementsRequest.php b/AdsAdManager/src/V1/BatchCreatePlacementsRequest.php new file mode 100644 index 000000000000..eb5d7fef82c6 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreatePlacementsRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchCreatePlacementsRequest + */ +class BatchCreatePlacementsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where the `Placement`s will be created. + * Format: `networks/{network_code}` + * The parent field in the CreatePlacementRequest messages match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Placement` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreatePlacementRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where the `Placement`s will be created. + * Format: `networks/{network_code}` + * The parent field in the CreatePlacementRequest messages match this + * field. Please see + * {@see PlacementServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\CreatePlacementRequest[] $requests Required. The `Placement` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchCreatePlacementsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where the `Placement`s will be created. + * Format: `networks/{network_code}` + * The parent field in the CreatePlacementRequest messages match this + * field. + * @type array<\Google\Ads\AdManager\V1\CreatePlacementRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `Placement` objects to create. + * A maximum of 100 objects can be created in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where the `Placement`s will be created. + * Format: `networks/{network_code}` + * The parent field in the CreatePlacementRequest messages match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where the `Placement`s will be created. + * Format: `networks/{network_code}` + * The parent field in the CreatePlacementRequest messages match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Placement` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreatePlacementRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Placement` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreatePlacementRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\CreatePlacementRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreatePlacementRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreatePlacementsResponse.php b/AdsAdManager/src/V1/BatchCreatePlacementsResponse.php new file mode 100644 index 000000000000..8db789ef1069 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreatePlacementsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchCreatePlacementsResponse + */ +class BatchCreatePlacementsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Placement` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Placement placements = 1; + */ + private $placements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Placement>|\Google\Protobuf\Internal\RepeatedField $placements + * The `Placement` objects created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * The `Placement` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Placement placements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPlacements() + { + return $this->placements; + } + + /** + * The `Placement` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Placement placements = 1; + * @param array<\Google\Ads\AdManager\V1\Placement>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPlacements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Placement::class); + $this->placements = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateSitesRequest.php b/AdsAdManager/src/V1/BatchCreateSitesRequest.php new file mode 100644 index 000000000000..7e12c092835c --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateSitesRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchCreateSitesRequest + */ +class BatchCreateSitesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Sites` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSiteRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Site` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateSiteRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Sites` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSiteRequest must match this + * field. Please see + * {@see SiteServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\CreateSiteRequest[] $requests Required. The `Site` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchCreateSitesRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `Sites` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSiteRequest must match this + * field. + * @type array<\Google\Ads\AdManager\V1\CreateSiteRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `Site` objects to create. + * A maximum of 100 objects can be created in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Sites` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSiteRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where `Sites` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSiteRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Site` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateSiteRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Site` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateSiteRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\CreateSiteRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreateSiteRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateSitesResponse.php b/AdsAdManager/src/V1/BatchCreateSitesResponse.php new file mode 100644 index 000000000000..60c33abbaef9 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateSitesResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchCreateSitesResponse + */ +class BatchCreateSitesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Site` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Site sites = 1; + */ + private $sites; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Site>|\Google\Protobuf\Internal\RepeatedField $sites + * The `Site` objects created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * The `Site` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Site sites = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSites() + { + return $this->sites; + } + + /** + * The `Site` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Site sites = 1; + * @param array<\Google\Ads\AdManager\V1\Site>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Site::class); + $this->sites = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateTeamsRequest.php b/AdsAdManager/src/V1/BatchCreateTeamsRequest.php new file mode 100644 index 000000000000..848f190acfce --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateTeamsRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchCreateTeamsRequest + */ +class BatchCreateTeamsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Teams` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateTeamRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Team` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateTeamRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Teams` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateTeamRequest must match this + * field. Please see + * {@see TeamServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\CreateTeamRequest[] $requests Required. The `Team` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchCreateTeamsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `Teams` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateTeamRequest must match this + * field. + * @type array<\Google\Ads\AdManager\V1\CreateTeamRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `Team` objects to create. + * A maximum of 100 objects can be created in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Teams` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateTeamRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where `Teams` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateTeamRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Team` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateTeamRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Team` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateTeamRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\CreateTeamRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreateTeamRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateTeamsResponse.php b/AdsAdManager/src/V1/BatchCreateTeamsResponse.php new file mode 100644 index 000000000000..ae5a9b5e95a4 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateTeamsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchCreateTeamsResponse + */ +class BatchCreateTeamsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Team` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Team teams = 1; + */ + private $teams; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Team>|\Google\Protobuf\Internal\RepeatedField $teams + * The `Team` objects created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * The `Team` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Team teams = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTeams() + { + return $this->teams; + } + + /** + * The `Team` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Team teams = 1; + * @param array<\Google\Ads\AdManager\V1\Team>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTeams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Team::class); + $this->teams = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchDeactivateCustomFieldsRequest.php b/AdsAdManager/src/V1/BatchDeactivateCustomFieldsRequest.php new file mode 100644 index 000000000000..e7a3bfc62a21 --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeactivateCustomFieldsRequest.php @@ -0,0 +1,123 @@ +google.ads.admanager.v1.BatchDeactivateCustomFieldsRequest + */ +class BatchDeactivateCustomFieldsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource names of the `CustomField` objects to deactivate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. Format: `networks/{network_code}` + * Please see {@see CustomFieldServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the `CustomField` objects to deactivate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * Please see {@see CustomFieldServiceClient::customFieldName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchDeactivateCustomFieldsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `networks/{network_code}` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The resource names of the `CustomField` objects to deactivate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource names of the `CustomField` objects to deactivate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the `CustomField` objects to deactivate. + * Format: `networks/{network_code}/customFields/{custom_field_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchDeactivateCustomFieldsResponse.php b/AdsAdManager/src/V1/BatchDeactivateCustomFieldsResponse.php new file mode 100644 index 000000000000..f81e91ecb4cc --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeactivateCustomFieldsResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchDeactivateCustomFieldsResponse + */ +class BatchDeactivateCustomFieldsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchDeactivatePlacementsRequest.php b/AdsAdManager/src/V1/BatchDeactivatePlacementsRequest.php new file mode 100644 index 000000000000..3940c8307af1 --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeactivatePlacementsRequest.php @@ -0,0 +1,123 @@ +google.ads.admanager.v1.BatchDeactivatePlacementsRequest + */ +class BatchDeactivatePlacementsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The names of the `Placement` objects to deactivate. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. Format: `networks/{network_code}` + * Please see {@see PlacementServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The names of the `Placement` objects to deactivate. + * Format: `networks/{network_code}/placements/{placement_id}` + * Please see {@see PlacementServiceClient::placementName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchDeactivatePlacementsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `networks/{network_code}` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The names of the `Placement` objects to deactivate. + * Format: `networks/{network_code}/placements/{placement_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The names of the `Placement` objects to deactivate. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The names of the `Placement` objects to deactivate. + * Format: `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchDeactivatePlacementsResponse.php b/AdsAdManager/src/V1/BatchDeactivatePlacementsResponse.php new file mode 100644 index 000000000000..a8efb235cb2e --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeactivatePlacementsResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchDeactivatePlacementsResponse + */ +class BatchDeactivatePlacementsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchDeactivateSitesRequest.php b/AdsAdManager/src/V1/BatchDeactivateSitesRequest.php new file mode 100644 index 000000000000..cafc463b9278 --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeactivateSitesRequest.php @@ -0,0 +1,117 @@ +google.ads.admanager.v1.BatchDeactivateSitesRequest + */ +class BatchDeactivateSitesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource names of the `Site` objects to deactivate. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $names; + + /** + * @param string $parent Required. Format: `networks/{network_code}` + * Please see {@see SiteServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the `Site` objects to deactivate. + * + * @return \Google\Ads\AdManager\V1\BatchDeactivateSitesRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `networks/{network_code}` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The resource names of the `Site` objects to deactivate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource names of the `Site` objects to deactivate. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the `Site` objects to deactivate. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchDeactivateSitesResponse.php b/AdsAdManager/src/V1/BatchDeactivateSitesResponse.php new file mode 100644 index 000000000000..311d9f641eca --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeactivateSitesResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchDeactivateSitesResponse + */ +class BatchDeactivateSitesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchDeactivateTeamsRequest.php b/AdsAdManager/src/V1/BatchDeactivateTeamsRequest.php new file mode 100644 index 000000000000..d329134510a6 --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeactivateTeamsRequest.php @@ -0,0 +1,123 @@ +google.ads.admanager.v1.BatchDeactivateTeamsRequest + */ +class BatchDeactivateTeamsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource names of the `Team`s to deactivate. + * Format: `networks/{network_code}/teams/{team_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. Format: `networks/{network_code}` + * Please see {@see TeamServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the `Team`s to deactivate. + * Format: `networks/{network_code}/teams/{team_id}` + * Please see {@see TeamServiceClient::teamName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchDeactivateTeamsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `networks/{network_code}` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The resource names of the `Team`s to deactivate. + * Format: `networks/{network_code}/teams/{team_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource names of the `Team`s to deactivate. + * Format: `networks/{network_code}/teams/{team_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the `Team`s to deactivate. + * Format: `networks/{network_code}/teams/{team_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchDeactivateTeamsResponse.php b/AdsAdManager/src/V1/BatchDeactivateTeamsResponse.php new file mode 100644 index 000000000000..d8f2612512ac --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeactivateTeamsResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchDeactivateTeamsResponse + */ +class BatchDeactivateTeamsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchSubmitSitesForApprovalRequest.php b/AdsAdManager/src/V1/BatchSubmitSitesForApprovalRequest.php new file mode 100644 index 000000000000..fcb675e6a45f --- /dev/null +++ b/AdsAdManager/src/V1/BatchSubmitSitesForApprovalRequest.php @@ -0,0 +1,117 @@ +google.ads.admanager.v1.BatchSubmitSitesForApprovalRequest + */ +class BatchSubmitSitesForApprovalRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource names of the `Site` objects to submit for approval. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $names; + + /** + * @param string $parent Required. Format: `networks/{network_code}` + * Please see {@see SiteServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the `Site` objects to submit for approval. + * + * @return \Google\Ads\AdManager\V1\BatchSubmitSitesForApprovalRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `networks/{network_code}` + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The resource names of the `Site` objects to submit for approval. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource names of the `Site` objects to submit for approval. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the `Site` objects to submit for approval. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchSubmitSitesForApprovalResponse.php b/AdsAdManager/src/V1/BatchSubmitSitesForApprovalResponse.php new file mode 100644 index 000000000000..c8b2bc89dc43 --- /dev/null +++ b/AdsAdManager/src/V1/BatchSubmitSitesForApprovalResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchSubmitSitesForApprovalResponse + */ +class BatchSubmitSitesForApprovalResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateContactsRequest.php b/AdsAdManager/src/V1/BatchUpdateContactsRequest.php new file mode 100644 index 000000000000..2eeceaa77333 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateContactsRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchUpdateContactsRequest + */ +class BatchUpdateContactsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Contacts` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateContactRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Contact` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateContactRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Contacts` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateContactRequest must match this + * field. Please see + * {@see ContactServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\UpdateContactRequest[] $requests Required. The `Contact` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchUpdateContactsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `Contacts` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateContactRequest must match this + * field. + * @type array<\Google\Ads\AdManager\V1\UpdateContactRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `Contact` objects to update. + * A maximum of 100 objects can be updated in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Contacts` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateContactRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where `Contacts` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateContactRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Contact` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateContactRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Contact` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateContactRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\UpdateContactRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\UpdateContactRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateContactsResponse.php b/AdsAdManager/src/V1/BatchUpdateContactsResponse.php new file mode 100644 index 000000000000..f47fe7abc6ca --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateContactsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchUpdateContactsResponse + */ +class BatchUpdateContactsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Contact` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Contact contacts = 1; + */ + private $contacts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $contacts + * The `Contact` objects updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactService::initOnce(); + parent::__construct($data); + } + + /** + * The `Contact` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Contact contacts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContacts() + { + return $this->contacts; + } + + /** + * The `Contact` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Contact contacts = 1; + * @param array<\Google\Ads\AdManager\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Contact::class); + $this->contacts = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateCustomFieldsRequest.php b/AdsAdManager/src/V1/BatchUpdateCustomFieldsRequest.php new file mode 100644 index 000000000000..b25ce9819255 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateCustomFieldsRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchUpdateCustomFieldsRequest + */ +class BatchUpdateCustomFieldsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `CustomFields` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateCustomFieldRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `CustomField` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateCustomFieldRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `CustomFields` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateCustomFieldRequest must match this + * field. Please see + * {@see CustomFieldServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\UpdateCustomFieldRequest[] $requests Required. The `CustomField` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchUpdateCustomFieldsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `CustomFields` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateCustomFieldRequest must match this + * field. + * @type array<\Google\Ads\AdManager\V1\UpdateCustomFieldRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `CustomField` objects to update. + * A maximum of 100 objects can be updated in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `CustomFields` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateCustomFieldRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where `CustomFields` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateCustomFieldRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `CustomField` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateCustomFieldRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `CustomField` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateCustomFieldRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\UpdateCustomFieldRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\UpdateCustomFieldRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateCustomFieldsResponse.php b/AdsAdManager/src/V1/BatchUpdateCustomFieldsResponse.php new file mode 100644 index 000000000000..f0b1bf1cd5f0 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateCustomFieldsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchUpdateCustomFieldsResponse + */ +class BatchUpdateCustomFieldsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `CustomField` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomField custom_fields = 1; + */ + private $custom_fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\CustomField>|\Google\Protobuf\Internal\RepeatedField $custom_fields + * The `CustomField` objects updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * The `CustomField` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomField custom_fields = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomFields() + { + return $this->custom_fields; + } + + /** + * The `CustomField` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomField custom_fields = 1; + * @param array<\Google\Ads\AdManager\V1\CustomField>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CustomField::class); + $this->custom_fields = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdatePlacementsRequest.php b/AdsAdManager/src/V1/BatchUpdatePlacementsRequest.php new file mode 100644 index 000000000000..e51bc22fb062 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdatePlacementsRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchUpdatePlacementsRequest + */ +class BatchUpdatePlacementsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Placements` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdatePlacementsRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Placement` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdatePlacementRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Placements` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdatePlacementsRequest must match this + * field. Please see + * {@see PlacementServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\UpdatePlacementRequest[] $requests Required. The `Placement` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchUpdatePlacementsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `Placements` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdatePlacementsRequest must match this + * field. + * @type array<\Google\Ads\AdManager\V1\UpdatePlacementRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `Placement` objects to update. + * A maximum of 100 objects can be updated in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Placements` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdatePlacementsRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where `Placements` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdatePlacementsRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Placement` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdatePlacementRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Placement` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdatePlacementRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\UpdatePlacementRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\UpdatePlacementRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdatePlacementsResponse.php b/AdsAdManager/src/V1/BatchUpdatePlacementsResponse.php new file mode 100644 index 000000000000..c202bae33996 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdatePlacementsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchUpdatePlacementsResponse + */ +class BatchUpdatePlacementsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Placement` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Placement placements = 1; + */ + private $placements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Placement>|\Google\Protobuf\Internal\RepeatedField $placements + * The `Placement` objects updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * The `Placement` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Placement placements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPlacements() + { + return $this->placements; + } + + /** + * The `Placement` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Placement placements = 1; + * @param array<\Google\Ads\AdManager\V1\Placement>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPlacements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Placement::class); + $this->placements = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateSitesRequest.php b/AdsAdManager/src/V1/BatchUpdateSitesRequest.php new file mode 100644 index 000000000000..ed319ae0f987 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateSitesRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchUpdateSitesRequest + */ +class BatchUpdateSitesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Sites` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSiteRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Site` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateSiteRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Sites` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSiteRequest must match this + * field. Please see + * {@see SiteServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\UpdateSiteRequest[] $requests Required. The `Site` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchUpdateSitesRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `Sites` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSiteRequest must match this + * field. + * @type array<\Google\Ads\AdManager\V1\UpdateSiteRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `Site` objects to update. + * A maximum of 100 objects can be updated in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Sites` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSiteRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where `Sites` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSiteRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Site` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateSiteRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Site` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateSiteRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\UpdateSiteRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\UpdateSiteRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateSitesResponse.php b/AdsAdManager/src/V1/BatchUpdateSitesResponse.php new file mode 100644 index 000000000000..50aed984bbee --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateSitesResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchUpdateSitesResponse + */ +class BatchUpdateSitesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Site` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Site sites = 1; + */ + private $sites; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Site>|\Google\Protobuf\Internal\RepeatedField $sites + * The `Site` objects updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * The `Site` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Site sites = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSites() + { + return $this->sites; + } + + /** + * The `Site` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Site sites = 1; + * @param array<\Google\Ads\AdManager\V1\Site>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Site::class); + $this->sites = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateTeamsRequest.php b/AdsAdManager/src/V1/BatchUpdateTeamsRequest.php new file mode 100644 index 000000000000..5171cafc91d8 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateTeamsRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchUpdateTeamsRequest + */ +class BatchUpdateTeamsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Teams` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTeamRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Team` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateTeamRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Teams` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTeamRequest must match this + * field. Please see + * {@see TeamServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\UpdateTeamRequest[] $requests Required. The `Team` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchUpdateTeamsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where `Teams` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTeamRequest must match this + * field. + * @type array<\Google\Ads\AdManager\V1\UpdateTeamRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The `Team` objects to update. + * A maximum of 100 objects can be updated in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Teams` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTeamRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where `Teams` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTeamRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Team` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateTeamRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Team` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateTeamRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\UpdateTeamRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\UpdateTeamRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateTeamsResponse.php b/AdsAdManager/src/V1/BatchUpdateTeamsResponse.php new file mode 100644 index 000000000000..0ac8d23aec42 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateTeamsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchUpdateTeamsResponse + */ +class BatchUpdateTeamsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Team` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Team teams = 1; + */ + private $teams; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Team>|\Google\Protobuf\Internal\RepeatedField $teams + * The `Team` objects updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * The `Team` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Team teams = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTeams() + { + return $this->teams; + } + + /** + * The `Team` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Team teams = 1; + * @param array<\Google\Ads\AdManager\V1\Team>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTeams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Team::class); + $this->teams = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/Browser.php b/AdsAdManager/src/V1/Browser.php new file mode 100644 index 000000000000..d5eb1a7d51f7 --- /dev/null +++ b/AdsAdManager/src/V1/Browser.php @@ -0,0 +1,203 @@ +google.ads.admanager.v1.Browser + */ +class Browser extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Browser`. + * Format: `networks/{network_code}/browsers/{browser}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The display name of the browser, including version info. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = null; + /** + * Output only. The major version of the browser. + * + * Generated from protobuf field optional string major_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $major_version = null; + /** + * Output only. The minor version of the browser. + * + * Generated from protobuf field optional string minor_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $minor_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Browser`. + * Format: `networks/{network_code}/browsers/{browser}` + * @type string $display_name + * Output only. The display name of the browser, including version info. + * @type string $major_version + * Output only. The major version of the browser. + * @type string $minor_version + * Output only. The minor version of the browser. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\BrowserMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Browser`. + * Format: `networks/{network_code}/browsers/{browser}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `Browser`. + * Format: `networks/{network_code}/browsers/{browser}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The display name of the browser, including version info. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Output only. The display name of the browser, including version info. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The major version of the browser. + * + * Generated from protobuf field optional string major_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMajorVersion() + { + return isset($this->major_version) ? $this->major_version : ''; + } + + public function hasMajorVersion() + { + return isset($this->major_version); + } + + public function clearMajorVersion() + { + unset($this->major_version); + } + + /** + * Output only. The major version of the browser. + * + * Generated from protobuf field optional string major_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMajorVersion($var) + { + GPBUtil::checkString($var, True); + $this->major_version = $var; + + return $this; + } + + /** + * Output only. The minor version of the browser. + * + * Generated from protobuf field optional string minor_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMinorVersion() + { + return isset($this->minor_version) ? $this->minor_version : ''; + } + + public function hasMinorVersion() + { + return isset($this->minor_version); + } + + public function clearMinorVersion() + { + unset($this->minor_version); + } + + /** + * Output only. The minor version of the browser. + * + * Generated from protobuf field optional string minor_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMinorVersion($var) + { + GPBUtil::checkString($var, True); + $this->minor_version = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BrowserLanguage.php b/AdsAdManager/src/V1/BrowserLanguage.php new file mode 100644 index 000000000000..9a0f0f2d8399 --- /dev/null +++ b/AdsAdManager/src/V1/BrowserLanguage.php @@ -0,0 +1,115 @@ +google.ads.admanager.v1.BrowserLanguage + */ +class BrowserLanguage extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `BrowserLanguage`. + * Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The name of the browser language, localized. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `BrowserLanguage`. + * Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + * @type string $display_name + * Output only. The name of the browser language, localized. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\BrowserLanguageMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `BrowserLanguage`. + * Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `BrowserLanguage`. + * Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The name of the browser language, localized. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Output only. The name of the browser language, localized. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BrowserLanguageTargeting.php b/AdsAdManager/src/V1/BrowserLanguageTargeting.php new file mode 100644 index 000000000000..2102f17b3534 --- /dev/null +++ b/AdsAdManager/src/V1/BrowserLanguageTargeting.php @@ -0,0 +1,113 @@ +google.ads.admanager.v1.BrowserLanguageTargeting + */ +class BrowserLanguageTargeting extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of browser language resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_browser_languages = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_browser_languages; + /** + * Optional. A list of browser language resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_browser_languages = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_browser_languages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_browser_languages + * Optional. A list of browser language resource names that should be + * targeted/included. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_browser_languages + * Optional. A list of browser language resource names that should be + * excluded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of browser language resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_browser_languages = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedBrowserLanguages() + { + return $this->targeted_browser_languages; + } + + /** + * Optional. A list of browser language resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_browser_languages = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedBrowserLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_browser_languages = $arr; + + return $this; + } + + /** + * Optional. A list of browser language resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_browser_languages = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedBrowserLanguages() + { + return $this->excluded_browser_languages; + } + + /** + * Optional. A list of browser language resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_browser_languages = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedBrowserLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_browser_languages = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BrowserTargeting.php b/AdsAdManager/src/V1/BrowserTargeting.php new file mode 100644 index 000000000000..c32bd0a26abe --- /dev/null +++ b/AdsAdManager/src/V1/BrowserTargeting.php @@ -0,0 +1,109 @@ + + * Browser). + * + * Generated from protobuf message google.ads.admanager.v1.BrowserTargeting + */ +class BrowserTargeting extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of browser resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_browsers = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_browsers; + /** + * Optional. A list of browser resource names that should be excluded. + * + * Generated from protobuf field repeated string excluded_browsers = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_browsers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_browsers + * Optional. A list of browser resource names that should be + * targeted/included. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_browsers + * Optional. A list of browser resource names that should be excluded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of browser resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_browsers = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedBrowsers() + { + return $this->targeted_browsers; + } + + /** + * Optional. A list of browser resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_browsers = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedBrowsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_browsers = $arr; + + return $this; + } + + /** + * Optional. A list of browser resource names that should be excluded. + * + * Generated from protobuf field repeated string excluded_browsers = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedBrowsers() + { + return $this->excluded_browsers; + } + + /** + * Optional. A list of browser resource names that should be excluded. + * + * Generated from protobuf field repeated string excluded_browsers = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedBrowsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_browsers = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/Client/AdBreakServiceClient.php b/AdsAdManager/src/V1/Client/AdBreakServiceClient.php index 00c55b5e896a..2d246dc314db 100644 --- a/AdsAdManager/src/V1/Client/AdBreakServiceClient.php +++ b/AdsAdManager/src/V1/Client/AdBreakServiceClient.php @@ -85,9 +85,7 @@ final class AdBreakServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -117,9 +115,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** diff --git a/AdsAdManager/src/V1/Client/AdReviewCenterAdServiceClient.php b/AdsAdManager/src/V1/Client/AdReviewCenterAdServiceClient.php new file mode 100644 index 000000000000..16142444f145 --- /dev/null +++ b/AdsAdManager/src/V1/Client/AdReviewCenterAdServiceClient.php @@ -0,0 +1,411 @@ + batchAllowAdReviewCenterAdsAsync(BatchAllowAdReviewCenterAdsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchBlockAdReviewCenterAdsAsync(BatchBlockAdReviewCenterAdsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchAdReviewCenterAdsAsync(SearchAdReviewCenterAdsRequest $request, array $optionalArgs = []) + */ +final class AdReviewCenterAdServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.AdReviewCenterAdService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/ad_review_center_ad_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/ad_review_center_ad_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/ad_review_center_ad_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * ad_review_center_ad resource. + * + * @param string $networkCode + * @param string $webPropertyCode + * @param string $adReviewCenterAd + * + * @return string The formatted ad_review_center_ad resource. + */ + public static function adReviewCenterAdName( + string $networkCode, + string $webPropertyCode, + string $adReviewCenterAd + ): string { + return self::getPathTemplate('adReviewCenterAd')->render([ + 'network_code' => $networkCode, + 'web_property_code' => $webPropertyCode, + 'ad_review_center_ad' => $adReviewCenterAd, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a web_property + * resource. + * + * @param string $networkCode + * @param string $webProperty + * + * @return string The formatted web_property resource. + */ + public static function webPropertyName(string $networkCode, string $webProperty): string + { + return self::getPathTemplate('webProperty')->render([ + 'network_code' => $networkCode, + 'web_property' => $webProperty, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - adReviewCenterAd: networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad} + * - webProperty: networks/{network_code}/webProperties/{web_property} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\AdReviewCenterAdServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new AdReviewCenterAdServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to batch allow AdReviewCenterAds. + * This method supports partial success. Some operations may succeed while + * others fail. Callers should check the failedRequests field in the response + * to determine which operations failed. + * + * The async variant is + * {@see AdReviewCenterAdServiceClient::batchAllowAdReviewCenterAdsAsync()} . + * + * @example samples/V1/AdReviewCenterAdServiceClient/batch_allow_ad_review_center_ads.php + * + * @param BatchAllowAdReviewCenterAdsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchAllowAdReviewCenterAds( + BatchAllowAdReviewCenterAdsRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('BatchAllowAdReviewCenterAds', $request, $callOptions)->wait(); + } + + /** + * API to batch block AdReviewCenterAds. + * This method supports partial success. Some operations may succeed while + * others fail. Callers should check the failedRequests field in the response + * to determine which operations failed. + * + * The async variant is + * {@see AdReviewCenterAdServiceClient::batchBlockAdReviewCenterAdsAsync()} . + * + * @example samples/V1/AdReviewCenterAdServiceClient/batch_block_ad_review_center_ads.php + * + * @param BatchBlockAdReviewCenterAdsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchBlockAdReviewCenterAds( + BatchBlockAdReviewCenterAdsRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('BatchBlockAdReviewCenterAds', $request, $callOptions)->wait(); + } + + /** + * API to search for AdReviewCenterAds. + * + * The async variant is + * {@see AdReviewCenterAdServiceClient::searchAdReviewCenterAdsAsync()} . + * + * @example samples/V1/AdReviewCenterAdServiceClient/search_ad_review_center_ads.php + * + * @param SearchAdReviewCenterAdsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function searchAdReviewCenterAds( + SearchAdReviewCenterAdsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('SearchAdReviewCenterAds', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/AdUnitServiceClient.php b/AdsAdManager/src/V1/Client/AdUnitServiceClient.php index a1759aec2b85..9373836e3318 100644 --- a/AdsAdManager/src/V1/Client/AdUnitServiceClient.php +++ b/AdsAdManager/src/V1/Client/AdUnitServiceClient.php @@ -81,9 +81,7 @@ final class AdUnitServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -113,9 +111,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** diff --git a/AdsAdManager/src/V1/Client/ApplicationServiceClient.php b/AdsAdManager/src/V1/Client/ApplicationServiceClient.php new file mode 100644 index 000000000000..785cb9f3f727 --- /dev/null +++ b/AdsAdManager/src/V1/Client/ApplicationServiceClient.php @@ -0,0 +1,305 @@ + getApplicationAsync(GetApplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listApplicationsAsync(ListApplicationsRequest $request, array $optionalArgs = []) + */ +final class ApplicationServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.ApplicationService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/application_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/application_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/application_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a application + * resource. + * + * @param string $networkCode + * @param string $application + * + * @return string The formatted application resource. + */ + public static function applicationName(string $networkCode, string $application): string + { + return self::getPathTemplate('application')->render([ + 'network_code' => $networkCode, + 'application' => $application, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - application: networks/{network_code}/applications/{application} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\ApplicationServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ApplicationServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `Application` object. + * + * The async variant is {@see ApplicationServiceClient::getApplicationAsync()} . + * + * @example samples/V1/ApplicationServiceClient/get_application.php + * + * @param GetApplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Application + * + * @throws ApiException Thrown if the API call fails. + */ + public function getApplication(GetApplicationRequest $request, array $callOptions = []): Application + { + return $this->startApiCall('GetApplication', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Application` objects. + * + * The async variant is {@see ApplicationServiceClient::listApplicationsAsync()} . + * + * @example samples/V1/ApplicationServiceClient/list_applications.php + * + * @param ListApplicationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listApplications(ListApplicationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListApplications', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/AudienceSegmentServiceClient.php b/AdsAdManager/src/V1/Client/AudienceSegmentServiceClient.php new file mode 100644 index 000000000000..3221d4de1b70 --- /dev/null +++ b/AdsAdManager/src/V1/Client/AudienceSegmentServiceClient.php @@ -0,0 +1,309 @@ + getAudienceSegmentAsync(GetAudienceSegmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAudienceSegmentsAsync(ListAudienceSegmentsRequest $request, array $optionalArgs = []) + */ +final class AudienceSegmentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.AudienceSegmentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/audience_segment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/audience_segment_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/audience_segment_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * audience_segment resource. + * + * @param string $networkCode + * @param string $audienceSegment + * + * @return string The formatted audience_segment resource. + */ + public static function audienceSegmentName(string $networkCode, string $audienceSegment): string + { + return self::getPathTemplate('audienceSegment')->render([ + 'network_code' => $networkCode, + 'audience_segment' => $audienceSegment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - audienceSegment: networks/{network_code}/audienceSegments/{audience_segment} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\AudienceSegmentServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new AudienceSegmentServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve an `AudienceSegment` object. + * + * The async variant is + * {@see AudienceSegmentServiceClient::getAudienceSegmentAsync()} . + * + * @example samples/V1/AudienceSegmentServiceClient/get_audience_segment.php + * + * @param GetAudienceSegmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AudienceSegment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAudienceSegment(GetAudienceSegmentRequest $request, array $callOptions = []): AudienceSegment + { + return $this->startApiCall('GetAudienceSegment', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `AudienceSegment` objects. + * + * The async variant is + * {@see AudienceSegmentServiceClient::listAudienceSegmentsAsync()} . + * + * @example samples/V1/AudienceSegmentServiceClient/list_audience_segments.php + * + * @param ListAudienceSegmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAudienceSegments( + ListAudienceSegmentsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListAudienceSegments', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/BandwidthGroupServiceClient.php b/AdsAdManager/src/V1/Client/BandwidthGroupServiceClient.php index 57bbd0ebc78d..7a6dcf7577d4 100644 --- a/AdsAdManager/src/V1/Client/BandwidthGroupServiceClient.php +++ b/AdsAdManager/src/V1/Client/BandwidthGroupServiceClient.php @@ -79,9 +79,7 @@ final class BandwidthGroupServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -111,9 +109,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** diff --git a/AdsAdManager/src/V1/Client/BrowserLanguageServiceClient.php b/AdsAdManager/src/V1/Client/BrowserLanguageServiceClient.php new file mode 100644 index 000000000000..337c158ddc6c --- /dev/null +++ b/AdsAdManager/src/V1/Client/BrowserLanguageServiceClient.php @@ -0,0 +1,309 @@ + getBrowserLanguageAsync(GetBrowserLanguageRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBrowserLanguagesAsync(ListBrowserLanguagesRequest $request, array $optionalArgs = []) + */ +final class BrowserLanguageServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.BrowserLanguageService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/browser_language_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/browser_language_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/browser_language_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * browser_language resource. + * + * @param string $networkCode + * @param string $browserLanguage + * + * @return string The formatted browser_language resource. + */ + public static function browserLanguageName(string $networkCode, string $browserLanguage): string + { + return self::getPathTemplate('browserLanguage')->render([ + 'network_code' => $networkCode, + 'browser_language' => $browserLanguage, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - browserLanguage: networks/{network_code}/browserLanguages/{browser_language} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\BrowserLanguageServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new BrowserLanguageServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `BrowserLanguage` object. + * + * The async variant is + * {@see BrowserLanguageServiceClient::getBrowserLanguageAsync()} . + * + * @example samples/V1/BrowserLanguageServiceClient/get_browser_language.php + * + * @param GetBrowserLanguageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BrowserLanguage + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBrowserLanguage(GetBrowserLanguageRequest $request, array $callOptions = []): BrowserLanguage + { + return $this->startApiCall('GetBrowserLanguage', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `BrowserLanguage` objects. + * + * The async variant is + * {@see BrowserLanguageServiceClient::listBrowserLanguagesAsync()} . + * + * @example samples/V1/BrowserLanguageServiceClient/list_browser_languages.php + * + * @param ListBrowserLanguagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBrowserLanguages( + ListBrowserLanguagesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListBrowserLanguages', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/BrowserServiceClient.php b/AdsAdManager/src/V1/Client/BrowserServiceClient.php new file mode 100644 index 000000000000..7fbf6c179408 --- /dev/null +++ b/AdsAdManager/src/V1/Client/BrowserServiceClient.php @@ -0,0 +1,305 @@ + getBrowserAsync(GetBrowserRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBrowsersAsync(ListBrowsersRequest $request, array $optionalArgs = []) + */ +final class BrowserServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.BrowserService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/browser_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/browser_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/browser_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a browser + * resource. + * + * @param string $networkCode + * @param string $browser + * + * @return string The formatted browser resource. + */ + public static function browserName(string $networkCode, string $browser): string + { + return self::getPathTemplate('browser')->render([ + 'network_code' => $networkCode, + 'browser' => $browser, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - browser: networks/{network_code}/browsers/{browser} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\BrowserServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new BrowserServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `Browser` object. + * + * The async variant is {@see BrowserServiceClient::getBrowserAsync()} . + * + * @example samples/V1/BrowserServiceClient/get_browser.php + * + * @param GetBrowserRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Browser + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBrowser(GetBrowserRequest $request, array $callOptions = []): Browser + { + return $this->startApiCall('GetBrowser', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Browser` objects. + * + * The async variant is {@see BrowserServiceClient::listBrowsersAsync()} . + * + * @example samples/V1/BrowserServiceClient/list_browsers.php + * + * @param ListBrowsersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBrowsers(ListBrowsersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBrowsers', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/CmsMetadataKeyServiceClient.php b/AdsAdManager/src/V1/Client/CmsMetadataKeyServiceClient.php new file mode 100644 index 000000000000..61b3210686d5 --- /dev/null +++ b/AdsAdManager/src/V1/Client/CmsMetadataKeyServiceClient.php @@ -0,0 +1,307 @@ + getCmsMetadataKeyAsync(GetCmsMetadataKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCmsMetadataKeysAsync(ListCmsMetadataKeysRequest $request, array $optionalArgs = []) + */ +final class CmsMetadataKeyServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.CmsMetadataKeyService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cms_metadata_key_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cms_metadata_key_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cms_metadata_key_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * cms_metadata_key resource. + * + * @param string $networkCode + * @param string $cmsMetadataKey + * + * @return string The formatted cms_metadata_key resource. + */ + public static function cmsMetadataKeyName(string $networkCode, string $cmsMetadataKey): string + { + return self::getPathTemplate('cmsMetadataKey')->render([ + 'network_code' => $networkCode, + 'cms_metadata_key' => $cmsMetadataKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cmsMetadataKey: networks/{network_code}/cmsMetadataKeys/{cms_metadata_key} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\CmsMetadataKeyServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CmsMetadataKeyServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `CmsMetadataKey` object. + * + * The async variant is + * {@see CmsMetadataKeyServiceClient::getCmsMetadataKeyAsync()} . + * + * @example samples/V1/CmsMetadataKeyServiceClient/get_cms_metadata_key.php + * + * @param GetCmsMetadataKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CmsMetadataKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCmsMetadataKey(GetCmsMetadataKeyRequest $request, array $callOptions = []): CmsMetadataKey + { + return $this->startApiCall('GetCmsMetadataKey', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `CmsMetadataKey` objects. + * + * The async variant is + * {@see CmsMetadataKeyServiceClient::listCmsMetadataKeysAsync()} . + * + * @example samples/V1/CmsMetadataKeyServiceClient/list_cms_metadata_keys.php + * + * @param ListCmsMetadataKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCmsMetadataKeys(ListCmsMetadataKeysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCmsMetadataKeys', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/CmsMetadataValueServiceClient.php b/AdsAdManager/src/V1/Client/CmsMetadataValueServiceClient.php new file mode 100644 index 000000000000..141c29e5ba9f --- /dev/null +++ b/AdsAdManager/src/V1/Client/CmsMetadataValueServiceClient.php @@ -0,0 +1,310 @@ + getCmsMetadataValueAsync(GetCmsMetadataValueRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCmsMetadataValuesAsync(ListCmsMetadataValuesRequest $request, array $optionalArgs = []) + */ +final class CmsMetadataValueServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.CmsMetadataValueService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cms_metadata_value_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cms_metadata_value_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/cms_metadata_value_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * cms_metadata_value resource. + * + * @param string $networkCode + * @param string $cmsMetadataValue + * + * @return string The formatted cms_metadata_value resource. + */ + public static function cmsMetadataValueName(string $networkCode, string $cmsMetadataValue): string + { + return self::getPathTemplate('cmsMetadataValue')->render([ + 'network_code' => $networkCode, + 'cms_metadata_value' => $cmsMetadataValue, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cmsMetadataValue: networks/{network_code}/cmsMetadataValues/{cms_metadata_value} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\CmsMetadataValueServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CmsMetadataValueServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `CmsMetadataKey` object. + * + * The async variant is + * {@see CmsMetadataValueServiceClient::getCmsMetadataValueAsync()} . + * + * @example samples/V1/CmsMetadataValueServiceClient/get_cms_metadata_value.php + * + * @param GetCmsMetadataValueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CmsMetadataValue + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCmsMetadataValue(GetCmsMetadataValueRequest $request, array $callOptions = []): CmsMetadataValue + { + return $this->startApiCall('GetCmsMetadataValue', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `CmsMetadataValue` objects. + * + * The async variant is + * {@see CmsMetadataValueServiceClient::listCmsMetadataValuesAsync()} . + * + * @example samples/V1/CmsMetadataValueServiceClient/list_cms_metadata_values.php + * + * @param ListCmsMetadataValuesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCmsMetadataValues( + ListCmsMetadataValuesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListCmsMetadataValues', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/CompanyServiceClient.php b/AdsAdManager/src/V1/Client/CompanyServiceClient.php index 7b1a48b3aa30..bb32745dfe0e 100644 --- a/AdsAdManager/src/V1/Client/CompanyServiceClient.php +++ b/AdsAdManager/src/V1/Client/CompanyServiceClient.php @@ -79,9 +79,7 @@ final class CompanyServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -111,9 +109,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** diff --git a/AdsAdManager/src/V1/Client/ContactServiceClient.php b/AdsAdManager/src/V1/Client/ContactServiceClient.php new file mode 100644 index 000000000000..3e0008bb22e4 --- /dev/null +++ b/AdsAdManager/src/V1/Client/ContactServiceClient.php @@ -0,0 +1,441 @@ + batchCreateContactsAsync(BatchCreateContactsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateContactsAsync(BatchUpdateContactsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createContactAsync(CreateContactRequest $request, array $optionalArgs = []) + * @method PromiseInterface getContactAsync(GetContactRequest $request, array $optionalArgs = []) + * @method PromiseInterface listContactsAsync(ListContactsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateContactAsync(UpdateContactRequest $request, array $optionalArgs = []) + */ +final class ContactServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.ContactService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/contact_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/contact_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/contact_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a company + * resource. + * + * @param string $networkCode + * @param string $company + * + * @return string The formatted company resource. + */ + public static function companyName(string $networkCode, string $company): string + { + return self::getPathTemplate('company')->render([ + 'network_code' => $networkCode, + 'company' => $company, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a contact + * resource. + * + * @param string $networkCode + * @param string $contact + * + * @return string The formatted contact resource. + */ + public static function contactName(string $networkCode, string $contact): string + { + return self::getPathTemplate('contact')->render([ + 'network_code' => $networkCode, + 'contact' => $contact, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - company: networks/{network_code}/companies/{company} + * - contact: networks/{network_code}/contacts/{contact} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\ContactServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ContactServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to batch create `Contact` objects. + * + * The async variant is {@see ContactServiceClient::batchCreateContactsAsync()} . + * + * @example samples/V1/ContactServiceClient/batch_create_contacts.php + * + * @param BatchCreateContactsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchCreateContactsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreateContacts( + BatchCreateContactsRequest $request, + array $callOptions = [] + ): BatchCreateContactsResponse { + return $this->startApiCall('BatchCreateContacts', $request, $callOptions)->wait(); + } + + /** + * API to batch update `Contact` objects. + * + * The async variant is {@see ContactServiceClient::batchUpdateContactsAsync()} . + * + * @example samples/V1/ContactServiceClient/batch_update_contacts.php + * + * @param BatchUpdateContactsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchUpdateContactsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdateContacts( + BatchUpdateContactsRequest $request, + array $callOptions = [] + ): BatchUpdateContactsResponse { + return $this->startApiCall('BatchUpdateContacts', $request, $callOptions)->wait(); + } + + /** + * API to create a `Contact` object. + * + * The async variant is {@see ContactServiceClient::createContactAsync()} . + * + * @example samples/V1/ContactServiceClient/create_contact.php + * + * @param CreateContactRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Contact + * + * @throws ApiException Thrown if the API call fails. + */ + public function createContact(CreateContactRequest $request, array $callOptions = []): Contact + { + return $this->startApiCall('CreateContact', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a `Contact` object. + * + * The async variant is {@see ContactServiceClient::getContactAsync()} . + * + * @example samples/V1/ContactServiceClient/get_contact.php + * + * @param GetContactRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Contact + * + * @throws ApiException Thrown if the API call fails. + */ + public function getContact(GetContactRequest $request, array $callOptions = []): Contact + { + return $this->startApiCall('GetContact', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Contact` objects. + * + * The async variant is {@see ContactServiceClient::listContactsAsync()} . + * + * @example samples/V1/ContactServiceClient/list_contacts.php + * + * @param ListContactsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listContacts(ListContactsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListContacts', $request, $callOptions); + } + + /** + * API to update a `Contact` object. + * + * The async variant is {@see ContactServiceClient::updateContactAsync()} . + * + * @example samples/V1/ContactServiceClient/update_contact.php + * + * @param UpdateContactRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Contact + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateContact(UpdateContactRequest $request, array $callOptions = []): Contact + { + return $this->startApiCall('UpdateContact', $request, $callOptions)->wait(); + } +} diff --git a/AdsAdManager/src/V1/Client/ContentBundleServiceClient.php b/AdsAdManager/src/V1/Client/ContentBundleServiceClient.php new file mode 100644 index 000000000000..02fcfe192065 --- /dev/null +++ b/AdsAdManager/src/V1/Client/ContentBundleServiceClient.php @@ -0,0 +1,307 @@ + getContentBundleAsync(GetContentBundleRequest $request, array $optionalArgs = []) + * @method PromiseInterface listContentBundlesAsync(ListContentBundlesRequest $request, array $optionalArgs = []) + */ +final class ContentBundleServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.ContentBundleService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/content_bundle_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/content_bundle_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/content_bundle_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * content_bundle resource. + * + * @param string $networkCode + * @param string $contentBundle + * + * @return string The formatted content_bundle resource. + */ + public static function contentBundleName(string $networkCode, string $contentBundle): string + { + return self::getPathTemplate('contentBundle')->render([ + 'network_code' => $networkCode, + 'content_bundle' => $contentBundle, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - contentBundle: networks/{network_code}/contentBundles/{content_bundle} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\ContentBundleServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ContentBundleServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `ContentBundle` object. + * + * The async variant is {@see ContentBundleServiceClient::getContentBundleAsync()} + * . + * + * @example samples/V1/ContentBundleServiceClient/get_content_bundle.php + * + * @param GetContentBundleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ContentBundle + * + * @throws ApiException Thrown if the API call fails. + */ + public function getContentBundle(GetContentBundleRequest $request, array $callOptions = []): ContentBundle + { + return $this->startApiCall('GetContentBundle', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `ContentBundle` objects. + * + * The async variant is + * {@see ContentBundleServiceClient::listContentBundlesAsync()} . + * + * @example samples/V1/ContentBundleServiceClient/list_content_bundles.php + * + * @param ListContentBundlesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listContentBundles(ListContentBundlesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListContentBundles', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/ContentLabelServiceClient.php b/AdsAdManager/src/V1/Client/ContentLabelServiceClient.php new file mode 100644 index 000000000000..1269ac0d6591 --- /dev/null +++ b/AdsAdManager/src/V1/Client/ContentLabelServiceClient.php @@ -0,0 +1,306 @@ + getContentLabelAsync(GetContentLabelRequest $request, array $optionalArgs = []) + * @method PromiseInterface listContentLabelsAsync(ListContentLabelsRequest $request, array $optionalArgs = []) + */ +final class ContentLabelServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.ContentLabelService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/content_label_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/content_label_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/content_label_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * content_label resource. + * + * @param string $networkCode + * @param string $contentLabel + * + * @return string The formatted content_label resource. + */ + public static function contentLabelName(string $networkCode, string $contentLabel): string + { + return self::getPathTemplate('contentLabel')->render([ + 'network_code' => $networkCode, + 'content_label' => $contentLabel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - contentLabel: networks/{network_code}/contentLabels/{content_label} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\ContentLabelServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ContentLabelServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `ContentLabel` object. + * + * The async variant is {@see ContentLabelServiceClient::getContentLabelAsync()} . + * + * @example samples/V1/ContentLabelServiceClient/get_content_label.php + * + * @param GetContentLabelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ContentLabel + * + * @throws ApiException Thrown if the API call fails. + */ + public function getContentLabel(GetContentLabelRequest $request, array $callOptions = []): ContentLabel + { + return $this->startApiCall('GetContentLabel', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `ContentLabel` objects. + * + * The async variant is {@see ContentLabelServiceClient::listContentLabelsAsync()} + * . + * + * @example samples/V1/ContentLabelServiceClient/list_content_labels.php + * + * @param ListContentLabelsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listContentLabels(ListContentLabelsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListContentLabels', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/ContentServiceClient.php b/AdsAdManager/src/V1/Client/ContentServiceClient.php new file mode 100644 index 000000000000..a3550bb222ee --- /dev/null +++ b/AdsAdManager/src/V1/Client/ContentServiceClient.php @@ -0,0 +1,305 @@ + getContentAsync(GetContentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listContentAsync(ListContentRequest $request, array $optionalArgs = []) + */ +final class ContentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.ContentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/content_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/content_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/content_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a content + * resource. + * + * @param string $networkCode + * @param string $content + * + * @return string The formatted content resource. + */ + public static function contentName(string $networkCode, string $content): string + { + return self::getPathTemplate('content')->render([ + 'network_code' => $networkCode, + 'content' => $content, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - content: networks/{network_code}/content/{content} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\ContentServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ContentServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `Content` object. + * + * The async variant is {@see ContentServiceClient::getContentAsync()} . + * + * @example samples/V1/ContentServiceClient/get_content.php + * + * @param GetContentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Content + * + * @throws ApiException Thrown if the API call fails. + */ + public function getContent(GetContentRequest $request, array $callOptions = []): Content + { + return $this->startApiCall('GetContent', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Content` objects. + * + * The async variant is {@see ContentServiceClient::listContentAsync()} . + * + * @example samples/V1/ContentServiceClient/list_content.php + * + * @param ListContentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listContent(ListContentRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListContent', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/CreativeTemplateServiceClient.php b/AdsAdManager/src/V1/Client/CreativeTemplateServiceClient.php new file mode 100644 index 000000000000..9b2737ffaee7 --- /dev/null +++ b/AdsAdManager/src/V1/Client/CreativeTemplateServiceClient.php @@ -0,0 +1,310 @@ + getCreativeTemplateAsync(GetCreativeTemplateRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCreativeTemplatesAsync(ListCreativeTemplatesRequest $request, array $optionalArgs = []) + */ +final class CreativeTemplateServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.CreativeTemplateService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/creative_template_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/creative_template_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/creative_template_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * creative_template resource. + * + * @param string $networkCode + * @param string $creativeTemplate + * + * @return string The formatted creative_template resource. + */ + public static function creativeTemplateName(string $networkCode, string $creativeTemplate): string + { + return self::getPathTemplate('creativeTemplate')->render([ + 'network_code' => $networkCode, + 'creative_template' => $creativeTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - creativeTemplate: networks/{network_code}/creativeTemplates/{creative_template} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\CreativeTemplateServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CreativeTemplateServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `CreativeTemplate` object. + * + * The async variant is + * {@see CreativeTemplateServiceClient::getCreativeTemplateAsync()} . + * + * @example samples/V1/CreativeTemplateServiceClient/get_creative_template.php + * + * @param GetCreativeTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CreativeTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCreativeTemplate(GetCreativeTemplateRequest $request, array $callOptions = []): CreativeTemplate + { + return $this->startApiCall('GetCreativeTemplate', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `CreativeTemplate` objects. + * + * The async variant is + * {@see CreativeTemplateServiceClient::listCreativeTemplatesAsync()} . + * + * @example samples/V1/CreativeTemplateServiceClient/list_creative_templates.php + * + * @param ListCreativeTemplatesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCreativeTemplates( + ListCreativeTemplatesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListCreativeTemplates', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/CustomFieldServiceClient.php b/AdsAdManager/src/V1/Client/CustomFieldServiceClient.php index e3cb67a298b2..4605d93150ab 100644 --- a/AdsAdManager/src/V1/Client/CustomFieldServiceClient.php +++ b/AdsAdManager/src/V1/Client/CustomFieldServiceClient.php @@ -24,9 +24,19 @@ namespace Google\Ads\AdManager\V1\Client; +use Google\Ads\AdManager\V1\BatchActivateCustomFieldsRequest; +use Google\Ads\AdManager\V1\BatchActivateCustomFieldsResponse; +use Google\Ads\AdManager\V1\BatchCreateCustomFieldsRequest; +use Google\Ads\AdManager\V1\BatchCreateCustomFieldsResponse; +use Google\Ads\AdManager\V1\BatchDeactivateCustomFieldsRequest; +use Google\Ads\AdManager\V1\BatchDeactivateCustomFieldsResponse; +use Google\Ads\AdManager\V1\BatchUpdateCustomFieldsRequest; +use Google\Ads\AdManager\V1\BatchUpdateCustomFieldsResponse; +use Google\Ads\AdManager\V1\CreateCustomFieldRequest; use Google\Ads\AdManager\V1\CustomField; use Google\Ads\AdManager\V1\GetCustomFieldRequest; use Google\Ads\AdManager\V1\ListCustomFieldsRequest; +use Google\Ads\AdManager\V1\UpdateCustomFieldRequest; use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\GapicClientTrait; @@ -51,8 +61,14 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * + * @method PromiseInterface batchActivateCustomFieldsAsync(BatchActivateCustomFieldsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchCreateCustomFieldsAsync(BatchCreateCustomFieldsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDeactivateCustomFieldsAsync(BatchDeactivateCustomFieldsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateCustomFieldsAsync(BatchUpdateCustomFieldsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCustomFieldAsync(CreateCustomFieldRequest $request, array $optionalArgs = []) * @method PromiseInterface getCustomFieldAsync(GetCustomFieldRequest $request, array $optionalArgs = []) * @method PromiseInterface listCustomFieldsAsync(ListCustomFieldsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCustomFieldAsync(UpdateCustomFieldRequest $request, array $optionalArgs = []) */ final class CustomFieldServiceClient { @@ -79,9 +95,7 @@ final class CustomFieldServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -111,9 +125,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -255,6 +267,148 @@ public function __call($method, $args) return call_user_func_array([$this, 'startAsyncCall'], $args); } + /** + * Activates a list of `CustomField` objects. + * + * The async variant is + * {@see CustomFieldServiceClient::batchActivateCustomFieldsAsync()} . + * + * @example samples/V1/CustomFieldServiceClient/batch_activate_custom_fields.php + * + * @param BatchActivateCustomFieldsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchActivateCustomFieldsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchActivateCustomFields( + BatchActivateCustomFieldsRequest $request, + array $callOptions = [] + ): BatchActivateCustomFieldsResponse { + return $this->startApiCall('BatchActivateCustomFields', $request, $callOptions)->wait(); + } + + /** + * API to batch create `CustomField` objects. + * + * The async variant is + * {@see CustomFieldServiceClient::batchCreateCustomFieldsAsync()} . + * + * @example samples/V1/CustomFieldServiceClient/batch_create_custom_fields.php + * + * @param BatchCreateCustomFieldsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchCreateCustomFieldsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreateCustomFields( + BatchCreateCustomFieldsRequest $request, + array $callOptions = [] + ): BatchCreateCustomFieldsResponse { + return $this->startApiCall('BatchCreateCustomFields', $request, $callOptions)->wait(); + } + + /** + * Deactivates a list of `CustomField` objects. + * + * The async variant is + * {@see CustomFieldServiceClient::batchDeactivateCustomFieldsAsync()} . + * + * @example samples/V1/CustomFieldServiceClient/batch_deactivate_custom_fields.php + * + * @param BatchDeactivateCustomFieldsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchDeactivateCustomFieldsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDeactivateCustomFields( + BatchDeactivateCustomFieldsRequest $request, + array $callOptions = [] + ): BatchDeactivateCustomFieldsResponse { + return $this->startApiCall('BatchDeactivateCustomFields', $request, $callOptions)->wait(); + } + + /** + * API to batch update `CustomField` objects. + * + * The async variant is + * {@see CustomFieldServiceClient::batchUpdateCustomFieldsAsync()} . + * + * @example samples/V1/CustomFieldServiceClient/batch_update_custom_fields.php + * + * @param BatchUpdateCustomFieldsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchUpdateCustomFieldsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdateCustomFields( + BatchUpdateCustomFieldsRequest $request, + array $callOptions = [] + ): BatchUpdateCustomFieldsResponse { + return $this->startApiCall('BatchUpdateCustomFields', $request, $callOptions)->wait(); + } + + /** + * API to create a `CustomField` object. + * + * The async variant is {@see CustomFieldServiceClient::createCustomFieldAsync()} . + * + * @example samples/V1/CustomFieldServiceClient/create_custom_field.php + * + * @param CreateCustomFieldRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CustomField + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCustomField(CreateCustomFieldRequest $request, array $callOptions = []): CustomField + { + return $this->startApiCall('CreateCustomField', $request, $callOptions)->wait(); + } + /** * API to retrieve a `CustomField` object. * @@ -306,4 +460,30 @@ public function listCustomFields(ListCustomFieldsRequest $request, array $callOp { return $this->startApiCall('ListCustomFields', $request, $callOptions); } + + /** + * API to update a `CustomField` object. + * + * The async variant is {@see CustomFieldServiceClient::updateCustomFieldAsync()} . + * + * @example samples/V1/CustomFieldServiceClient/update_custom_field.php + * + * @param UpdateCustomFieldRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CustomField + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCustomField(UpdateCustomFieldRequest $request, array $callOptions = []): CustomField + { + return $this->startApiCall('UpdateCustomField', $request, $callOptions)->wait(); + } } diff --git a/AdsAdManager/src/V1/Client/CustomTargetingKeyServiceClient.php b/AdsAdManager/src/V1/Client/CustomTargetingKeyServiceClient.php index 179b425a79fc..86bedb57e8fb 100644 --- a/AdsAdManager/src/V1/Client/CustomTargetingKeyServiceClient.php +++ b/AdsAdManager/src/V1/Client/CustomTargetingKeyServiceClient.php @@ -79,9 +79,7 @@ final class CustomTargetingKeyServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -96,7 +94,8 @@ private static function getClientDefaults() ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/custom_targeting_key_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/custom_targeting_key_service_rest_client_config.php', ], ], ]; @@ -111,9 +110,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -277,8 +274,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function getCustomTargetingKey(GetCustomTargetingKeyRequest $request, array $callOptions = []): CustomTargetingKey - { + public function getCustomTargetingKey( + GetCustomTargetingKeyRequest $request, + array $callOptions = [] + ): CustomTargetingKey { return $this->startApiCall('GetCustomTargetingKey', $request, $callOptions)->wait(); } @@ -304,8 +303,10 @@ public function getCustomTargetingKey(GetCustomTargetingKeyRequest $request, arr * * @throws ApiException Thrown if the API call fails. */ - public function listCustomTargetingKeys(ListCustomTargetingKeysRequest $request, array $callOptions = []): PagedListResponse - { + public function listCustomTargetingKeys( + ListCustomTargetingKeysRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListCustomTargetingKeys', $request, $callOptions); } } diff --git a/AdsAdManager/src/V1/Client/CustomTargetingValueServiceClient.php b/AdsAdManager/src/V1/Client/CustomTargetingValueServiceClient.php index c75f368b48d2..ce077087a5fd 100644 --- a/AdsAdManager/src/V1/Client/CustomTargetingValueServiceClient.php +++ b/AdsAdManager/src/V1/Client/CustomTargetingValueServiceClient.php @@ -79,9 +79,7 @@ final class CustomTargetingValueServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -96,7 +94,8 @@ private static function getClientDefaults() ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/custom_targeting_value_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/custom_targeting_value_service_rest_client_config.php', ], ], ]; @@ -111,9 +110,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -277,8 +274,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function getCustomTargetingValue(GetCustomTargetingValueRequest $request, array $callOptions = []): CustomTargetingValue - { + public function getCustomTargetingValue( + GetCustomTargetingValueRequest $request, + array $callOptions = [] + ): CustomTargetingValue { return $this->startApiCall('GetCustomTargetingValue', $request, $callOptions)->wait(); } @@ -304,8 +303,10 @@ public function getCustomTargetingValue(GetCustomTargetingValueRequest $request, * * @throws ApiException Thrown if the API call fails. */ - public function listCustomTargetingValues(ListCustomTargetingValuesRequest $request, array $callOptions = []): PagedListResponse - { + public function listCustomTargetingValues( + ListCustomTargetingValuesRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListCustomTargetingValues', $request, $callOptions); } } diff --git a/AdsAdManager/src/V1/Client/DeviceCapabilityServiceClient.php b/AdsAdManager/src/V1/Client/DeviceCapabilityServiceClient.php new file mode 100644 index 000000000000..001e18a0927b --- /dev/null +++ b/AdsAdManager/src/V1/Client/DeviceCapabilityServiceClient.php @@ -0,0 +1,310 @@ + getDeviceCapabilityAsync(GetDeviceCapabilityRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDeviceCapabilitiesAsync(ListDeviceCapabilitiesRequest $request, array $optionalArgs = []) + */ +final class DeviceCapabilityServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.DeviceCapabilityService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/device_capability_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/device_capability_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/device_capability_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * device_capability resource. + * + * @param string $networkCode + * @param string $deviceCapability + * + * @return string The formatted device_capability resource. + */ + public static function deviceCapabilityName(string $networkCode, string $deviceCapability): string + { + return self::getPathTemplate('deviceCapability')->render([ + 'network_code' => $networkCode, + 'device_capability' => $deviceCapability, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - deviceCapability: networks/{network_code}/deviceCapabilities/{device_capability} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\DeviceCapabilityServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DeviceCapabilityServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `DeviceCapability` object. + * + * The async variant is + * {@see DeviceCapabilityServiceClient::getDeviceCapabilityAsync()} . + * + * @example samples/V1/DeviceCapabilityServiceClient/get_device_capability.php + * + * @param GetDeviceCapabilityRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DeviceCapability + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDeviceCapability(GetDeviceCapabilityRequest $request, array $callOptions = []): DeviceCapability + { + return $this->startApiCall('GetDeviceCapability', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `DeviceCapability` objects. + * + * The async variant is + * {@see DeviceCapabilityServiceClient::listDeviceCapabilitiesAsync()} . + * + * @example samples/V1/DeviceCapabilityServiceClient/list_device_capabilities.php + * + * @param ListDeviceCapabilitiesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDeviceCapabilities( + ListDeviceCapabilitiesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListDeviceCapabilities', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/DeviceCategoryServiceClient.php b/AdsAdManager/src/V1/Client/DeviceCategoryServiceClient.php index 5ca8845393d8..497b2116e6dc 100644 --- a/AdsAdManager/src/V1/Client/DeviceCategoryServiceClient.php +++ b/AdsAdManager/src/V1/Client/DeviceCategoryServiceClient.php @@ -79,9 +79,7 @@ final class DeviceCategoryServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -111,9 +109,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -304,8 +300,10 @@ public function getDeviceCategory(GetDeviceCategoryRequest $request, array $call * * @throws ApiException Thrown if the API call fails. */ - public function listDeviceCategories(ListDeviceCategoriesRequest $request, array $callOptions = []): PagedListResponse - { + public function listDeviceCategories( + ListDeviceCategoriesRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListDeviceCategories', $request, $callOptions); } } diff --git a/AdsAdManager/src/V1/Client/DeviceManufacturerServiceClient.php b/AdsAdManager/src/V1/Client/DeviceManufacturerServiceClient.php new file mode 100644 index 000000000000..c5f60597906f --- /dev/null +++ b/AdsAdManager/src/V1/Client/DeviceManufacturerServiceClient.php @@ -0,0 +1,312 @@ + getDeviceManufacturerAsync(GetDeviceManufacturerRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDeviceManufacturersAsync(ListDeviceManufacturersRequest $request, array $optionalArgs = []) + */ +final class DeviceManufacturerServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.DeviceManufacturerService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/device_manufacturer_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/device_manufacturer_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/device_manufacturer_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * device_manufacturer resource. + * + * @param string $networkCode + * @param string $deviceManufacturer + * + * @return string The formatted device_manufacturer resource. + */ + public static function deviceManufacturerName(string $networkCode, string $deviceManufacturer): string + { + return self::getPathTemplate('deviceManufacturer')->render([ + 'network_code' => $networkCode, + 'device_manufacturer' => $deviceManufacturer, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - deviceManufacturer: networks/{network_code}/deviceManufacturers/{device_manufacturer} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\DeviceManufacturerServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DeviceManufacturerServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `DeviceManufacturer` object. + * + * The async variant is + * {@see DeviceManufacturerServiceClient::getDeviceManufacturerAsync()} . + * + * @example samples/V1/DeviceManufacturerServiceClient/get_device_manufacturer.php + * + * @param GetDeviceManufacturerRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DeviceManufacturer + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDeviceManufacturer( + GetDeviceManufacturerRequest $request, + array $callOptions = [] + ): DeviceManufacturer { + return $this->startApiCall('GetDeviceManufacturer', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `DeviceManufacturer` objects. + * + * The async variant is + * {@see DeviceManufacturerServiceClient::listDeviceManufacturersAsync()} . + * + * @example samples/V1/DeviceManufacturerServiceClient/list_device_manufacturers.php + * + * @param ListDeviceManufacturersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDeviceManufacturers( + ListDeviceManufacturersRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListDeviceManufacturers', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/EntitySignalsMappingServiceClient.php b/AdsAdManager/src/V1/Client/EntitySignalsMappingServiceClient.php index 637ee5b5c9cf..26ffdce05e19 100644 --- a/AdsAdManager/src/V1/Client/EntitySignalsMappingServiceClient.php +++ b/AdsAdManager/src/V1/Client/EntitySignalsMappingServiceClient.php @@ -89,9 +89,7 @@ final class EntitySignalsMappingServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -106,7 +104,8 @@ private static function getClientDefaults() ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/entity_signals_mapping_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/entity_signals_mapping_service_rest_client_config.php', ], ], ]; @@ -121,9 +120,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -288,8 +285,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function batchCreateEntitySignalsMappings(BatchCreateEntitySignalsMappingsRequest $request, array $callOptions = []): BatchCreateEntitySignalsMappingsResponse - { + public function batchCreateEntitySignalsMappings( + BatchCreateEntitySignalsMappingsRequest $request, + array $callOptions = [] + ): BatchCreateEntitySignalsMappingsResponse { return $this->startApiCall('BatchCreateEntitySignalsMappings', $request, $callOptions)->wait(); } @@ -316,8 +315,10 @@ public function batchCreateEntitySignalsMappings(BatchCreateEntitySignalsMapping * * @throws ApiException Thrown if the API call fails. */ - public function batchUpdateEntitySignalsMappings(BatchUpdateEntitySignalsMappingsRequest $request, array $callOptions = []): BatchUpdateEntitySignalsMappingsResponse - { + public function batchUpdateEntitySignalsMappings( + BatchUpdateEntitySignalsMappingsRequest $request, + array $callOptions = [] + ): BatchUpdateEntitySignalsMappingsResponse { return $this->startApiCall('BatchUpdateEntitySignalsMappings', $request, $callOptions)->wait(); } @@ -343,8 +344,10 @@ public function batchUpdateEntitySignalsMappings(BatchUpdateEntitySignalsMapping * * @throws ApiException Thrown if the API call fails. */ - public function createEntitySignalsMapping(CreateEntitySignalsMappingRequest $request, array $callOptions = []): EntitySignalsMapping - { + public function createEntitySignalsMapping( + CreateEntitySignalsMappingRequest $request, + array $callOptions = [] + ): EntitySignalsMapping { return $this->startApiCall('CreateEntitySignalsMapping', $request, $callOptions)->wait(); } @@ -370,8 +373,10 @@ public function createEntitySignalsMapping(CreateEntitySignalsMappingRequest $re * * @throws ApiException Thrown if the API call fails. */ - public function getEntitySignalsMapping(GetEntitySignalsMappingRequest $request, array $callOptions = []): EntitySignalsMapping - { + public function getEntitySignalsMapping( + GetEntitySignalsMappingRequest $request, + array $callOptions = [] + ): EntitySignalsMapping { return $this->startApiCall('GetEntitySignalsMapping', $request, $callOptions)->wait(); } @@ -397,8 +402,10 @@ public function getEntitySignalsMapping(GetEntitySignalsMappingRequest $request, * * @throws ApiException Thrown if the API call fails. */ - public function listEntitySignalsMappings(ListEntitySignalsMappingsRequest $request, array $callOptions = []): PagedListResponse - { + public function listEntitySignalsMappings( + ListEntitySignalsMappingsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListEntitySignalsMappings', $request, $callOptions); } @@ -424,8 +431,10 @@ public function listEntitySignalsMappings(ListEntitySignalsMappingsRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function updateEntitySignalsMapping(UpdateEntitySignalsMappingRequest $request, array $callOptions = []): EntitySignalsMapping - { + public function updateEntitySignalsMapping( + UpdateEntitySignalsMappingRequest $request, + array $callOptions = [] + ): EntitySignalsMapping { return $this->startApiCall('UpdateEntitySignalsMapping', $request, $callOptions)->wait(); } } diff --git a/AdsAdManager/src/V1/Client/GeoTargetServiceClient.php b/AdsAdManager/src/V1/Client/GeoTargetServiceClient.php index 850c8a4033d6..3af77a67239b 100644 --- a/AdsAdManager/src/V1/Client/GeoTargetServiceClient.php +++ b/AdsAdManager/src/V1/Client/GeoTargetServiceClient.php @@ -79,9 +79,7 @@ final class GeoTargetServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -111,9 +109,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** diff --git a/AdsAdManager/src/V1/Client/MobileCarrierServiceClient.php b/AdsAdManager/src/V1/Client/MobileCarrierServiceClient.php new file mode 100644 index 000000000000..4218e5d841da --- /dev/null +++ b/AdsAdManager/src/V1/Client/MobileCarrierServiceClient.php @@ -0,0 +1,307 @@ + getMobileCarrierAsync(GetMobileCarrierRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMobileCarriersAsync(ListMobileCarriersRequest $request, array $optionalArgs = []) + */ +final class MobileCarrierServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.MobileCarrierService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/mobile_carrier_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/mobile_carrier_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/mobile_carrier_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * mobile_carrier resource. + * + * @param string $networkCode + * @param string $mobileCarrier + * + * @return string The formatted mobile_carrier resource. + */ + public static function mobileCarrierName(string $networkCode, string $mobileCarrier): string + { + return self::getPathTemplate('mobileCarrier')->render([ + 'network_code' => $networkCode, + 'mobile_carrier' => $mobileCarrier, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - mobileCarrier: networks/{network_code}/mobileCarriers/{mobile_carrier} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\MobileCarrierServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new MobileCarrierServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `MobileCarrier` object. + * + * The async variant is {@see MobileCarrierServiceClient::getMobileCarrierAsync()} + * . + * + * @example samples/V1/MobileCarrierServiceClient/get_mobile_carrier.php + * + * @param GetMobileCarrierRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MobileCarrier + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMobileCarrier(GetMobileCarrierRequest $request, array $callOptions = []): MobileCarrier + { + return $this->startApiCall('GetMobileCarrier', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `MobileCarrier` objects. + * + * The async variant is + * {@see MobileCarrierServiceClient::listMobileCarriersAsync()} . + * + * @example samples/V1/MobileCarrierServiceClient/list_mobile_carriers.php + * + * @param ListMobileCarriersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listMobileCarriers(ListMobileCarriersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMobileCarriers', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/MobileDeviceServiceClient.php b/AdsAdManager/src/V1/Client/MobileDeviceServiceClient.php new file mode 100644 index 000000000000..e4ccf5c5f8e4 --- /dev/null +++ b/AdsAdManager/src/V1/Client/MobileDeviceServiceClient.php @@ -0,0 +1,306 @@ + getMobileDeviceAsync(GetMobileDeviceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMobileDevicesAsync(ListMobileDevicesRequest $request, array $optionalArgs = []) + */ +final class MobileDeviceServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.MobileDeviceService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/mobile_device_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/mobile_device_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/mobile_device_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * mobile_device resource. + * + * @param string $networkCode + * @param string $mobileDevice + * + * @return string The formatted mobile_device resource. + */ + public static function mobileDeviceName(string $networkCode, string $mobileDevice): string + { + return self::getPathTemplate('mobileDevice')->render([ + 'network_code' => $networkCode, + 'mobile_device' => $mobileDevice, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - mobileDevice: networks/{network_code}/mobileDevices/{mobile_device} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\MobileDeviceServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new MobileDeviceServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `MobileDevice` object. + * + * The async variant is {@see MobileDeviceServiceClient::getMobileDeviceAsync()} . + * + * @example samples/V1/MobileDeviceServiceClient/get_mobile_device.php + * + * @param GetMobileDeviceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MobileDevice + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMobileDevice(GetMobileDeviceRequest $request, array $callOptions = []): MobileDevice + { + return $this->startApiCall('GetMobileDevice', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `MobileDevice` objects. + * + * The async variant is {@see MobileDeviceServiceClient::listMobileDevicesAsync()} + * . + * + * @example samples/V1/MobileDeviceServiceClient/list_mobile_devices.php + * + * @param ListMobileDevicesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listMobileDevices(ListMobileDevicesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMobileDevices', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/MobileDeviceSubmodelServiceClient.php b/AdsAdManager/src/V1/Client/MobileDeviceSubmodelServiceClient.php new file mode 100644 index 000000000000..73f02b793202 --- /dev/null +++ b/AdsAdManager/src/V1/Client/MobileDeviceSubmodelServiceClient.php @@ -0,0 +1,312 @@ + getMobileDeviceSubmodelAsync(GetMobileDeviceSubmodelRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMobileDeviceSubmodelsAsync(ListMobileDeviceSubmodelsRequest $request, array $optionalArgs = []) + */ +final class MobileDeviceSubmodelServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.MobileDeviceSubmodelService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/mobile_device_submodel_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/mobile_device_submodel_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/mobile_device_submodel_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * mobile_device_submodel resource. + * + * @param string $networkCode + * @param string $mobileDeviceSubmodel + * + * @return string The formatted mobile_device_submodel resource. + */ + public static function mobileDeviceSubmodelName(string $networkCode, string $mobileDeviceSubmodel): string + { + return self::getPathTemplate('mobileDeviceSubmodel')->render([ + 'network_code' => $networkCode, + 'mobile_device_submodel' => $mobileDeviceSubmodel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - mobileDeviceSubmodel: networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel} + * - network: networks/{network_code} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\MobileDeviceSubmodelServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new MobileDeviceSubmodelServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to retrieve a `MobileDeviceSubmodel` object. + * + * The async variant is + * {@see MobileDeviceSubmodelServiceClient::getMobileDeviceSubmodelAsync()} . + * + * @example samples/V1/MobileDeviceSubmodelServiceClient/get_mobile_device_submodel.php + * + * @param GetMobileDeviceSubmodelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MobileDeviceSubmodel + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMobileDeviceSubmodel( + GetMobileDeviceSubmodelRequest $request, + array $callOptions = [] + ): MobileDeviceSubmodel { + return $this->startApiCall('GetMobileDeviceSubmodel', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `MobileDeviceSubmodel` objects. + * + * The async variant is + * {@see MobileDeviceSubmodelServiceClient::listMobileDeviceSubmodelsAsync()} . + * + * @example samples/V1/MobileDeviceSubmodelServiceClient/list_mobile_device_submodels.php + * + * @param ListMobileDeviceSubmodelsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listMobileDeviceSubmodels( + ListMobileDeviceSubmodelsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListMobileDeviceSubmodels', $request, $callOptions); + } +} diff --git a/AdsAdManager/src/V1/Client/NetworkServiceClient.php b/AdsAdManager/src/V1/Client/NetworkServiceClient.php index 747b1ec85cb0..721719c1975d 100644 --- a/AdsAdManager/src/V1/Client/NetworkServiceClient.php +++ b/AdsAdManager/src/V1/Client/NetworkServiceClient.php @@ -79,9 +79,7 @@ final class NetworkServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -111,9 +109,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** diff --git a/AdsAdManager/src/V1/Client/OperatingSystemServiceClient.php b/AdsAdManager/src/V1/Client/OperatingSystemServiceClient.php index c0b0788b994c..add7fc16abb7 100644 --- a/AdsAdManager/src/V1/Client/OperatingSystemServiceClient.php +++ b/AdsAdManager/src/V1/Client/OperatingSystemServiceClient.php @@ -79,9 +79,7 @@ final class OperatingSystemServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -111,9 +109,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -304,8 +300,10 @@ public function getOperatingSystem(GetOperatingSystemRequest $request, array $ca * * @throws ApiException Thrown if the API call fails. */ - public function listOperatingSystems(ListOperatingSystemsRequest $request, array $callOptions = []): PagedListResponse - { + public function listOperatingSystems( + ListOperatingSystemsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListOperatingSystems', $request, $callOptions); } } diff --git a/AdsAdManager/src/V1/Client/OperatingSystemVersionServiceClient.php b/AdsAdManager/src/V1/Client/OperatingSystemVersionServiceClient.php index a66fc723e37c..6e30bbb3af20 100644 --- a/AdsAdManager/src/V1/Client/OperatingSystemVersionServiceClient.php +++ b/AdsAdManager/src/V1/Client/OperatingSystemVersionServiceClient.php @@ -79,9 +79,7 @@ final class OperatingSystemVersionServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -96,7 +94,8 @@ private static function getClientDefaults() ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/operating_system_version_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/operating_system_version_service_rest_client_config.php', ], ], ]; @@ -111,9 +110,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -277,8 +274,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function getOperatingSystemVersion(GetOperatingSystemVersionRequest $request, array $callOptions = []): OperatingSystemVersion - { + public function getOperatingSystemVersion( + GetOperatingSystemVersionRequest $request, + array $callOptions = [] + ): OperatingSystemVersion { return $this->startApiCall('GetOperatingSystemVersion', $request, $callOptions)->wait(); } @@ -304,8 +303,10 @@ public function getOperatingSystemVersion(GetOperatingSystemVersionRequest $requ * * @throws ApiException Thrown if the API call fails. */ - public function listOperatingSystemVersions(ListOperatingSystemVersionsRequest $request, array $callOptions = []): PagedListResponse - { + public function listOperatingSystemVersions( + ListOperatingSystemVersionsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListOperatingSystemVersions', $request, $callOptions); } } diff --git a/AdsAdManager/src/V1/Client/OrderServiceClient.php b/AdsAdManager/src/V1/Client/OrderServiceClient.php index 333dbb395613..c28df9609093 100644 --- a/AdsAdManager/src/V1/Client/OrderServiceClient.php +++ b/AdsAdManager/src/V1/Client/OrderServiceClient.php @@ -79,9 +79,7 @@ final class OrderServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -111,9 +109,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** diff --git a/AdsAdManager/src/V1/Client/PlacementServiceClient.php b/AdsAdManager/src/V1/Client/PlacementServiceClient.php index b685c450aa58..4d65adb53b16 100644 --- a/AdsAdManager/src/V1/Client/PlacementServiceClient.php +++ b/AdsAdManager/src/V1/Client/PlacementServiceClient.php @@ -24,9 +24,21 @@ namespace Google\Ads\AdManager\V1\Client; +use Google\Ads\AdManager\V1\BatchActivatePlacementsRequest; +use Google\Ads\AdManager\V1\BatchActivatePlacementsResponse; +use Google\Ads\AdManager\V1\BatchArchivePlacementsRequest; +use Google\Ads\AdManager\V1\BatchArchivePlacementsResponse; +use Google\Ads\AdManager\V1\BatchCreatePlacementsRequest; +use Google\Ads\AdManager\V1\BatchCreatePlacementsResponse; +use Google\Ads\AdManager\V1\BatchDeactivatePlacementsRequest; +use Google\Ads\AdManager\V1\BatchDeactivatePlacementsResponse; +use Google\Ads\AdManager\V1\BatchUpdatePlacementsRequest; +use Google\Ads\AdManager\V1\BatchUpdatePlacementsResponse; +use Google\Ads\AdManager\V1\CreatePlacementRequest; use Google\Ads\AdManager\V1\GetPlacementRequest; use Google\Ads\AdManager\V1\ListPlacementsRequest; use Google\Ads\AdManager\V1\Placement; +use Google\Ads\AdManager\V1\UpdatePlacementRequest; use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\GapicClientTrait; @@ -51,8 +63,15 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * + * @method PromiseInterface batchActivatePlacementsAsync(BatchActivatePlacementsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchArchivePlacementsAsync(BatchArchivePlacementsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchCreatePlacementsAsync(BatchCreatePlacementsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDeactivatePlacementsAsync(BatchDeactivatePlacementsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdatePlacementsAsync(BatchUpdatePlacementsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPlacementAsync(CreatePlacementRequest $request, array $optionalArgs = []) * @method PromiseInterface getPlacementAsync(GetPlacementRequest $request, array $optionalArgs = []) * @method PromiseInterface listPlacementsAsync(ListPlacementsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePlacementAsync(UpdatePlacementRequest $request, array $optionalArgs = []) */ final class PlacementServiceClient { @@ -79,9 +98,7 @@ final class PlacementServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -111,9 +128,24 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a ad_unit + * resource. + * + * @param string $networkCode + * @param string $adUnit + * + * @return string The formatted ad_unit resource. + */ + public static function adUnitName(string $networkCode, string $adUnit): string + { + return self::getPathTemplate('adUnit')->render([ + 'network_code' => $networkCode, + 'ad_unit' => $adUnit, + ]); } /** @@ -152,6 +184,7 @@ public static function placementName(string $networkCode, string $placement): st * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - adUnit: networks/{network_code}/adUnits/{ad_unit} * - network: networks/{network_code} * - placement: networks/{network_code}/placements/{placement} * @@ -255,6 +288,177 @@ public function __call($method, $args) return call_user_func_array([$this, 'startAsyncCall'], $args); } + /** + * Activates a list of `Placement` objects. + * + * The async variant is + * {@see PlacementServiceClient::batchActivatePlacementsAsync()} . + * + * @example samples/V1/PlacementServiceClient/batch_activate_placements.php + * + * @param BatchActivatePlacementsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchActivatePlacementsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchActivatePlacements( + BatchActivatePlacementsRequest $request, + array $callOptions = [] + ): BatchActivatePlacementsResponse { + return $this->startApiCall('BatchActivatePlacements', $request, $callOptions)->wait(); + } + + /** + * Archives a list of `Placement` objects. + * + * The async variant is + * {@see PlacementServiceClient::batchArchivePlacementsAsync()} . + * + * @example samples/V1/PlacementServiceClient/batch_archive_placements.php + * + * @param BatchArchivePlacementsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchArchivePlacementsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchArchivePlacements( + BatchArchivePlacementsRequest $request, + array $callOptions = [] + ): BatchArchivePlacementsResponse { + return $this->startApiCall('BatchArchivePlacements', $request, $callOptions)->wait(); + } + + /** + * API to batch create `Placement` objects. + * + * The async variant is {@see PlacementServiceClient::batchCreatePlacementsAsync()} + * . + * + * @example samples/V1/PlacementServiceClient/batch_create_placements.php + * + * @param BatchCreatePlacementsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchCreatePlacementsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreatePlacements( + BatchCreatePlacementsRequest $request, + array $callOptions = [] + ): BatchCreatePlacementsResponse { + return $this->startApiCall('BatchCreatePlacements', $request, $callOptions)->wait(); + } + + /** + * Deactivates a list of `Placement` objects. + * + * The async variant is + * {@see PlacementServiceClient::batchDeactivatePlacementsAsync()} . + * + * @example samples/V1/PlacementServiceClient/batch_deactivate_placements.php + * + * @param BatchDeactivatePlacementsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchDeactivatePlacementsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDeactivatePlacements( + BatchDeactivatePlacementsRequest $request, + array $callOptions = [] + ): BatchDeactivatePlacementsResponse { + return $this->startApiCall('BatchDeactivatePlacements', $request, $callOptions)->wait(); + } + + /** + * API to batch update `Placement` objects. + * + * The async variant is {@see PlacementServiceClient::batchUpdatePlacementsAsync()} + * . + * + * @example samples/V1/PlacementServiceClient/batch_update_placements.php + * + * @param BatchUpdatePlacementsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchUpdatePlacementsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdatePlacements( + BatchUpdatePlacementsRequest $request, + array $callOptions = [] + ): BatchUpdatePlacementsResponse { + return $this->startApiCall('BatchUpdatePlacements', $request, $callOptions)->wait(); + } + + /** + * API to create an `Placement` object. + * + * The async variant is {@see PlacementServiceClient::createPlacementAsync()} . + * + * @example samples/V1/PlacementServiceClient/create_placement.php + * + * @param CreatePlacementRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Placement + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPlacement(CreatePlacementRequest $request, array $callOptions = []): Placement + { + return $this->startApiCall('CreatePlacement', $request, $callOptions)->wait(); + } + /** * API to retrieve a `Placement` object. * @@ -306,4 +510,30 @@ public function listPlacements(ListPlacementsRequest $request, array $callOption { return $this->startApiCall('ListPlacements', $request, $callOptions); } + + /** + * API to update an `Placement` object. + * + * The async variant is {@see PlacementServiceClient::updatePlacementAsync()} . + * + * @example samples/V1/PlacementServiceClient/update_placement.php + * + * @param UpdatePlacementRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Placement + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePlacement(UpdatePlacementRequest $request, array $callOptions = []): Placement + { + return $this->startApiCall('UpdatePlacement', $request, $callOptions)->wait(); + } } diff --git a/AdsAdManager/src/V1/Client/PrivateAuctionDealServiceClient.php b/AdsAdManager/src/V1/Client/PrivateAuctionDealServiceClient.php index ee6c3d856817..e73a1b626b73 100644 --- a/AdsAdManager/src/V1/Client/PrivateAuctionDealServiceClient.php +++ b/AdsAdManager/src/V1/Client/PrivateAuctionDealServiceClient.php @@ -83,9 +83,7 @@ final class PrivateAuctionDealServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -100,7 +98,8 @@ private static function getClientDefaults() ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/private_auction_deal_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/private_auction_deal_service_rest_client_config.php', ], ], ]; @@ -115,9 +114,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -137,6 +134,40 @@ public static function adUnitName(string $networkCode, string $adUnit): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a application + * resource. + * + * @param string $networkCode + * @param string $application + * + * @return string The formatted application resource. + */ + public static function applicationName(string $networkCode, string $application): string + { + return self::getPathTemplate('application')->render([ + 'network_code' => $networkCode, + 'application' => $application, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * audience_segment resource. + * + * @param string $networkCode + * @param string $audienceSegment + * + * @return string The formatted audience_segment resource. + */ + public static function audienceSegmentName(string $networkCode, string $audienceSegment): string + { + return self::getPathTemplate('audienceSegment')->render([ + 'network_code' => $networkCode, + 'audience_segment' => $audienceSegment, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * bandwidth_group resource. @@ -154,6 +185,91 @@ public static function bandwidthGroupName(string $networkCode, string $bandwidth ]); } + /** + * Formats a string containing the fully-qualified path to represent a browser + * resource. + * + * @param string $networkCode + * @param string $browser + * + * @return string The formatted browser resource. + */ + public static function browserName(string $networkCode, string $browser): string + { + return self::getPathTemplate('browser')->render([ + 'network_code' => $networkCode, + 'browser' => $browser, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * browser_language resource. + * + * @param string $networkCode + * @param string $browserLanguage + * + * @return string The formatted browser_language resource. + */ + public static function browserLanguageName(string $networkCode, string $browserLanguage): string + { + return self::getPathTemplate('browserLanguage')->render([ + 'network_code' => $networkCode, + 'browser_language' => $browserLanguage, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * cms_metadata_value resource. + * + * @param string $networkCode + * @param string $cmsMetadataValue + * + * @return string The formatted cms_metadata_value resource. + */ + public static function cmsMetadataValueName(string $networkCode, string $cmsMetadataValue): string + { + return self::getPathTemplate('cmsMetadataValue')->render([ + 'network_code' => $networkCode, + 'cms_metadata_value' => $cmsMetadataValue, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a content + * resource. + * + * @param string $networkCode + * @param string $content + * + * @return string The formatted content resource. + */ + public static function contentName(string $networkCode, string $content): string + { + return self::getPathTemplate('content')->render([ + 'network_code' => $networkCode, + 'content' => $content, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * content_bundle resource. + * + * @param string $networkCode + * @param string $contentBundle + * + * @return string The formatted content_bundle resource. + */ + public static function contentBundleName(string $networkCode, string $contentBundle): string + { + return self::getPathTemplate('contentBundle')->render([ + 'network_code' => $networkCode, + 'content_bundle' => $contentBundle, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * custom_targeting_key resource. @@ -188,6 +304,23 @@ public static function customTargetingValueName(string $networkCode, string $cus ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * device_capability resource. + * + * @param string $networkCode + * @param string $deviceCapability + * + * @return string The formatted device_capability resource. + */ + public static function deviceCapabilityName(string $networkCode, string $deviceCapability): string + { + return self::getPathTemplate('deviceCapability')->render([ + 'network_code' => $networkCode, + 'device_capability' => $deviceCapability, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * device_category resource. @@ -205,6 +338,23 @@ public static function deviceCategoryName(string $networkCode, string $deviceCat ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * device_manufacturer resource. + * + * @param string $networkCode + * @param string $deviceManufacturer + * + * @return string The formatted device_manufacturer resource. + */ + public static function deviceManufacturerName(string $networkCode, string $deviceManufacturer): string + { + return self::getPathTemplate('deviceManufacturer')->render([ + 'network_code' => $networkCode, + 'device_manufacturer' => $deviceManufacturer, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a geo_target * resource. @@ -222,6 +372,57 @@ public static function geoTargetName(string $networkCode, string $geoTarget): st ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * mobile_carrier resource. + * + * @param string $networkCode + * @param string $mobileCarrier + * + * @return string The formatted mobile_carrier resource. + */ + public static function mobileCarrierName(string $networkCode, string $mobileCarrier): string + { + return self::getPathTemplate('mobileCarrier')->render([ + 'network_code' => $networkCode, + 'mobile_carrier' => $mobileCarrier, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * mobile_device resource. + * + * @param string $networkCode + * @param string $mobileDevice + * + * @return string The formatted mobile_device resource. + */ + public static function mobileDeviceName(string $networkCode, string $mobileDevice): string + { + return self::getPathTemplate('mobileDevice')->render([ + 'network_code' => $networkCode, + 'mobile_device' => $mobileDevice, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * mobile_device_submodel resource. + * + * @param string $networkCode + * @param string $mobileDeviceSubmodel + * + * @return string The formatted mobile_device_submodel resource. + */ + public static function mobileDeviceSubmodelName(string $networkCode, string $mobileDeviceSubmodel): string + { + return self::getPathTemplate('mobileDeviceSubmodel')->render([ + 'network_code' => $networkCode, + 'mobile_device_submodel' => $mobileDeviceSubmodel, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a network * resource. @@ -310,11 +511,23 @@ public static function privateAuctionDealName(string $networkCode, string $priva * The following name formats are supported: * Template: Pattern * - adUnit: networks/{network_code}/adUnits/{ad_unit} + * - application: networks/{network_code}/applications/{application} + * - audienceSegment: networks/{network_code}/audienceSegments/{audience_segment} * - bandwidthGroup: networks/{network_code}/bandwidthGroups/{bandwidth_group} + * - browser: networks/{network_code}/browsers/{browser} + * - browserLanguage: networks/{network_code}/browserLanguages/{browser_language} + * - cmsMetadataValue: networks/{network_code}/cmsMetadataValues/{cms_metadata_value} + * - content: networks/{network_code}/content/{content} + * - contentBundle: networks/{network_code}/contentBundles/{content_bundle} * - customTargetingKey: networks/{network_code}/customTargetingKeys/{custom_targeting_key} * - customTargetingValue: networks/{network_code}/customTargetingValues/{custom_targeting_value} + * - deviceCapability: networks/{network_code}/deviceCapabilities/{device_capability} * - deviceCategory: networks/{network_code}/deviceCategories/{device_category} + * - deviceManufacturer: networks/{network_code}/deviceManufacturers/{device_manufacturer} * - geoTarget: networks/{network_code}/geoTargets/{geo_target} + * - mobileCarrier: networks/{network_code}/mobileCarriers/{mobile_carrier} + * - mobileDevice: networks/{network_code}/mobileDevices/{mobile_device} + * - mobileDeviceSubmodel: networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel} * - network: networks/{network_code} * - operatingSystem: networks/{network_code}/operatingSystems/{operating_system} * - operatingSystemVersion: networks/{network_code}/operatingSystemVersions/{operating_system_version} @@ -443,8 +656,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function createPrivateAuctionDeal(CreatePrivateAuctionDealRequest $request, array $callOptions = []): PrivateAuctionDeal - { + public function createPrivateAuctionDeal( + CreatePrivateAuctionDealRequest $request, + array $callOptions = [] + ): PrivateAuctionDeal { return $this->startApiCall('CreatePrivateAuctionDeal', $request, $callOptions)->wait(); } @@ -470,8 +685,10 @@ public function createPrivateAuctionDeal(CreatePrivateAuctionDealRequest $reques * * @throws ApiException Thrown if the API call fails. */ - public function getPrivateAuctionDeal(GetPrivateAuctionDealRequest $request, array $callOptions = []): PrivateAuctionDeal - { + public function getPrivateAuctionDeal( + GetPrivateAuctionDealRequest $request, + array $callOptions = [] + ): PrivateAuctionDeal { return $this->startApiCall('GetPrivateAuctionDeal', $request, $callOptions)->wait(); } @@ -497,8 +714,10 @@ public function getPrivateAuctionDeal(GetPrivateAuctionDealRequest $request, arr * * @throws ApiException Thrown if the API call fails. */ - public function listPrivateAuctionDeals(ListPrivateAuctionDealsRequest $request, array $callOptions = []): PagedListResponse - { + public function listPrivateAuctionDeals( + ListPrivateAuctionDealsRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListPrivateAuctionDeals', $request, $callOptions); } @@ -524,8 +743,10 @@ public function listPrivateAuctionDeals(ListPrivateAuctionDealsRequest $request, * * @throws ApiException Thrown if the API call fails. */ - public function updatePrivateAuctionDeal(UpdatePrivateAuctionDealRequest $request, array $callOptions = []): PrivateAuctionDeal - { + public function updatePrivateAuctionDeal( + UpdatePrivateAuctionDealRequest $request, + array $callOptions = [] + ): PrivateAuctionDeal { return $this->startApiCall('UpdatePrivateAuctionDeal', $request, $callOptions)->wait(); } } diff --git a/AdsAdManager/src/V1/Client/PrivateAuctionServiceClient.php b/AdsAdManager/src/V1/Client/PrivateAuctionServiceClient.php index 6fab10876050..43a6e7effa26 100644 --- a/AdsAdManager/src/V1/Client/PrivateAuctionServiceClient.php +++ b/AdsAdManager/src/V1/Client/PrivateAuctionServiceClient.php @@ -83,9 +83,7 @@ final class PrivateAuctionServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -115,9 +113,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** diff --git a/AdsAdManager/src/V1/Client/ProgrammaticBuyerServiceClient.php b/AdsAdManager/src/V1/Client/ProgrammaticBuyerServiceClient.php index 900f29aa16b8..8459fa63024d 100644 --- a/AdsAdManager/src/V1/Client/ProgrammaticBuyerServiceClient.php +++ b/AdsAdManager/src/V1/Client/ProgrammaticBuyerServiceClient.php @@ -79,9 +79,7 @@ final class ProgrammaticBuyerServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -96,7 +94,8 @@ private static function getClientDefaults() ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/programmatic_buyer_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/programmatic_buyer_service_rest_client_config.php', ], ], ]; @@ -111,9 +110,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -277,8 +274,10 @@ public function __call($method, $args) * * @throws ApiException Thrown if the API call fails. */ - public function getProgrammaticBuyer(GetProgrammaticBuyerRequest $request, array $callOptions = []): ProgrammaticBuyer - { + public function getProgrammaticBuyer( + GetProgrammaticBuyerRequest $request, + array $callOptions = [] + ): ProgrammaticBuyer { return $this->startApiCall('GetProgrammaticBuyer', $request, $callOptions)->wait(); } @@ -304,8 +303,10 @@ public function getProgrammaticBuyer(GetProgrammaticBuyerRequest $request, array * * @throws ApiException Thrown if the API call fails. */ - public function listProgrammaticBuyers(ListProgrammaticBuyersRequest $request, array $callOptions = []): PagedListResponse - { + public function listProgrammaticBuyers( + ListProgrammaticBuyersRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListProgrammaticBuyers', $request, $callOptions); } } diff --git a/AdsAdManager/src/V1/Client/ReportServiceClient.php b/AdsAdManager/src/V1/Client/ReportServiceClient.php index 266cd1be15cd..c34ccdbe0134 100644 --- a/AdsAdManager/src/V1/Client/ReportServiceClient.php +++ b/AdsAdManager/src/V1/Client/ReportServiceClient.php @@ -92,9 +92,7 @@ final class ReportServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private $operationsClient; @@ -126,9 +124,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -369,8 +365,10 @@ public function createReport(CreateReportRequest $request, array $callOptions = * * @throws ApiException Thrown if the API call fails. */ - public function fetchReportResultRows(FetchReportResultRowsRequest $request, array $callOptions = []): FetchReportResultRowsResponse - { + public function fetchReportResultRows( + FetchReportResultRowsRequest $request, + array $callOptions = [] + ): FetchReportResultRowsResponse { return $this->startApiCall('FetchReportResultRows', $request, $callOptions)->wait(); } @@ -428,7 +426,7 @@ public function listReports(ListReportsRequest $request, array $callOptions = [] /** * Initiates the execution of an existing report asynchronously. Users can - * get the report by polling this operation via + * get the report by polling this operation using * `OperationsService.GetOperation`. * Poll every 5 seconds initially, with an exponential * backoff. Once a report is complete, the operation will contain a diff --git a/AdsAdManager/src/V1/Client/RoleServiceClient.php b/AdsAdManager/src/V1/Client/RoleServiceClient.php index 82f50ff42375..ad597e2c4c3a 100644 --- a/AdsAdManager/src/V1/Client/RoleServiceClient.php +++ b/AdsAdManager/src/V1/Client/RoleServiceClient.php @@ -79,9 +79,7 @@ final class RoleServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -111,9 +109,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** diff --git a/AdsAdManager/src/V1/Client/SiteServiceClient.php b/AdsAdManager/src/V1/Client/SiteServiceClient.php new file mode 100644 index 000000000000..142c3f9cceca --- /dev/null +++ b/AdsAdManager/src/V1/Client/SiteServiceClient.php @@ -0,0 +1,486 @@ + batchCreateSitesAsync(BatchCreateSitesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDeactivateSitesAsync(BatchDeactivateSitesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchSubmitSitesForApprovalAsync(BatchSubmitSitesForApprovalRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateSitesAsync(BatchUpdateSitesRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSiteAsync(CreateSiteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSiteAsync(GetSiteRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSitesAsync(ListSitesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSiteAsync(UpdateSiteRequest $request, array $optionalArgs = []) + */ +final class SiteServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.SiteService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/site_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/site_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/site_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a site + * resource. + * + * @param string $networkCode + * @param string $site + * + * @return string The formatted site resource. + */ + public static function siteName(string $networkCode, string $site): string + { + return self::getPathTemplate('site')->render([ + 'network_code' => $networkCode, + 'site' => $site, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - network: networks/{network_code} + * - site: networks/{network_code}/sites/{site} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\SiteServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SiteServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to batch create `Site` objects. + * + * The async variant is {@see SiteServiceClient::batchCreateSitesAsync()} . + * + * @example samples/V1/SiteServiceClient/batch_create_sites.php + * + * @param BatchCreateSitesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchCreateSitesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreateSites( + BatchCreateSitesRequest $request, + array $callOptions = [] + ): BatchCreateSitesResponse { + return $this->startApiCall('BatchCreateSites', $request, $callOptions)->wait(); + } + + /** + * Deactivates a list of `Site` objects. + * + * The async variant is {@see SiteServiceClient::batchDeactivateSitesAsync()} . + * + * @example samples/V1/SiteServiceClient/batch_deactivate_sites.php + * + * @param BatchDeactivateSitesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchDeactivateSitesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDeactivateSites( + BatchDeactivateSitesRequest $request, + array $callOptions = [] + ): BatchDeactivateSitesResponse { + return $this->startApiCall('BatchDeactivateSites', $request, $callOptions)->wait(); + } + + /** + * Submits a list of `Site` objects for approval. + * + * The async variant is + * {@see SiteServiceClient::batchSubmitSitesForApprovalAsync()} . + * + * @example samples/V1/SiteServiceClient/batch_submit_sites_for_approval.php + * + * @param BatchSubmitSitesForApprovalRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchSubmitSitesForApprovalResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchSubmitSitesForApproval( + BatchSubmitSitesForApprovalRequest $request, + array $callOptions = [] + ): BatchSubmitSitesForApprovalResponse { + return $this->startApiCall('BatchSubmitSitesForApproval', $request, $callOptions)->wait(); + } + + /** + * API to batch update `Site` objects. + * + * The async variant is {@see SiteServiceClient::batchUpdateSitesAsync()} . + * + * @example samples/V1/SiteServiceClient/batch_update_sites.php + * + * @param BatchUpdateSitesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchUpdateSitesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdateSites( + BatchUpdateSitesRequest $request, + array $callOptions = [] + ): BatchUpdateSitesResponse { + return $this->startApiCall('BatchUpdateSites', $request, $callOptions)->wait(); + } + + /** + * API to create a `Site` object. + * + * The async variant is {@see SiteServiceClient::createSiteAsync()} . + * + * @example samples/V1/SiteServiceClient/create_site.php + * + * @param CreateSiteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Site + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSite(CreateSiteRequest $request, array $callOptions = []): Site + { + return $this->startApiCall('CreateSite', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a `Site` object. + * + * The async variant is {@see SiteServiceClient::getSiteAsync()} . + * + * @example samples/V1/SiteServiceClient/get_site.php + * + * @param GetSiteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Site + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSite(GetSiteRequest $request, array $callOptions = []): Site + { + return $this->startApiCall('GetSite', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Site` objects. + * + * The async variant is {@see SiteServiceClient::listSitesAsync()} . + * + * @example samples/V1/SiteServiceClient/list_sites.php + * + * @param ListSitesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSites(ListSitesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSites', $request, $callOptions); + } + + /** + * API to update a `Site` object. + * + * The async variant is {@see SiteServiceClient::updateSiteAsync()} . + * + * @example samples/V1/SiteServiceClient/update_site.php + * + * @param UpdateSiteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Site + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSite(UpdateSiteRequest $request, array $callOptions = []): Site + { + return $this->startApiCall('UpdateSite', $request, $callOptions)->wait(); + } +} diff --git a/AdsAdManager/src/V1/Client/TaxonomyCategoryServiceClient.php b/AdsAdManager/src/V1/Client/TaxonomyCategoryServiceClient.php index ea1b7c156296..118c7a44e193 100644 --- a/AdsAdManager/src/V1/Client/TaxonomyCategoryServiceClient.php +++ b/AdsAdManager/src/V1/Client/TaxonomyCategoryServiceClient.php @@ -79,9 +79,7 @@ final class TaxonomyCategoryServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -96,7 +94,8 @@ private static function getClientDefaults() ], 'transportConfig' => [ 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/taxonomy_category_service_rest_client_config.php', + 'restClientConfigPath' => + __DIR__ . '/../resources/taxonomy_category_service_rest_client_config.php', ], ], ]; @@ -111,9 +110,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** @@ -304,8 +301,10 @@ public function getTaxonomyCategory(GetTaxonomyCategoryRequest $request, array $ * * @throws ApiException Thrown if the API call fails. */ - public function listTaxonomyCategories(ListTaxonomyCategoriesRequest $request, array $callOptions = []): PagedListResponse - { + public function listTaxonomyCategories( + ListTaxonomyCategoriesRequest $request, + array $callOptions = [] + ): PagedListResponse { return $this->startApiCall('ListTaxonomyCategories', $request, $callOptions); } } diff --git a/AdsAdManager/src/V1/Client/TeamServiceClient.php b/AdsAdManager/src/V1/Client/TeamServiceClient.php new file mode 100644 index 000000000000..75ad633fb4b6 --- /dev/null +++ b/AdsAdManager/src/V1/Client/TeamServiceClient.php @@ -0,0 +1,485 @@ + batchActivateTeamsAsync(BatchActivateTeamsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchCreateTeamsAsync(BatchCreateTeamsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDeactivateTeamsAsync(BatchDeactivateTeamsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateTeamsAsync(BatchUpdateTeamsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTeamAsync(CreateTeamRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTeamAsync(GetTeamRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTeamsAsync(ListTeamsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTeamAsync(UpdateTeamRequest $request, array $optionalArgs = []) + */ +final class TeamServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.TeamService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'admanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'admanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/team_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/team_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/team_service_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['rest']; + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $networkCode + * + * @return string The formatted network resource. + */ + public static function networkName(string $networkCode): string + { + return self::getPathTemplate('network')->render([ + 'network_code' => $networkCode, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a team + * resource. + * + * @param string $networkCode + * @param string $team + * + * @return string The formatted team resource. + */ + public static function teamName(string $networkCode, string $team): string + { + return self::getPathTemplate('team')->render([ + 'network_code' => $networkCode, + 'team' => $team, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - network: networks/{network_code} + * - team: networks/{network_code}/teams/{team} + * + * 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. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'admanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Ads\AdManager\V1\TeamServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new TeamServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. At the moment, supports only + * `rest`. *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 + * $apiEndpoint 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 = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * API to batch activate `Team` objects. + * + * The async variant is {@see TeamServiceClient::batchActivateTeamsAsync()} . + * + * @example samples/V1/TeamServiceClient/batch_activate_teams.php + * + * @param BatchActivateTeamsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchActivateTeamsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchActivateTeams( + BatchActivateTeamsRequest $request, + array $callOptions = [] + ): BatchActivateTeamsResponse { + return $this->startApiCall('BatchActivateTeams', $request, $callOptions)->wait(); + } + + /** + * API to batch create `Team` objects. + * + * The async variant is {@see TeamServiceClient::batchCreateTeamsAsync()} . + * + * @example samples/V1/TeamServiceClient/batch_create_teams.php + * + * @param BatchCreateTeamsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchCreateTeamsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreateTeams( + BatchCreateTeamsRequest $request, + array $callOptions = [] + ): BatchCreateTeamsResponse { + return $this->startApiCall('BatchCreateTeams', $request, $callOptions)->wait(); + } + + /** + * API to batch deactivate `Team` objects. + * + * The async variant is {@see TeamServiceClient::batchDeactivateTeamsAsync()} . + * + * @example samples/V1/TeamServiceClient/batch_deactivate_teams.php + * + * @param BatchDeactivateTeamsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchDeactivateTeamsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDeactivateTeams( + BatchDeactivateTeamsRequest $request, + array $callOptions = [] + ): BatchDeactivateTeamsResponse { + return $this->startApiCall('BatchDeactivateTeams', $request, $callOptions)->wait(); + } + + /** + * API to batch update `Team` objects. + * + * The async variant is {@see TeamServiceClient::batchUpdateTeamsAsync()} . + * + * @example samples/V1/TeamServiceClient/batch_update_teams.php + * + * @param BatchUpdateTeamsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchUpdateTeamsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdateTeams( + BatchUpdateTeamsRequest $request, + array $callOptions = [] + ): BatchUpdateTeamsResponse { + return $this->startApiCall('BatchUpdateTeams', $request, $callOptions)->wait(); + } + + /** + * API to create a `Team` object. + * + * The async variant is {@see TeamServiceClient::createTeamAsync()} . + * + * @example samples/V1/TeamServiceClient/create_team.php + * + * @param CreateTeamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Team + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTeam(CreateTeamRequest $request, array $callOptions = []): Team + { + return $this->startApiCall('CreateTeam', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a `Team` object. + * + * The async variant is {@see TeamServiceClient::getTeamAsync()} . + * + * @example samples/V1/TeamServiceClient/get_team.php + * + * @param GetTeamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Team + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTeam(GetTeamRequest $request, array $callOptions = []): Team + { + return $this->startApiCall('GetTeam', $request, $callOptions)->wait(); + } + + /** + * API to retrieve a list of `Team` objects. + * + * The async variant is {@see TeamServiceClient::listTeamsAsync()} . + * + * @example samples/V1/TeamServiceClient/list_teams.php + * + * @param ListTeamsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTeams(ListTeamsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTeams', $request, $callOptions); + } + + /** + * API to update a `Team` object. + * + * The async variant is {@see TeamServiceClient::updateTeamAsync()} . + * + * @example samples/V1/TeamServiceClient/update_team.php + * + * @param UpdateTeamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Team + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTeam(UpdateTeamRequest $request, array $callOptions = []): Team + { + return $this->startApiCall('UpdateTeam', $request, $callOptions)->wait(); + } +} diff --git a/AdsAdManager/src/V1/Client/UserServiceClient.php b/AdsAdManager/src/V1/Client/UserServiceClient.php index d80ca3eda480..ff7629800182 100644 --- a/AdsAdManager/src/V1/Client/UserServiceClient.php +++ b/AdsAdManager/src/V1/Client/UserServiceClient.php @@ -76,9 +76,7 @@ final class UserServiceClient private const CODEGEN_NAME = 'gapic'; /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/admanager', - ]; + public static $serviceScopes = ['https://www.googleapis.com/auth/admanager']; private static function getClientDefaults() { @@ -108,9 +106,7 @@ private static function defaultTransport() /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { - return [ - 'rest', - ]; + return ['rest']; } /** diff --git a/AdsAdManager/src/V1/CmsMetadataKey.php b/AdsAdManager/src/V1/CmsMetadataKey.php new file mode 100644 index 000000000000..641ea3b2ca9f --- /dev/null +++ b/AdsAdManager/src/V1/CmsMetadataKey.php @@ -0,0 +1,139 @@ +google.ads.admanager.v1.CmsMetadataKey + */ +class CmsMetadataKey extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `CmsMetadataKey`. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The key of a key-value pair. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Output only. The status of this CMS metadata key. + * + * Generated from protobuf field .google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `CmsMetadataKey`. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * @type string $display_name + * Required. The key of a key-value pair. + * @type int $status + * Output only. The status of this CMS metadata key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CmsMetadataKeyMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `CmsMetadataKey`. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `CmsMetadataKey`. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The key of a key-value pair. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The key of a key-value pair. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The status of this CMS metadata key. + * + * Generated from protobuf field .google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. The status of this CMS metadata key. + * + * Generated from protobuf field .google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CmsMetadataKeyStatusEnum\CmsMetadataKeyStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CmsMetadataKeyStatusEnum.php b/AdsAdManager/src/V1/CmsMetadataKeyStatusEnum.php new file mode 100644 index 000000000000..37e9684c3508 --- /dev/null +++ b/AdsAdManager/src/V1/CmsMetadataKeyStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CmsMetadataKeyStatusEnum + */ +class CmsMetadataKeyStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CmsMetadataKeyEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CmsMetadataKeyStatusEnum/CmsMetadataKeyStatus.php b/AdsAdManager/src/V1/CmsMetadataKeyStatusEnum/CmsMetadataKeyStatus.php new file mode 100644 index 000000000000..6159e6c1c110 --- /dev/null +++ b/AdsAdManager/src/V1/CmsMetadataKeyStatusEnum/CmsMetadataKeyStatus.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.CmsMetadataKeyStatusEnum.CmsMetadataKeyStatus + */ +class CmsMetadataKeyStatus +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum CMS_METADATA_KEY_STATUS_UNSPECIFIED = 0; + */ + const CMS_METADATA_KEY_STATUS_UNSPECIFIED = 0; + /** + * The key is active. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The key is not active. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + + private static $valueToName = [ + self::CMS_METADATA_KEY_STATUS_UNSPECIFIED => 'CMS_METADATA_KEY_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/CmsMetadataTargeting.php b/AdsAdManager/src/V1/CmsMetadataTargeting.php new file mode 100644 index 000000000000..909f7e2ef81e --- /dev/null +++ b/AdsAdManager/src/V1/CmsMetadataTargeting.php @@ -0,0 +1,115 @@ +google.ads.admanager.v1.CmsMetadataTargeting + */ +class CmsMetadataTargeting extends \Google\Protobuf\Internal\Message +{ + /** + * Whether this expression is negatively targeted, meaning it matches + * ad requests that exclude the below values. + * + * Generated from protobuf field optional bool negative = 1; + */ + protected $negative = null; + /** + * Optional. The resource names of the targeted CMS metadata values. + * + * Generated from protobuf field repeated string cms_metadata_values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $cms_metadata_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $negative + * Whether this expression is negatively targeted, meaning it matches + * ad requests that exclude the below values. + * @type array|\Google\Protobuf\Internal\RepeatedField $cms_metadata_values + * Optional. The resource names of the targeted CMS metadata values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + parent::__construct($data); + } + + /** + * Whether this expression is negatively targeted, meaning it matches + * ad requests that exclude the below values. + * + * Generated from protobuf field optional bool negative = 1; + * @return bool + */ + public function getNegative() + { + return isset($this->negative) ? $this->negative : false; + } + + public function hasNegative() + { + return isset($this->negative); + } + + public function clearNegative() + { + unset($this->negative); + } + + /** + * Whether this expression is negatively targeted, meaning it matches + * ad requests that exclude the below values. + * + * Generated from protobuf field optional bool negative = 1; + * @param bool $var + * @return $this + */ + public function setNegative($var) + { + GPBUtil::checkBool($var); + $this->negative = $var; + + return $this; + } + + /** + * Optional. The resource names of the targeted CMS metadata values. + * + * Generated from protobuf field repeated string cms_metadata_values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCmsMetadataValues() + { + return $this->cms_metadata_values; + } + + /** + * Optional. The resource names of the targeted CMS metadata values. + * + * Generated from protobuf field repeated string cms_metadata_values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCmsMetadataValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->cms_metadata_values = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CmsMetadataValue.php b/AdsAdManager/src/V1/CmsMetadataValue.php new file mode 100644 index 000000000000..aee6552cfc96 --- /dev/null +++ b/AdsAdManager/src/V1/CmsMetadataValue.php @@ -0,0 +1,181 @@ +google.ads.admanager.v1.CmsMetadataValue + */ +class CmsMetadataValue extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `CmsMetadataValue`. + * Format: + * `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The value of this key-value pair. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * Required. Immutable. The resource name of the CmsMetadataKey. + * Format: "networks/{network_code}/cmsMetadataKey/{cms_metadata_key_id}" + * + * Generated from protobuf field string key = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $key = ''; + /** + * Output only. The status of this CMS metadata value. + * + * Generated from protobuf field .google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `CmsMetadataValue`. + * Format: + * `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * @type string $display_name + * The value of this key-value pair. + * @type string $key + * Required. Immutable. The resource name of the CmsMetadataKey. + * Format: "networks/{network_code}/cmsMetadataKey/{cms_metadata_key_id}" + * @type int $status + * Output only. The status of this CMS metadata value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CmsMetadataValueMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `CmsMetadataValue`. + * Format: + * `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `CmsMetadataValue`. + * Format: + * `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The value of this key-value pair. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The value of this key-value pair. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Immutable. The resource name of the CmsMetadataKey. + * Format: "networks/{network_code}/cmsMetadataKey/{cms_metadata_key_id}" + * + * Generated from protobuf field string key = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Required. Immutable. The resource name of the CmsMetadataKey. + * Format: "networks/{network_code}/cmsMetadataKey/{cms_metadata_key_id}" + * + * Generated from protobuf field string key = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Output only. The status of this CMS metadata value. + * + * Generated from protobuf field .google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. The status of this CMS metadata value. + * + * Generated from protobuf field .google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CmsMetadataValueStatusEnum\CmsMetadataValueStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CmsMetadataValueStatusEnum.php b/AdsAdManager/src/V1/CmsMetadataValueStatusEnum.php new file mode 100644 index 000000000000..d2665a199dcf --- /dev/null +++ b/AdsAdManager/src/V1/CmsMetadataValueStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CmsMetadataValueStatusEnum + */ +class CmsMetadataValueStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CmsMetadataValueEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CmsMetadataValueStatusEnum/CmsMetadataValueStatus.php b/AdsAdManager/src/V1/CmsMetadataValueStatusEnum/CmsMetadataValueStatus.php new file mode 100644 index 000000000000..cdc57ea3b422 --- /dev/null +++ b/AdsAdManager/src/V1/CmsMetadataValueStatusEnum/CmsMetadataValueStatus.php @@ -0,0 +1,69 @@ +google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus + */ +class CmsMetadataValueStatus +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum CMS_METADATA_VALUE_STATUS_UNSPECIFIED = 0; + */ + const CMS_METADATA_VALUE_STATUS_UNSPECIFIED = 0; + /** + * The value is active. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The value is archived. + * + * Generated from protobuf enum ARCHIVED = 2; + */ + const ARCHIVED = 2; + /** + * The value is not active. + * + * Generated from protobuf enum INACTIVE = 3; + */ + const INACTIVE = 3; + + private static $valueToName = [ + self::CMS_METADATA_VALUE_STATUS_UNSPECIFIED => 'CMS_METADATA_VALUE_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::ARCHIVED => 'ARCHIVED', + self::INACTIVE => 'INACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/Company.php b/AdsAdManager/src/V1/Company.php index bc4dc1bf445e..af97bfc26467 100644 --- a/AdsAdManager/src/V1/Company.php +++ b/AdsAdManager/src/V1/Company.php @@ -25,72 +25,72 @@ class Company extends \Google\Protobuf\Internal\Message /** * Output only. `Company` ID. * - * Generated from protobuf field int64 company_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional int64 company_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $company_id = 0; + protected $company_id = null; /** * Required. The display name of the `Company`. * This value has a maximum length of 127 characters. * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; */ - protected $display_name = ''; + protected $display_name = null; /** * Required. The type of the `Company`. * - * Generated from protobuf field .google.ads.admanager.v1.CompanyTypeEnum.CompanyType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CompanyTypeEnum.CompanyType type = 4 [(.google.api.field_behavior) = REQUIRED]; */ - protected $type = 0; + protected $type = null; /** * Optional. The address for the `Company`. * This value has a maximum length of 1024 characters. * - * Generated from protobuf field string address = 5 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string address = 5 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $address = ''; + protected $address = null; /** * Optional. The email for the `Company`. * This value has a maximum length of 128 characters. * - * Generated from protobuf field string email = 6 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string email = 6 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $email = ''; + protected $email = null; /** * Optional. The fax number for the `Company`. * This value has a maximum length of 63 characters. * - * Generated from protobuf field string fax = 7 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string fax = 7 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $fax = ''; + protected $fax = null; /** * Optional. The phone number for the `Company`. * This value has a maximum length of 63 characters. * - * Generated from protobuf field string phone = 8 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string phone = 8 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $phone = ''; + protected $phone = null; /** * Optional. The external ID for the `Company`. * This value has a maximum length of 255 characters. * - * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $external_id = ''; + protected $external_id = null; /** * Optional. Comments about the `Company`. * This value has a maximum length of 1024 characters. * - * Generated from protobuf field string comment = 10 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string comment = 10 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $comment = ''; + protected $comment = null; /** * Optional. The credit status of the `Company`. * This attribute defaults to `ACTIVE` if basic settings are enabled and * `ON_HOLD` if advance settings are enabled. * - * Generated from protobuf field .google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional .google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $credit_status = 0; + protected $credit_status = null; /** * Optional. The labels that are directly applied to the `Company`. * @@ -115,13 +115,13 @@ class Company extends \Google\Protobuf\Internal\Message * Optional. The ID of the Google-recognized canonicalized form of the * `Company`. * - * Generated from protobuf field int64 third_party_company_id = 16 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional int64 third_party_company_id = 16 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $third_party_company_id = 0; + protected $third_party_company_id = null; /** * Output only. The time the `Company` was last modified. * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $update_time = null; @@ -214,18 +214,28 @@ public function setName($var) /** * Output only. `Company` ID. * - * Generated from protobuf field int64 company_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional int64 company_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int|string */ public function getCompanyId() { - return $this->company_id; + return isset($this->company_id) ? $this->company_id : 0; + } + + public function hasCompanyId() + { + return isset($this->company_id); + } + + public function clearCompanyId() + { + unset($this->company_id); } /** * Output only. `Company` ID. * - * Generated from protobuf field int64 company_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional int64 company_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int|string $var * @return $this */ @@ -241,19 +251,29 @@ public function setCompanyId($var) * Required. The display name of the `Company`. * This value has a maximum length of 127 characters. * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; * @return string */ public function getDisplayName() { - return $this->display_name; + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); } /** * Required. The display name of the `Company`. * This value has a maximum length of 127 characters. * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ @@ -268,18 +288,28 @@ public function setDisplayName($var) /** * Required. The type of the `Company`. * - * Generated from protobuf field .google.ads.admanager.v1.CompanyTypeEnum.CompanyType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CompanyTypeEnum.CompanyType type = 4 [(.google.api.field_behavior) = REQUIRED]; * @return int */ public function getType() { - return $this->type; + return isset($this->type) ? $this->type : 0; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); } /** * Required. The type of the `Company`. * - * Generated from protobuf field .google.ads.admanager.v1.CompanyTypeEnum.CompanyType type = 4 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CompanyTypeEnum.CompanyType type = 4 [(.google.api.field_behavior) = REQUIRED]; * @param int $var * @return $this */ @@ -295,19 +325,29 @@ public function setType($var) * Optional. The address for the `Company`. * This value has a maximum length of 1024 characters. * - * Generated from protobuf field string address = 5 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string address = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getAddress() { - return $this->address; + return isset($this->address) ? $this->address : ''; + } + + public function hasAddress() + { + return isset($this->address); + } + + public function clearAddress() + { + unset($this->address); } /** * Optional. The address for the `Company`. * This value has a maximum length of 1024 characters. * - * Generated from protobuf field string address = 5 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string address = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -323,19 +363,29 @@ public function setAddress($var) * Optional. The email for the `Company`. * This value has a maximum length of 128 characters. * - * Generated from protobuf field string email = 6 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string email = 6 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getEmail() { - return $this->email; + return isset($this->email) ? $this->email : ''; + } + + public function hasEmail() + { + return isset($this->email); + } + + public function clearEmail() + { + unset($this->email); } /** * Optional. The email for the `Company`. * This value has a maximum length of 128 characters. * - * Generated from protobuf field string email = 6 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string email = 6 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -351,19 +401,29 @@ public function setEmail($var) * Optional. The fax number for the `Company`. * This value has a maximum length of 63 characters. * - * Generated from protobuf field string fax = 7 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string fax = 7 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getFax() { - return $this->fax; + return isset($this->fax) ? $this->fax : ''; + } + + public function hasFax() + { + return isset($this->fax); + } + + public function clearFax() + { + unset($this->fax); } /** * Optional. The fax number for the `Company`. * This value has a maximum length of 63 characters. * - * Generated from protobuf field string fax = 7 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string fax = 7 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -379,19 +439,29 @@ public function setFax($var) * Optional. The phone number for the `Company`. * This value has a maximum length of 63 characters. * - * Generated from protobuf field string phone = 8 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string phone = 8 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPhone() { - return $this->phone; + return isset($this->phone) ? $this->phone : ''; + } + + public function hasPhone() + { + return isset($this->phone); + } + + public function clearPhone() + { + unset($this->phone); } /** * Optional. The phone number for the `Company`. * This value has a maximum length of 63 characters. * - * Generated from protobuf field string phone = 8 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string phone = 8 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -407,19 +477,29 @@ public function setPhone($var) * Optional. The external ID for the `Company`. * This value has a maximum length of 255 characters. * - * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getExternalId() { - return $this->external_id; + return isset($this->external_id) ? $this->external_id : ''; + } + + public function hasExternalId() + { + return isset($this->external_id); + } + + public function clearExternalId() + { + unset($this->external_id); } /** * Optional. The external ID for the `Company`. * This value has a maximum length of 255 characters. * - * Generated from protobuf field string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string external_id = 9 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -435,19 +515,29 @@ public function setExternalId($var) * Optional. Comments about the `Company`. * This value has a maximum length of 1024 characters. * - * Generated from protobuf field string comment = 10 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string comment = 10 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getComment() { - return $this->comment; + return isset($this->comment) ? $this->comment : ''; + } + + public function hasComment() + { + return isset($this->comment); + } + + public function clearComment() + { + unset($this->comment); } /** * Optional. Comments about the `Company`. * This value has a maximum length of 1024 characters. * - * Generated from protobuf field string comment = 10 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string comment = 10 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -464,12 +554,22 @@ public function setComment($var) * This attribute defaults to `ACTIVE` if basic settings are enabled and * `ON_HOLD` if advance settings are enabled. * - * Generated from protobuf field .google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional .google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getCreditStatus() { - return $this->credit_status; + return isset($this->credit_status) ? $this->credit_status : 0; + } + + public function hasCreditStatus() + { + return isset($this->credit_status); + } + + public function clearCreditStatus() + { + unset($this->credit_status); } /** @@ -477,7 +577,7 @@ public function getCreditStatus() * This attribute defaults to `ACTIVE` if basic settings are enabled and * `ON_HOLD` if advance settings are enabled. * - * Generated from protobuf field .google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional .google.ads.admanager.v1.CompanyCreditStatusEnum.CompanyCreditStatus credit_status = 11 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -585,19 +685,29 @@ public function setAppliedTeams($var) * Optional. The ID of the Google-recognized canonicalized form of the * `Company`. * - * Generated from protobuf field int64 third_party_company_id = 16 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional int64 third_party_company_id = 16 [(.google.api.field_behavior) = OPTIONAL]; * @return int|string */ public function getThirdPartyCompanyId() { - return $this->third_party_company_id; + return isset($this->third_party_company_id) ? $this->third_party_company_id : 0; + } + + public function hasThirdPartyCompanyId() + { + return isset($this->third_party_company_id); + } + + public function clearThirdPartyCompanyId() + { + unset($this->third_party_company_id); } /** * Optional. The ID of the Google-recognized canonicalized form of the * `Company`. * - * Generated from protobuf field int64 third_party_company_id = 16 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional int64 third_party_company_id = 16 [(.google.api.field_behavior) = OPTIONAL]; * @param int|string $var * @return $this */ @@ -612,7 +722,7 @@ public function setThirdPartyCompanyId($var) /** * Output only. The time the `Company` was last modified. * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null */ public function getUpdateTime() @@ -633,7 +743,7 @@ public function clearUpdateTime() /** * Output only. The time the `Company` was last modified. * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var * @return $this */ diff --git a/AdsAdManager/src/V1/Contact.php b/AdsAdManager/src/V1/Contact.php index 9be38891728d..354f867b6fbf 100644 --- a/AdsAdManager/src/V1/Contact.php +++ b/AdsAdManager/src/V1/Contact.php @@ -26,11 +26,74 @@ class Contact extends \Google\Protobuf\Internal\Message */ protected $name = ''; /** - * Output only. The display name of the Company. + * Required. The name of the contact. This attribute has a maximum length of + * 127 characters. * - * Generated from protobuf field optional string company_display_name = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; */ - protected $company_display_name = null; + protected $display_name = null; + /** + * Required. Immutable. The resource name of the Company. + * Format: "networks/{network_code}/companies/{company_id}" + * + * Generated from protobuf field optional string company = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $company = null; + /** + * Output only. The status of the contact. This attribute is assigned by + * Google. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ContactStatusEnum.ContactStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * Optional. The address of the contact. This attribute has a maximum length + * of 1024 characters. + * + * Generated from protobuf field optional string address = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $address = null; + /** + * Optional. The cell phone number where the contact can be reached. + * + * Generated from protobuf field optional string cell_phone = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cell_phone = null; + /** + * Optional. A free-form text comment for the contact. This attribute has a + * maximum length of 1024 characters. + * + * Generated from protobuf field optional string comment = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $comment = null; + /** + * Optional. The e-mail address where the contact can be reached. This + * attribute has a maximum length of 128 characters. + * + * Generated from protobuf field optional string email = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $email = null; + /** + * Optional. The fax number where the contact can be reached. This attribute + * has a maximum length of 1024 characters. + * + * Generated from protobuf field optional string fax = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $fax = null; + /** + * Optional. The job title of the contact. This attribute has a maximum length + * of 1024 characters. + * + * Generated from protobuf field optional string title = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $title = null; + /** + * Optional. The work phone number where the contact can be reached. This + * attribute has a maximum length of 1024 characters. + * + * Generated from protobuf field optional string work_phone = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $work_phone = null; /** * Constructor. @@ -41,8 +104,35 @@ class Contact extends \Google\Protobuf\Internal\Message * @type string $name * Identifier. The resource name of the `Contact`. * Format: `networks/{network_code}/contacts/{contact_id}` - * @type string $company_display_name - * Output only. The display name of the Company. + * @type string $display_name + * Required. The name of the contact. This attribute has a maximum length of + * 127 characters. + * @type string $company + * Required. Immutable. The resource name of the Company. + * Format: "networks/{network_code}/companies/{company_id}" + * @type int $status + * Output only. The status of the contact. This attribute is assigned by + * Google. + * @type string $address + * Optional. The address of the contact. This attribute has a maximum length + * of 1024 characters. + * @type string $cell_phone + * Optional. The cell phone number where the contact can be reached. + * @type string $comment + * Optional. A free-form text comment for the contact. This attribute has a + * maximum length of 1024 characters. + * @type string $email + * Optional. The e-mail address where the contact can be reached. This + * attribute has a maximum length of 128 characters. + * @type string $fax + * Optional. The fax number where the contact can be reached. This attribute + * has a maximum length of 1024 characters. + * @type string $title + * Optional. The job title of the contact. This attribute has a maximum length + * of 1024 characters. + * @type string $work_phone + * Optional. The work phone number where the contact can be reached. This + * attribute has a maximum length of 1024 characters. * } */ public function __construct($data = NULL) { @@ -79,37 +169,379 @@ public function setName($var) } /** - * Output only. The display name of the Company. + * Required. The name of the contact. This attribute has a maximum length of + * 127 characters. + * + * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Required. The name of the contact. This attribute has a maximum length of + * 127 characters. + * + * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Immutable. The resource name of the Company. + * Format: "networks/{network_code}/companies/{company_id}" + * + * Generated from protobuf field optional string company = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getCompany() + { + return isset($this->company) ? $this->company : ''; + } + + public function hasCompany() + { + return isset($this->company); + } + + public function clearCompany() + { + unset($this->company); + } + + /** + * Required. Immutable. The resource name of the Company. + * Format: "networks/{network_code}/companies/{company_id}" + * + * Generated from protobuf field optional string company = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCompany($var) + { + GPBUtil::checkString($var, True); + $this->company = $var; + + return $this; + } + + /** + * Output only. The status of the contact. This attribute is assigned by + * Google. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ContactStatusEnum.ContactStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return isset($this->status) ? $this->status : 0; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. The status of the contact. This attribute is assigned by + * Google. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ContactStatusEnum.ContactStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ContactStatusEnum\ContactStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Optional. The address of the contact. This attribute has a maximum length + * of 1024 characters. + * + * Generated from protobuf field optional string address = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAddress() + { + return isset($this->address) ? $this->address : ''; + } + + public function hasAddress() + { + return isset($this->address); + } + + public function clearAddress() + { + unset($this->address); + } + + /** + * Optional. The address of the contact. This attribute has a maximum length + * of 1024 characters. + * + * Generated from protobuf field optional string address = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * Optional. The cell phone number where the contact can be reached. + * + * Generated from protobuf field optional string cell_phone = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCellPhone() + { + return isset($this->cell_phone) ? $this->cell_phone : ''; + } + + public function hasCellPhone() + { + return isset($this->cell_phone); + } + + public function clearCellPhone() + { + unset($this->cell_phone); + } + + /** + * Optional. The cell phone number where the contact can be reached. + * + * Generated from protobuf field optional string cell_phone = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCellPhone($var) + { + GPBUtil::checkString($var, True); + $this->cell_phone = $var; + + return $this; + } + + /** + * Optional. A free-form text comment for the contact. This attribute has a + * maximum length of 1024 characters. + * + * Generated from protobuf field optional string comment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getComment() + { + return isset($this->comment) ? $this->comment : ''; + } + + public function hasComment() + { + return isset($this->comment); + } + + public function clearComment() + { + unset($this->comment); + } + + /** + * Optional. A free-form text comment for the contact. This attribute has a + * maximum length of 1024 characters. + * + * Generated from protobuf field optional string comment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkString($var, True); + $this->comment = $var; + + return $this; + } + + /** + * Optional. The e-mail address where the contact can be reached. This + * attribute has a maximum length of 128 characters. + * + * Generated from protobuf field optional string email = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEmail() + { + return isset($this->email) ? $this->email : ''; + } + + public function hasEmail() + { + return isset($this->email); + } + + public function clearEmail() + { + unset($this->email); + } + + /** + * Optional. The e-mail address where the contact can be reached. This + * attribute has a maximum length of 128 characters. + * + * Generated from protobuf field optional string email = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Optional. The fax number where the contact can be reached. This attribute + * has a maximum length of 1024 characters. + * + * Generated from protobuf field optional string fax = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFax() + { + return isset($this->fax) ? $this->fax : ''; + } + + public function hasFax() + { + return isset($this->fax); + } + + public function clearFax() + { + unset($this->fax); + } + + /** + * Optional. The fax number where the contact can be reached. This attribute + * has a maximum length of 1024 characters. + * + * Generated from protobuf field optional string fax = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFax($var) + { + GPBUtil::checkString($var, True); + $this->fax = $var; + + return $this; + } + + /** + * Optional. The job title of the contact. This attribute has a maximum length + * of 1024 characters. + * + * Generated from protobuf field optional string title = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTitle() + { + return isset($this->title) ? $this->title : ''; + } + + public function hasTitle() + { + return isset($this->title); + } + + public function clearTitle() + { + unset($this->title); + } + + /** + * Optional. The job title of the contact. This attribute has a maximum length + * of 1024 characters. + * + * Generated from protobuf field optional string title = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Optional. The work phone number where the contact can be reached. This + * attribute has a maximum length of 1024 characters. * - * Generated from protobuf field optional string company_display_name = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional string work_phone = 13 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ - public function getCompanyDisplayName() + public function getWorkPhone() { - return isset($this->company_display_name) ? $this->company_display_name : ''; + return isset($this->work_phone) ? $this->work_phone : ''; } - public function hasCompanyDisplayName() + public function hasWorkPhone() { - return isset($this->company_display_name); + return isset($this->work_phone); } - public function clearCompanyDisplayName() + public function clearWorkPhone() { - unset($this->company_display_name); + unset($this->work_phone); } /** - * Output only. The display name of the Company. + * Optional. The work phone number where the contact can be reached. This + * attribute has a maximum length of 1024 characters. * - * Generated from protobuf field optional string company_display_name = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional string work_phone = 13 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ - public function setCompanyDisplayName($var) + public function setWorkPhone($var) { GPBUtil::checkString($var, True); - $this->company_display_name = $var; + $this->work_phone = $var; return $this; } diff --git a/AdsAdManager/src/V1/ContactStatusEnum.php b/AdsAdManager/src/V1/ContactStatusEnum.php new file mode 100644 index 000000000000..95b3d48e1ffa --- /dev/null +++ b/AdsAdManager/src/V1/ContactStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.ContactStatusEnum + */ +class ContactStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/ContactStatusEnum/ContactStatus.php b/AdsAdManager/src/V1/ContactStatusEnum/ContactStatus.php new file mode 100644 index 000000000000..ad25e1e0f2c0 --- /dev/null +++ b/AdsAdManager/src/V1/ContactStatusEnum/ContactStatus.php @@ -0,0 +1,94 @@ +google.ads.admanager.v1.ContactStatusEnum.ContactStatus + */ +class ContactStatus +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum CONTACT_STATUS_UNSPECIFIED = 0; + */ + const CONTACT_STATUS_UNSPECIFIED = 0; + /** + * The contact was invited to see their orders, but the invitation was + * cancelled. + * + * Generated from protobuf enum INVITE_CANCELED = 1; + */ + const INVITE_CANCELED = 1; + /** + * The contact has been invited to see their orders, but the invitation has + * already expired. + * + * Generated from protobuf enum INVITE_EXPIRED = 2; + */ + const INVITE_EXPIRED = 2; + /** + * The contact has been invited to see their orders, but has not yet + * accepted the invitation. + * + * Generated from protobuf enum INVITE_PENDING = 3; + */ + const INVITE_PENDING = 3; + /** + * The contact has not been invited to see their orders. + * + * Generated from protobuf enum UNINVITED = 4; + */ + const UNINVITED = 4; + /** + * The contact has access to login and view their orders. + * + * Generated from protobuf enum USER_ACTIVE = 5; + */ + const USER_ACTIVE = 5; + /** + * The contact accepted an invitation to see their orders, but their access + * was later revoked. + * + * Generated from protobuf enum USER_DISABLED = 6; + */ + const USER_DISABLED = 6; + + private static $valueToName = [ + self::CONTACT_STATUS_UNSPECIFIED => 'CONTACT_STATUS_UNSPECIFIED', + self::INVITE_CANCELED => 'INVITE_CANCELED', + self::INVITE_EXPIRED => 'INVITE_EXPIRED', + self::INVITE_PENDING => 'INVITE_PENDING', + self::UNINVITED => 'UNINVITED', + self::USER_ACTIVE => 'USER_ACTIVE', + self::USER_DISABLED => 'USER_DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/Content.php b/AdsAdManager/src/V1/Content.php new file mode 100644 index 000000000000..b93eb8506fc0 --- /dev/null +++ b/AdsAdManager/src/V1/Content.php @@ -0,0 +1,115 @@ +google.ads.admanager.v1.Content + */ +class Content extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Content`. + * Format: `networks/{network_code}/content/{content_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The name of the `Content`. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Content`. + * Format: `networks/{network_code}/content/{content_id}` + * @type string $display_name + * Output only. The name of the `Content`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Content`. + * Format: `networks/{network_code}/content/{content_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `Content`. + * Format: `networks/{network_code}/content/{content_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The name of the `Content`. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Output only. The name of the `Content`. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ContentBundle.php b/AdsAdManager/src/V1/ContentBundle.php new file mode 100644 index 000000000000..a435ec884076 --- /dev/null +++ b/AdsAdManager/src/V1/ContentBundle.php @@ -0,0 +1,122 @@ +google.ads.admanager.v1.ContentBundle + */ +class ContentBundle extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the + * [ContentBundle][google.ads.admanager.v1.ContentBundle]. Format: + * `networks/{network_code}/contentBundles/{content_bundle_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The name of the + * [ContentBundle][google.ads.admanager.v1.ContentBundle]. This attribute is + * required and has a maximum length of 255 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the + * [ContentBundle][google.ads.admanager.v1.ContentBundle]. Format: + * `networks/{network_code}/contentBundles/{content_bundle_id}` + * @type string $display_name + * Required. The name of the + * [ContentBundle][google.ads.admanager.v1.ContentBundle]. This attribute is + * required and has a maximum length of 255 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentBundleMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the + * [ContentBundle][google.ads.admanager.v1.ContentBundle]. Format: + * `networks/{network_code}/contentBundles/{content_bundle_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the + * [ContentBundle][google.ads.admanager.v1.ContentBundle]. Format: + * `networks/{network_code}/contentBundles/{content_bundle_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The name of the + * [ContentBundle][google.ads.admanager.v1.ContentBundle]. This attribute is + * required and has a maximum length of 255 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The name of the + * [ContentBundle][google.ads.admanager.v1.ContentBundle]. This attribute is + * required and has a maximum length of 255 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ContentLabel.php b/AdsAdManager/src/V1/ContentLabel.php new file mode 100644 index 000000000000..bb39593fa234 --- /dev/null +++ b/AdsAdManager/src/V1/ContentLabel.php @@ -0,0 +1,105 @@ +google.ads.admanager.v1.ContentLabel + */ +class ContentLabel extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `ContentLabel`. + * Format: `networks/{network_code}/contentLabels/{content_label_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The display name of the `ContentLabel`. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `ContentLabel`. + * Format: `networks/{network_code}/contentLabels/{content_label_id}` + * @type string $display_name + * Optional. The display name of the `ContentLabel`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentLabelMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `ContentLabel`. + * Format: `networks/{network_code}/contentLabels/{content_label_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `ContentLabel`. + * Format: `networks/{network_code}/contentLabels/{content_label_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The display name of the `ContentLabel`. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. The display name of the `ContentLabel`. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ContentTargeting.php b/AdsAdManager/src/V1/ContentTargeting.php new file mode 100644 index 000000000000..435f0fc08c5b --- /dev/null +++ b/AdsAdManager/src/V1/ContentTargeting.php @@ -0,0 +1,202 @@ +google.ads.admanager.v1.ContentTargeting + */ +class ContentTargeting extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The resource names of the + * [Content][google.ads.admanager.v1.Content] that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_content = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_content; + /** + * Optional. The resource names of the + * [Content][google.ads.admanager.v1.Content] that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_content = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_content; + /** + * Optional. The resource names of the + * [ContentBundles][google.ads.admanager.v1.ContentBundle] that + * should be targeted/included. + * + * Generated from protobuf field repeated string targeted_content_bundles = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_content_bundles; + /** + * Optional. The resource names of the + * [ContentBundles][google.ads.admanager.v1.ContentBundle] that + * should be excluded. + * + * Generated from protobuf field repeated string excluded_content_bundles = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_content_bundles; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_content + * Optional. The resource names of the + * [Content][google.ads.admanager.v1.Content] that should be + * targeted/included. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_content + * Optional. The resource names of the + * [Content][google.ads.admanager.v1.Content] that should be + * excluded. + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_content_bundles + * Optional. The resource names of the + * [ContentBundles][google.ads.admanager.v1.ContentBundle] that + * should be targeted/included. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_content_bundles + * Optional. The resource names of the + * [ContentBundles][google.ads.admanager.v1.ContentBundle] that + * should be excluded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The resource names of the + * [Content][google.ads.admanager.v1.Content] that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_content = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedContent() + { + return $this->targeted_content; + } + + /** + * Optional. The resource names of the + * [Content][google.ads.admanager.v1.Content] that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_content = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedContent($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_content = $arr; + + return $this; + } + + /** + * Optional. The resource names of the + * [Content][google.ads.admanager.v1.Content] that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_content = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedContent() + { + return $this->excluded_content; + } + + /** + * Optional. The resource names of the + * [Content][google.ads.admanager.v1.Content] that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_content = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedContent($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_content = $arr; + + return $this; + } + + /** + * Optional. The resource names of the + * [ContentBundles][google.ads.admanager.v1.ContentBundle] that + * should be targeted/included. + * + * Generated from protobuf field repeated string targeted_content_bundles = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedContentBundles() + { + return $this->targeted_content_bundles; + } + + /** + * Optional. The resource names of the + * [ContentBundles][google.ads.admanager.v1.ContentBundle] that + * should be targeted/included. + * + * Generated from protobuf field repeated string targeted_content_bundles = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedContentBundles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_content_bundles = $arr; + + return $this; + } + + /** + * Optional. The resource names of the + * [ContentBundles][google.ads.admanager.v1.ContentBundle] that + * should be excluded. + * + * Generated from protobuf field repeated string excluded_content_bundles = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedContentBundles() + { + return $this->excluded_content_bundles; + } + + /** + * Optional. The resource names of the + * [ContentBundles][google.ads.admanager.v1.ContentBundle] that + * should be excluded. + * + * Generated from protobuf field repeated string excluded_content_bundles = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedContentBundles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_content_bundles = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreateContactRequest.php b/AdsAdManager/src/V1/CreateContactRequest.php new file mode 100644 index 000000000000..433bb80b98c8 --- /dev/null +++ b/AdsAdManager/src/V1/CreateContactRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.CreateContactRequest + */ +class CreateContactRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this `Contact` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Contact` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $contact = null; + + /** + * @param string $parent Required. The parent resource where this `Contact` will be created. + * Format: `networks/{network_code}` + * Please see {@see ContactServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\Contact $contact Required. The `Contact` to create. + * + * @return \Google\Ads\AdManager\V1\CreateContactRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Ads\AdManager\V1\Contact $contact): self + { + return (new self()) + ->setParent($parent) + ->setContact($contact); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this `Contact` will be created. + * Format: `networks/{network_code}` + * @type \Google\Ads\AdManager\V1\Contact $contact + * Required. The `Contact` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this `Contact` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this `Contact` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Contact` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Contact|null + */ + public function getContact() + { + return $this->contact; + } + + public function hasContact() + { + return isset($this->contact); + } + + public function clearContact() + { + unset($this->contact); + } + + /** + * Required. The `Contact` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Contact contact = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Contact $var + * @return $this + */ + public function setContact($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Contact::class); + $this->contact = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreateCustomFieldRequest.php b/AdsAdManager/src/V1/CreateCustomFieldRequest.php new file mode 100644 index 000000000000..01c2c4d60a80 --- /dev/null +++ b/AdsAdManager/src/V1/CreateCustomFieldRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.CreateCustomFieldRequest + */ +class CreateCustomFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this `CustomField` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `CustomField` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomField custom_field = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $custom_field = null; + + /** + * @param string $parent Required. The parent resource where this `CustomField` will be created. + * Format: `networks/{network_code}` + * Please see {@see CustomFieldServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\CustomField $customField Required. The `CustomField` to create. + * + * @return \Google\Ads\AdManager\V1\CreateCustomFieldRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Ads\AdManager\V1\CustomField $customField): self + { + return (new self()) + ->setParent($parent) + ->setCustomField($customField); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this `CustomField` will be created. + * Format: `networks/{network_code}` + * @type \Google\Ads\AdManager\V1\CustomField $custom_field + * Required. The `CustomField` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this `CustomField` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this `CustomField` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `CustomField` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomField custom_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\CustomField|null + */ + public function getCustomField() + { + return $this->custom_field; + } + + public function hasCustomField() + { + return isset($this->custom_field); + } + + public function clearCustomField() + { + unset($this->custom_field); + } + + /** + * Required. The `CustomField` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomField custom_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\CustomField $var + * @return $this + */ + public function setCustomField($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CustomField::class); + $this->custom_field = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreatePlacementRequest.php b/AdsAdManager/src/V1/CreatePlacementRequest.php new file mode 100644 index 000000000000..138aa95a4538 --- /dev/null +++ b/AdsAdManager/src/V1/CreatePlacementRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.CreatePlacementRequest + */ +class CreatePlacementRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this `Placement` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Placement` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Placement placement = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $placement = null; + + /** + * @param string $parent Required. The parent resource where this `Placement` will be created. + * Format: `networks/{network_code}` + * Please see {@see PlacementServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\Placement $placement Required. The `Placement` to create. + * + * @return \Google\Ads\AdManager\V1\CreatePlacementRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Ads\AdManager\V1\Placement $placement): self + { + return (new self()) + ->setParent($parent) + ->setPlacement($placement); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this `Placement` will be created. + * Format: `networks/{network_code}` + * @type \Google\Ads\AdManager\V1\Placement $placement + * Required. The `Placement` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this `Placement` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this `Placement` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Placement` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Placement placement = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Placement|null + */ + public function getPlacement() + { + return $this->placement; + } + + public function hasPlacement() + { + return isset($this->placement); + } + + public function clearPlacement() + { + unset($this->placement); + } + + /** + * Required. The `Placement` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Placement placement = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Placement $var + * @return $this + */ + public function setPlacement($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Placement::class); + $this->placement = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreateSiteRequest.php b/AdsAdManager/src/V1/CreateSiteRequest.php new file mode 100644 index 000000000000..cb46fc8015fb --- /dev/null +++ b/AdsAdManager/src/V1/CreateSiteRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.CreateSiteRequest + */ +class CreateSiteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this `Site` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Site` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $site = null; + + /** + * @param string $parent Required. The parent resource where this `Site` will be created. + * Format: `networks/{network_code}` + * Please see {@see SiteServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\Site $site Required. The `Site` to create. + * + * @return \Google\Ads\AdManager\V1\CreateSiteRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Ads\AdManager\V1\Site $site): self + { + return (new self()) + ->setParent($parent) + ->setSite($site); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this `Site` will be created. + * Format: `networks/{network_code}` + * @type \Google\Ads\AdManager\V1\Site $site + * Required. The `Site` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this `Site` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this `Site` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Site` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Site|null + */ + public function getSite() + { + return $this->site; + } + + public function hasSite() + { + return isset($this->site); + } + + public function clearSite() + { + unset($this->site); + } + + /** + * Required. The `Site` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Site site = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Site $var + * @return $this + */ + public function setSite($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Site::class); + $this->site = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreateTeamRequest.php b/AdsAdManager/src/V1/CreateTeamRequest.php new file mode 100644 index 000000000000..576ff5a95666 --- /dev/null +++ b/AdsAdManager/src/V1/CreateTeamRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.CreateTeamRequest + */ +class CreateTeamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this `Team` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Team` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Team team = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $team = null; + + /** + * @param string $parent Required. The parent resource where this `Team` will be created. + * Format: `networks/{network_code}` + * Please see {@see TeamServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\Team $team Required. The `Team` to create. + * + * @return \Google\Ads\AdManager\V1\CreateTeamRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Ads\AdManager\V1\Team $team): self + { + return (new self()) + ->setParent($parent) + ->setTeam($team); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this `Team` will be created. + * Format: `networks/{network_code}` + * @type \Google\Ads\AdManager\V1\Team $team + * Required. The `Team` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this `Team` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this `Team` will be created. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Team` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Team team = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Team|null + */ + public function getTeam() + { + return $this->team; + } + + public function hasTeam() + { + return isset($this->team); + } + + public function clearTeam() + { + unset($this->team); + } + + /** + * Required. The `Team` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Team team = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Team $var + * @return $this + */ + public function setTeam($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Team::class); + $this->team = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreativeTemplate.php b/AdsAdManager/src/V1/CreativeTemplate.php new file mode 100644 index 000000000000..5def9566d8c7 --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplate.php @@ -0,0 +1,537 @@ +google.ads.admanager.v1.CreativeTemplate + */ +class CreativeTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the creative template. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The display name of the creative template. This has a maximum + * length of 255 characters. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = null; + /** + * Optional. The description of the creative template. + * + * Generated from protobuf field optional string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = null; + /** + * Required. The code snippet of the creative template, with placeholders for + * the associated variables. + * + * Generated from protobuf field optional string snippet = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snippet = null; + /** + * Output only. The status of the creative template. This attribute is + * assigned by Google. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * Optional. The type of the creative template. Users can only create or + * update `CreativeTemplateType.CUSTOM` templates. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType type = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = null; + /** + * Optional. `True` if this creative template produces out-of-page creatives. + * Creative templates with this setting enabled must include the viewed + * impression macro. + * + * Generated from protobuf field optional bool interstitial = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $interstitial = null; + /** + * Optional. `True` if this creative template produces native-eligible + * creatives. + * + * Generated from protobuf field optional bool native_eligible = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $native_eligible = null; + /** + * Optional. `True` if this creative template produces native video-eligible + * creatives. + * + * Generated from protobuf field optional bool native_video_eligible = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $native_video_eligible = null; + /** + * Optional. Whether the Creative produced is compatible for SafeFrame + * rendering. This attribute defaults to `True`. + * + * Generated from protobuf field optional bool safe_frame_compatible = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $safe_frame_compatible = null; + /** + * Required. The list of creative template variables. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplateVariable variables = 14 [(.google.api.field_behavior) = REQUIRED]; + */ + private $variables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the creative template. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + * @type string $display_name + * Required. The display name of the creative template. This has a maximum + * length of 255 characters. + * @type string $description + * Optional. The description of the creative template. + * @type string $snippet + * Required. The code snippet of the creative template, with placeholders for + * the associated variables. + * @type int $status + * Output only. The status of the creative template. This attribute is + * assigned by Google. + * @type int $type + * Optional. The type of the creative template. Users can only create or + * update `CreativeTemplateType.CUSTOM` templates. + * @type bool $interstitial + * Optional. `True` if this creative template produces out-of-page creatives. + * Creative templates with this setting enabled must include the viewed + * impression macro. + * @type bool $native_eligible + * Optional. `True` if this creative template produces native-eligible + * creatives. + * @type bool $native_video_eligible + * Optional. `True` if this creative template produces native video-eligible + * creatives. + * @type bool $safe_frame_compatible + * Optional. Whether the Creative produced is compatible for SafeFrame + * rendering. This attribute defaults to `True`. + * @type array<\Google\Ads\AdManager\V1\CreativeTemplateVariable>|\Google\Protobuf\Internal\RepeatedField $variables + * Required. The list of creative template variables. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the creative template. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the creative template. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The display name of the creative template. This has a maximum + * length of 255 characters. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Required. The display name of the creative template. This has a maximum + * length of 255 characters. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. The description of the creative template. + * + * Generated from protobuf field optional string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * Optional. The description of the creative template. + * + * Generated from protobuf field optional string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. The code snippet of the creative template, with placeholders for + * the associated variables. + * + * Generated from protobuf field optional string snippet = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSnippet() + { + return isset($this->snippet) ? $this->snippet : ''; + } + + public function hasSnippet() + { + return isset($this->snippet); + } + + public function clearSnippet() + { + unset($this->snippet); + } + + /** + * Required. The code snippet of the creative template, with placeholders for + * the associated variables. + * + * Generated from protobuf field optional string snippet = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSnippet($var) + { + GPBUtil::checkString($var, True); + $this->snippet = $var; + + return $this; + } + + /** + * Output only. The status of the creative template. This attribute is + * assigned by Google. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return isset($this->status) ? $this->status : 0; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. The status of the creative template. This attribute is + * assigned by Google. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CreativeTemplateStatusEnum\CreativeTemplateStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Optional. The type of the creative template. Users can only create or + * update `CreativeTemplateType.CUSTOM` templates. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return isset($this->type) ? $this->type : 0; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * Optional. The type of the creative template. Users can only create or + * update `CreativeTemplateType.CUSTOM` templates. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CreativeTemplateTypeEnum\CreativeTemplateType::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. `True` if this creative template produces out-of-page creatives. + * Creative templates with this setting enabled must include the viewed + * impression macro. + * + * Generated from protobuf field optional bool interstitial = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getInterstitial() + { + return isset($this->interstitial) ? $this->interstitial : false; + } + + public function hasInterstitial() + { + return isset($this->interstitial); + } + + public function clearInterstitial() + { + unset($this->interstitial); + } + + /** + * Optional. `True` if this creative template produces out-of-page creatives. + * Creative templates with this setting enabled must include the viewed + * impression macro. + * + * Generated from protobuf field optional bool interstitial = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setInterstitial($var) + { + GPBUtil::checkBool($var); + $this->interstitial = $var; + + return $this; + } + + /** + * Optional. `True` if this creative template produces native-eligible + * creatives. + * + * Generated from protobuf field optional bool native_eligible = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getNativeEligible() + { + return isset($this->native_eligible) ? $this->native_eligible : false; + } + + public function hasNativeEligible() + { + return isset($this->native_eligible); + } + + public function clearNativeEligible() + { + unset($this->native_eligible); + } + + /** + * Optional. `True` if this creative template produces native-eligible + * creatives. + * + * Generated from protobuf field optional bool native_eligible = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setNativeEligible($var) + { + GPBUtil::checkBool($var); + $this->native_eligible = $var; + + return $this; + } + + /** + * Optional. `True` if this creative template produces native video-eligible + * creatives. + * + * Generated from protobuf field optional bool native_video_eligible = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getNativeVideoEligible() + { + return isset($this->native_video_eligible) ? $this->native_video_eligible : false; + } + + public function hasNativeVideoEligible() + { + return isset($this->native_video_eligible); + } + + public function clearNativeVideoEligible() + { + unset($this->native_video_eligible); + } + + /** + * Optional. `True` if this creative template produces native video-eligible + * creatives. + * + * Generated from protobuf field optional bool native_video_eligible = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setNativeVideoEligible($var) + { + GPBUtil::checkBool($var); + $this->native_video_eligible = $var; + + return $this; + } + + /** + * Optional. Whether the Creative produced is compatible for SafeFrame + * rendering. This attribute defaults to `True`. + * + * Generated from protobuf field optional bool safe_frame_compatible = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSafeFrameCompatible() + { + return isset($this->safe_frame_compatible) ? $this->safe_frame_compatible : false; + } + + public function hasSafeFrameCompatible() + { + return isset($this->safe_frame_compatible); + } + + public function clearSafeFrameCompatible() + { + unset($this->safe_frame_compatible); + } + + /** + * Optional. Whether the Creative produced is compatible for SafeFrame + * rendering. This attribute defaults to `True`. + * + * Generated from protobuf field optional bool safe_frame_compatible = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSafeFrameCompatible($var) + { + GPBUtil::checkBool($var); + $this->safe_frame_compatible = $var; + + return $this; + } + + /** + * Required. The list of creative template variables. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplateVariable variables = 14 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVariables() + { + return $this->variables; + } + + /** + * Required. The list of creative template variables. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplateVariable variables = 14 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\CreativeTemplateVariable>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVariables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreativeTemplateVariable::class); + $this->variables = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreativeTemplateStatusEnum.php b/AdsAdManager/src/V1/CreativeTemplateStatusEnum.php new file mode 100644 index 000000000000..307bd65b603c --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CreativeTemplateStatusEnum + */ +class CreativeTemplateStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CreativeTemplateStatusEnum/CreativeTemplateStatus.php b/AdsAdManager/src/V1/CreativeTemplateStatusEnum/CreativeTemplateStatus.php new file mode 100644 index 000000000000..2cd8caffde3b --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateStatusEnum/CreativeTemplateStatus.php @@ -0,0 +1,71 @@ +google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus + */ +class CreativeTemplateStatus +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum CREATIVE_TEMPLATE_STATUS_UNSPECIFIED = 0; + */ + const CREATIVE_TEMPLATE_STATUS_UNSPECIFIED = 0; + /** + * The CreativeTemplate is active + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The CreativeTemplate is deleted. Creatives created from this + * CreativeTemplate can no longer serve. + * + * Generated from protobuf enum DELETED = 2; + */ + const DELETED = 2; + /** + * The CreativeTemplate is inactive. Users cannot create new creatives + * from this template, but existing ones can be edited and continue to serve + * + * Generated from protobuf enum INACTIVE = 3; + */ + const INACTIVE = 3; + + private static $valueToName = [ + self::CREATIVE_TEMPLATE_STATUS_UNSPECIFIED => 'CREATIVE_TEMPLATE_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::DELETED => 'DELETED', + self::INACTIVE => 'INACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/CreativeTemplateTypeEnum.php b/AdsAdManager/src/V1/CreativeTemplateTypeEnum.php new file mode 100644 index 000000000000..cdbe9cbb3d89 --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CreativeTemplateTypeEnum + */ +class CreativeTemplateTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CreativeTemplateTypeEnum/CreativeTemplateType.php b/AdsAdManager/src/V1/CreativeTemplateTypeEnum/CreativeTemplateType.php new file mode 100644 index 000000000000..3c0293b6a60b --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateTypeEnum/CreativeTemplateType.php @@ -0,0 +1,63 @@ +google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType + */ +class CreativeTemplateType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum CREATIVE_TEMPLATE_TYPE_UNSPECIFIED = 0; + */ + const CREATIVE_TEMPLATE_TYPE_UNSPECIFIED = 0; + /** + * Creative templates that are included in Ad Manager by default. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * Creative templates created by an administrator or other user in the + * network. + * + * Generated from protobuf enum CUSTOM = 2; + */ + const CUSTOM = 2; + + private static $valueToName = [ + self::CREATIVE_TEMPLATE_TYPE_UNSPECIFIED => 'CREATIVE_TEMPLATE_TYPE_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::CUSTOM => 'CUSTOM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/CreativeTemplateVariable.php b/AdsAdManager/src/V1/CreativeTemplateVariable.php new file mode 100644 index 000000000000..1fa71b2c13fa --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateVariable.php @@ -0,0 +1,402 @@ +google.ads.admanager.v1.CreativeTemplateVariable + */ +class CreativeTemplateVariable extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Label that is displayed to users when creating from the creative + * template. This has a maximum length of 127 characters. + * + * Generated from protobuf field optional string label = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $label = null; + /** + * Output only. Unique name used to identify the variable. This attribute is + * assigned by Google when a creative template variable is created. + * + * Generated from protobuf field optional string unique_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $unique_display_name = null; + /** + * Required. A descriptive help text that is displayed to users along with the + * label. This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field optional string description = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $description = null; + /** + * Optional. `True` if this variable is required to be filled in by users when + * creating a creative from the creative template. + * + * Generated from protobuf field optional bool required = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $required = null; + protected $SubType; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\CreativeTemplateVariable\AssetCreativeTemplateVariable $asset_variable + * Optional. Represents a file asset variable defined in a creative + * template. + * @type \Google\Ads\AdManager\V1\CreativeTemplateVariable\ListStringCreativeTemplateVariable $list_string_variable + * Optional. Represents a list variable defined in a creative template. + * @type \Google\Ads\AdManager\V1\CreativeTemplateVariable\LongCreativeTemplateVariable $long_variable + * Optional. Represents a long variable defined in a creative template. + * @type \Google\Ads\AdManager\V1\CreativeTemplateVariable\StringCreativeTemplateVariable $string_variable + * Optional. Represents a string variable defined in a creative template. + * @type \Google\Ads\AdManager\V1\CreativeTemplateVariable\UrlCreativeTemplateVariable $url_variable + * Optional. Represents a url variable defined in a creative template. + * @type string $label + * Required. Label that is displayed to users when creating from the creative + * template. This has a maximum length of 127 characters. + * @type string $unique_display_name + * Output only. Unique name used to identify the variable. This attribute is + * assigned by Google when a creative template variable is created. + * @type string $description + * Required. A descriptive help text that is displayed to users along with the + * label. This attribute has a maximum length of 255 characters. + * @type bool $required + * Optional. `True` if this variable is required to be filled in by users when + * creating a creative from the creative template. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateMessages::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Represents a file asset variable defined in a creative + * template. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable asset_variable = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\CreativeTemplateVariable\AssetCreativeTemplateVariable|null + */ + public function getAssetVariable() + { + return $this->readOneof(5); + } + + public function hasAssetVariable() + { + return $this->hasOneof(5); + } + + /** + * Optional. Represents a file asset variable defined in a creative + * template. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable asset_variable = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\CreativeTemplateVariable\AssetCreativeTemplateVariable $var + * @return $this + */ + public function setAssetVariable($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CreativeTemplateVariable\AssetCreativeTemplateVariable::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. Represents a list variable defined in a creative template. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable list_string_variable = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\CreativeTemplateVariable\ListStringCreativeTemplateVariable|null + */ + public function getListStringVariable() + { + return $this->readOneof(7); + } + + public function hasListStringVariable() + { + return $this->hasOneof(7); + } + + /** + * Optional. Represents a list variable defined in a creative template. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable list_string_variable = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\CreativeTemplateVariable\ListStringCreativeTemplateVariable $var + * @return $this + */ + public function setListStringVariable($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CreativeTemplateVariable\ListStringCreativeTemplateVariable::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Optional. Represents a long variable defined in a creative template. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable long_variable = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\CreativeTemplateVariable\LongCreativeTemplateVariable|null + */ + public function getLongVariable() + { + return $this->readOneof(8); + } + + public function hasLongVariable() + { + return $this->hasOneof(8); + } + + /** + * Optional. Represents a long variable defined in a creative template. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable long_variable = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\CreativeTemplateVariable\LongCreativeTemplateVariable $var + * @return $this + */ + public function setLongVariable($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CreativeTemplateVariable\LongCreativeTemplateVariable::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Optional. Represents a string variable defined in a creative template. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable string_variable = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\CreativeTemplateVariable\StringCreativeTemplateVariable|null + */ + public function getStringVariable() + { + return $this->readOneof(9); + } + + public function hasStringVariable() + { + return $this->hasOneof(9); + } + + /** + * Optional. Represents a string variable defined in a creative template. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable string_variable = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\CreativeTemplateVariable\StringCreativeTemplateVariable $var + * @return $this + */ + public function setStringVariable($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CreativeTemplateVariable\StringCreativeTemplateVariable::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Optional. Represents a url variable defined in a creative template. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable url_variable = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\CreativeTemplateVariable\UrlCreativeTemplateVariable|null + */ + public function getUrlVariable() + { + return $this->readOneof(10); + } + + public function hasUrlVariable() + { + return $this->hasOneof(10); + } + + /** + * Optional. Represents a url variable defined in a creative template. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable url_variable = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\CreativeTemplateVariable\UrlCreativeTemplateVariable $var + * @return $this + */ + public function setUrlVariable($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CreativeTemplateVariable\UrlCreativeTemplateVariable::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Required. Label that is displayed to users when creating from the creative + * template. This has a maximum length of 127 characters. + * + * Generated from protobuf field optional string label = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLabel() + { + return isset($this->label) ? $this->label : ''; + } + + public function hasLabel() + { + return isset($this->label); + } + + public function clearLabel() + { + unset($this->label); + } + + /** + * Required. Label that is displayed to users when creating from the creative + * template. This has a maximum length of 127 characters. + * + * Generated from protobuf field optional string label = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Output only. Unique name used to identify the variable. This attribute is + * assigned by Google when a creative template variable is created. + * + * Generated from protobuf field optional string unique_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUniqueDisplayName() + { + return isset($this->unique_display_name) ? $this->unique_display_name : ''; + } + + public function hasUniqueDisplayName() + { + return isset($this->unique_display_name); + } + + public function clearUniqueDisplayName() + { + unset($this->unique_display_name); + } + + /** + * Output only. Unique name used to identify the variable. This attribute is + * assigned by Google when a creative template variable is created. + * + * Generated from protobuf field optional string unique_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUniqueDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->unique_display_name = $var; + + return $this; + } + + /** + * Required. A descriptive help text that is displayed to users along with the + * label. This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field optional string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * Required. A descriptive help text that is displayed to users along with the + * label. This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field optional string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. `True` if this variable is required to be filled in by users when + * creating a creative from the creative template. + * + * Generated from protobuf field optional bool required = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRequired() + { + return isset($this->required) ? $this->required : false; + } + + public function hasRequired() + { + return isset($this->required); + } + + public function clearRequired() + { + unset($this->required); + } + + /** + * Optional. `True` if this variable is required to be filled in by users when + * creating a creative from the creative template. + * + * Generated from protobuf field optional bool required = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRequired($var) + { + GPBUtil::checkBool($var); + $this->required = $var; + + return $this; + } + + /** + * @return string + */ + public function getSubType() + { + return $this->whichOneof("SubType"); + } + +} + diff --git a/AdsAdManager/src/V1/CreativeTemplateVariable/AssetCreativeTemplateVariable.php b/AdsAdManager/src/V1/CreativeTemplateVariable/AssetCreativeTemplateVariable.php new file mode 100644 index 000000000000..d801c6d72642 --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateVariable/AssetCreativeTemplateVariable.php @@ -0,0 +1,75 @@ +google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable + */ +class AssetCreativeTemplateVariable extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The set of allowed MIME types. If unspecified, all MIME types + * are allowed. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.MimeType mime_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $mime_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $mime_types + * Optional. The set of allowed MIME types. If unspecified, all MIME types + * are allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateMessages::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The set of allowed MIME types. If unspecified, all MIME types + * are allowed. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.MimeType mime_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMimeTypes() + { + return $this->mime_types; + } + + /** + * Optional. The set of allowed MIME types. If unspecified, all MIME types + * are allowed. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.MimeType mime_types = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMimeTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\AdManager\V1\CreativeTemplateVariable\AssetCreativeTemplateVariable\MimeType::class); + $this->mime_types = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/CreativeTemplateVariable/AssetCreativeTemplateVariable/MimeType.php b/AdsAdManager/src/V1/CreativeTemplateVariable/AssetCreativeTemplateVariable/MimeType.php new file mode 100644 index 000000000000..484311abbd32 --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateVariable/AssetCreativeTemplateVariable/MimeType.php @@ -0,0 +1,69 @@ +google.ads.admanager.v1.CreativeTemplateVariable.AssetCreativeTemplateVariable.MimeType + */ +class MimeType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum MIME_TYPE_UNSPECIFIED = 0; + */ + const MIME_TYPE_UNSPECIFIED = 0; + /** + * The `image/jpeg` MIME type. + * + * Generated from protobuf enum JPG = 1; + */ + const JPG = 1; + /** + * The `image/png` MIME type. + * + * Generated from protobuf enum PNG = 2; + */ + const PNG = 2; + /** + * The `image/gif` MIME type. + * + * Generated from protobuf enum GIF = 3; + */ + const GIF = 3; + + private static $valueToName = [ + self::MIME_TYPE_UNSPECIFIED => 'MIME_TYPE_UNSPECIFIED', + self::JPG => 'JPG', + self::PNG => 'PNG', + self::GIF => 'GIF', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/CreativeTemplateVariable/ListStringCreativeTemplateVariable.php b/AdsAdManager/src/V1/CreativeTemplateVariable/ListStringCreativeTemplateVariable.php new file mode 100644 index 000000000000..d7b9af87e924 --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateVariable/ListStringCreativeTemplateVariable.php @@ -0,0 +1,226 @@ +google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable + */ +class ListStringCreativeTemplateVariable extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional string default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_value = null; + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional string sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sample_value = null; + /** + * Optional. The selectable values that the user can choose from. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice choices = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $choices; + /** + * Optional. `True` if a user can specify an 'other' value. For example, if + * a variable called backgroundColor is defined as a list with values: red, + * green, blue, this boolean can be set to allow a user to enter a value not + * on the list such as purple. + * + * Generated from protobuf field optional bool allow_other_choice = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_other_choice = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $default_value + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * @type string $sample_value + * Optional. Sample value that is used when previewing the template in the + * UI. + * @type array<\Google\Ads\AdManager\V1\CreativeTemplateVariable\ListStringCreativeTemplateVariable\VariableChoice>|\Google\Protobuf\Internal\RepeatedField $choices + * Optional. The selectable values that the user can choose from. + * @type bool $allow_other_choice + * Optional. `True` if a user can specify an 'other' value. For example, if + * a variable called backgroundColor is defined as a list with values: red, + * green, blue, this boolean can be set to allow a user to enter a value not + * on the list such as purple. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateMessages::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional string default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDefaultValue() + { + return isset($this->default_value) ? $this->default_value : ''; + } + + public function hasDefaultValue() + { + return isset($this->default_value); + } + + public function clearDefaultValue() + { + unset($this->default_value); + } + + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional string default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDefaultValue($var) + { + GPBUtil::checkString($var, True); + $this->default_value = $var; + + return $this; + } + + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional string sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSampleValue() + { + return isset($this->sample_value) ? $this->sample_value : ''; + } + + public function hasSampleValue() + { + return isset($this->sample_value); + } + + public function clearSampleValue() + { + unset($this->sample_value); + } + + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional string sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSampleValue($var) + { + GPBUtil::checkString($var, True); + $this->sample_value = $var; + + return $this; + } + + /** + * Optional. The selectable values that the user can choose from. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice choices = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChoices() + { + return $this->choices; + } + + /** + * Optional. The selectable values that the user can choose from. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice choices = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\CreativeTemplateVariable\ListStringCreativeTemplateVariable\VariableChoice>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChoices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreativeTemplateVariable\ListStringCreativeTemplateVariable\VariableChoice::class); + $this->choices = $arr; + + return $this; + } + + /** + * Optional. `True` if a user can specify an 'other' value. For example, if + * a variable called backgroundColor is defined as a list with values: red, + * green, blue, this boolean can be set to allow a user to enter a value not + * on the list such as purple. + * + * Generated from protobuf field optional bool allow_other_choice = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowOtherChoice() + { + return isset($this->allow_other_choice) ? $this->allow_other_choice : false; + } + + public function hasAllowOtherChoice() + { + return isset($this->allow_other_choice); + } + + public function clearAllowOtherChoice() + { + unset($this->allow_other_choice); + } + + /** + * Optional. `True` if a user can specify an 'other' value. For example, if + * a variable called backgroundColor is defined as a list with values: red, + * green, blue, this boolean can be set to allow a user to enter a value not + * on the list such as purple. + * + * Generated from protobuf field optional bool allow_other_choice = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowOtherChoice($var) + { + GPBUtil::checkBool($var); + $this->allow_other_choice = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/CreativeTemplateVariable/ListStringCreativeTemplateVariable/VariableChoice.php b/AdsAdManager/src/V1/CreativeTemplateVariable/ListStringCreativeTemplateVariable/VariableChoice.php new file mode 100644 index 000000000000..cefc8f3674bd --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateVariable/ListStringCreativeTemplateVariable/VariableChoice.php @@ -0,0 +1,142 @@ +google.ads.admanager.v1.CreativeTemplateVariable.ListStringCreativeTemplateVariable.VariableChoice + */ +class VariableChoice extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A label is displayed to users when creating a + * [TemplateCreative][]. This attribute is intended to be more descriptive + * than value. This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field optional string label = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $label = null; + /** + * Required. When creating a [TemplateCreative][], the value in + * [StringCreativeTemplateVariableValue][] should match this value, if you + * intend to select this value. This attribute has a maximum length of 255 + * characters. + * + * Generated from protobuf field optional string value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $label + * Required. A label is displayed to users when creating a + * [TemplateCreative][]. This attribute is intended to be more descriptive + * than value. This attribute has a maximum length of 255 characters. + * @type string $value + * Required. When creating a [TemplateCreative][], the value in + * [StringCreativeTemplateVariableValue][] should match this value, if you + * intend to select this value. This attribute has a maximum length of 255 + * characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateMessages::initOnce(); + parent::__construct($data); + } + + /** + * Required. A label is displayed to users when creating a + * [TemplateCreative][]. This attribute is intended to be more descriptive + * than value. This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field optional string label = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLabel() + { + return isset($this->label) ? $this->label : ''; + } + + public function hasLabel() + { + return isset($this->label); + } + + public function clearLabel() + { + unset($this->label); + } + + /** + * Required. A label is displayed to users when creating a + * [TemplateCreative][]. This attribute is intended to be more descriptive + * than value. This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field optional string label = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Required. When creating a [TemplateCreative][], the value in + * [StringCreativeTemplateVariableValue][] should match this value, if you + * intend to select this value. This attribute has a maximum length of 255 + * characters. + * + * Generated from protobuf field optional string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getValue() + { + return isset($this->value) ? $this->value : ''; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * Required. When creating a [TemplateCreative][], the value in + * [StringCreativeTemplateVariableValue][] should match this value, if you + * intend to select this value. This attribute has a maximum length of 255 + * characters. + * + * Generated from protobuf field optional string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/CreativeTemplateVariable/LongCreativeTemplateVariable.php b/AdsAdManager/src/V1/CreativeTemplateVariable/LongCreativeTemplateVariable.php new file mode 100644 index 000000000000..4f8bcbcb116b --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateVariable/LongCreativeTemplateVariable.php @@ -0,0 +1,133 @@ +google.ads.admanager.v1.CreativeTemplateVariable.LongCreativeTemplateVariable + */ +class LongCreativeTemplateVariable extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional int64 default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_value = null; + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional int64 sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sample_value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $default_value + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * @type int|string $sample_value + * Optional. Sample value that is used when previewing the template in the + * UI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateMessages::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional int64 default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getDefaultValue() + { + return isset($this->default_value) ? $this->default_value : 0; + } + + public function hasDefaultValue() + { + return isset($this->default_value); + } + + public function clearDefaultValue() + { + unset($this->default_value); + } + + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional int64 default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setDefaultValue($var) + { + GPBUtil::checkInt64($var); + $this->default_value = $var; + + return $this; + } + + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional int64 sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getSampleValue() + { + return isset($this->sample_value) ? $this->sample_value : 0; + } + + public function hasSampleValue() + { + return isset($this->sample_value); + } + + public function clearSampleValue() + { + unset($this->sample_value); + } + + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional int64 sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setSampleValue($var) + { + GPBUtil::checkInt64($var); + $this->sample_value = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/CreativeTemplateVariable/StringCreativeTemplateVariable.php b/AdsAdManager/src/V1/CreativeTemplateVariable/StringCreativeTemplateVariable.php new file mode 100644 index 000000000000..b60e797e4d2a --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateVariable/StringCreativeTemplateVariable.php @@ -0,0 +1,133 @@ +google.ads.admanager.v1.CreativeTemplateVariable.StringCreativeTemplateVariable + */ +class StringCreativeTemplateVariable extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional string default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_value = null; + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional string sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sample_value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $default_value + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * @type string $sample_value + * Optional. Sample value that is used when previewing the template in the + * UI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateMessages::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional string default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDefaultValue() + { + return isset($this->default_value) ? $this->default_value : ''; + } + + public function hasDefaultValue() + { + return isset($this->default_value); + } + + public function clearDefaultValue() + { + unset($this->default_value); + } + + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional string default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDefaultValue($var) + { + GPBUtil::checkString($var, True); + $this->default_value = $var; + + return $this; + } + + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional string sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSampleValue() + { + return isset($this->sample_value) ? $this->sample_value : ''; + } + + public function hasSampleValue() + { + return isset($this->sample_value); + } + + public function clearSampleValue() + { + unset($this->sample_value); + } + + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional string sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSampleValue($var) + { + GPBUtil::checkString($var, True); + $this->sample_value = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/CreativeTemplateVariable/UrlCreativeTemplateVariable.php b/AdsAdManager/src/V1/CreativeTemplateVariable/UrlCreativeTemplateVariable.php new file mode 100644 index 000000000000..cb0b42c0d749 --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateVariable/UrlCreativeTemplateVariable.php @@ -0,0 +1,181 @@ +google.ads.admanager.v1.CreativeTemplateVariable.UrlCreativeTemplateVariable + */ +class UrlCreativeTemplateVariable extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional string default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_value = null; + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional string sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sample_value = null; + /** + * Optional. The type of URL that this variable represents. Different types + * of URLs may be handled differently at rendering time. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType url_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $url_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $default_value + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * @type string $sample_value + * Optional. Sample value that is used when previewing the template in the + * UI. + * @type int $url_type + * Optional. The type of URL that this variable represents. Different types + * of URLs may be handled differently at rendering time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateMessages::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional string default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDefaultValue() + { + return isset($this->default_value) ? $this->default_value : ''; + } + + public function hasDefaultValue() + { + return isset($this->default_value); + } + + public function clearDefaultValue() + { + unset($this->default_value); + } + + /** + * Optional. Default value to be filled in when creating creatives from the + * creative template. + * + * Generated from protobuf field optional string default_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDefaultValue($var) + { + GPBUtil::checkString($var, True); + $this->default_value = $var; + + return $this; + } + + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional string sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSampleValue() + { + return isset($this->sample_value) ? $this->sample_value : ''; + } + + public function hasSampleValue() + { + return isset($this->sample_value); + } + + public function clearSampleValue() + { + unset($this->sample_value); + } + + /** + * Optional. Sample value that is used when previewing the template in the + * UI. + * + * Generated from protobuf field optional string sample_value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSampleValue($var) + { + GPBUtil::checkString($var, True); + $this->sample_value = $var; + + return $this; + } + + /** + * Optional. The type of URL that this variable represents. Different types + * of URLs may be handled differently at rendering time. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType url_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getUrlType() + { + return isset($this->url_type) ? $this->url_type : 0; + } + + public function hasUrlType() + { + return isset($this->url_type); + } + + public function clearUrlType() + { + unset($this->url_type); + } + + /** + * Optional. The type of URL that this variable represents. Different types + * of URLs may be handled differently at rendering time. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType url_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setUrlType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CreativeTemplateVariableUrlTypeEnum\CreativeTemplateVariableUrlType::class); + $this->url_type = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/CreativeTemplateVariableUrlTypeEnum.php b/AdsAdManager/src/V1/CreativeTemplateVariableUrlTypeEnum.php new file mode 100644 index 000000000000..7fc9ae07a5d9 --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateVariableUrlTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum + */ +class CreativeTemplateVariableUrlTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateVariableUrlTypeEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CreativeTemplateVariableUrlTypeEnum/CreativeTemplateVariableUrlType.php b/AdsAdManager/src/V1/CreativeTemplateVariableUrlTypeEnum/CreativeTemplateVariableUrlType.php new file mode 100644 index 000000000000..d5c870b9d0f8 --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTemplateVariableUrlTypeEnum/CreativeTemplateVariableUrlType.php @@ -0,0 +1,76 @@ +google.ads.admanager.v1.CreativeTemplateVariableUrlTypeEnum.CreativeTemplateVariableUrlType + */ +class CreativeTemplateVariableUrlType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED = 0; + */ + const CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED = 0; + /** + * Click tracking URL. + * + * Generated from protobuf enum CLICK_TRACKER = 1; + */ + const CLICK_TRACKER = 1; + /** + * Deep-link URL. + * + * Generated from protobuf enum DEEPLINK = 2; + */ + const DEEPLINK = 2; + /** + * Impression tracking URL. + * + * Generated from protobuf enum IMPRESSION_TRACKER = 3; + */ + const IMPRESSION_TRACKER = 3; + /** + * Standard HTTP URL. + * + * Generated from protobuf enum STANDARD_HTTP = 4; + */ + const STANDARD_HTTP = 4; + + private static $valueToName = [ + self::CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED => 'CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED', + self::CLICK_TRACKER => 'CLICK_TRACKER', + self::DEEPLINK => 'DEEPLINK', + self::IMPRESSION_TRACKER => 'IMPRESSION_TRACKER', + self::STANDARD_HTTP => 'STANDARD_HTTP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/CustomFieldOption.php b/AdsAdManager/src/V1/CustomFieldOption.php index bc0f77c34190..9b4ffb8ccc50 100644 --- a/AdsAdManager/src/V1/CustomFieldOption.php +++ b/AdsAdManager/src/V1/CustomFieldOption.php @@ -16,9 +16,9 @@ class CustomFieldOption extends \Google\Protobuf\Internal\Message { /** - * Output only. `CustomFieldOption` ID. + * Optional. Non-empty default. `CustomFieldOption` ID. * - * Generated from protobuf field int64 custom_field_option_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field int64 custom_field_option_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; */ protected $custom_field_option_id = 0; /** @@ -36,7 +36,7 @@ class CustomFieldOption extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int|string $custom_field_option_id - * Output only. `CustomFieldOption` ID. + * Optional. Non-empty default. `CustomFieldOption` ID. * @type string $display_name * Required. The display name of the `CustomFieldOption`. * This value has a maximum length of 127 characters. @@ -48,9 +48,9 @@ public function __construct($data = NULL) { } /** - * Output only. `CustomFieldOption` ID. + * Optional. Non-empty default. `CustomFieldOption` ID. * - * Generated from protobuf field int64 custom_field_option_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field int64 custom_field_option_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; * @return int|string */ public function getCustomFieldOptionId() @@ -59,9 +59,9 @@ public function getCustomFieldOptionId() } /** - * Output only. `CustomFieldOption` ID. + * Optional. Non-empty default. `CustomFieldOption` ID. * - * Generated from protobuf field int64 custom_field_option_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field int64 custom_field_option_id = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; * @param int|string $var * @return $this */ diff --git a/AdsAdManager/src/V1/CustomTargetingClause.php b/AdsAdManager/src/V1/CustomTargetingClause.php index 1512f8b9a3db..ac5b782d3038 100644 --- a/AdsAdManager/src/V1/CustomTargetingClause.php +++ b/AdsAdManager/src/V1/CustomTargetingClause.php @@ -21,6 +21,18 @@ class CustomTargetingClause extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.ads.admanager.v1.CustomTargetingLiteral custom_targeting_literals = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $custom_targeting_literals; + /** + * Optional. Leaf targeting expressions for audience segments. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AudienceSegmentTargeting audience_segment_targetings = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $audience_segment_targetings; + /** + * Optional. Leaf targeting expressions for cms metadata. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CmsMetadataTargeting cms_metadata_targetings = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $cms_metadata_targetings; /** * Constructor. @@ -30,6 +42,10 @@ class CustomTargetingClause extends \Google\Protobuf\Internal\Message * * @type array<\Google\Ads\AdManager\V1\CustomTargetingLiteral>|\Google\Protobuf\Internal\RepeatedField $custom_targeting_literals * Optional. Leaf targeting expressions for custom key/values. + * @type array<\Google\Ads\AdManager\V1\AudienceSegmentTargeting>|\Google\Protobuf\Internal\RepeatedField $audience_segment_targetings + * Optional. Leaf targeting expressions for audience segments. + * @type array<\Google\Ads\AdManager\V1\CmsMetadataTargeting>|\Google\Protobuf\Internal\RepeatedField $cms_metadata_targetings + * Optional. Leaf targeting expressions for cms metadata. * } */ public function __construct($data = NULL) { @@ -63,5 +79,57 @@ public function setCustomTargetingLiterals($var) return $this; } + /** + * Optional. Leaf targeting expressions for audience segments. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AudienceSegmentTargeting audience_segment_targetings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAudienceSegmentTargetings() + { + return $this->audience_segment_targetings; + } + + /** + * Optional. Leaf targeting expressions for audience segments. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AudienceSegmentTargeting audience_segment_targetings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\AudienceSegmentTargeting>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAudienceSegmentTargetings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AudienceSegmentTargeting::class); + $this->audience_segment_targetings = $arr; + + return $this; + } + + /** + * Optional. Leaf targeting expressions for cms metadata. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CmsMetadataTargeting cms_metadata_targetings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCmsMetadataTargetings() + { + return $this->cms_metadata_targetings; + } + + /** + * Optional. Leaf targeting expressions for cms metadata. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CmsMetadataTargeting cms_metadata_targetings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\CmsMetadataTargeting>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCmsMetadataTargetings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CmsMetadataTargeting::class); + $this->cms_metadata_targetings = $arr; + + return $this; + } + } diff --git a/AdsAdManager/src/V1/CustomTargetingKey.php b/AdsAdManager/src/V1/CustomTargetingKey.php index c08ea0a5c5f6..abaefc021afb 100644 --- a/AdsAdManager/src/V1/CustomTargetingKey.php +++ b/AdsAdManager/src/V1/CustomTargetingKey.php @@ -26,43 +26,43 @@ class CustomTargetingKey extends \Google\Protobuf\Internal\Message /** * Output only. `CustomTargetingKey` ID. * - * Generated from protobuf field int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $custom_targeting_key_id = 0; + protected $custom_targeting_key_id = null; /** * Immutable. Name of the key. Keys can contain up to 10 characters each. You * can use alphanumeric characters and symbols other than the following: * ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character. * - * Generated from protobuf field string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * Generated from protobuf field optional string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; */ - protected $ad_tag_name = ''; + protected $ad_tag_name = null; /** * Optional. Descriptive name for the `CustomTargetingKey`. * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $display_name = ''; + protected $display_name = null; /** * Required. Indicates whether users will select from predefined values or * create new targeting values, while specifying targeting criteria for a line * item. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED]; */ - protected $type = 0; + protected $type = null; /** * Output only. Status of the `CustomTargetingKey`. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $status = 0; + protected $status = null; /** * Required. Reportable state of the `CustomTargetingKey`. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED]; */ - protected $reportable_type = 0; + protected $reportable_type = null; /** * Constructor. @@ -130,18 +130,28 @@ public function setName($var) /** * Output only. `CustomTargetingKey` ID. * - * Generated from protobuf field int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int|string */ public function getCustomTargetingKeyId() { - return $this->custom_targeting_key_id; + return isset($this->custom_targeting_key_id) ? $this->custom_targeting_key_id : 0; + } + + public function hasCustomTargetingKeyId() + { + return isset($this->custom_targeting_key_id); + } + + public function clearCustomTargetingKeyId() + { + unset($this->custom_targeting_key_id); } /** * Output only. `CustomTargetingKey` ID. * - * Generated from protobuf field int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int|string $var * @return $this */ @@ -158,12 +168,22 @@ public function setCustomTargetingKeyId($var) * can use alphanumeric characters and symbols other than the following: * ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character. * - * Generated from protobuf field string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * Generated from protobuf field optional string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; * @return string */ public function getAdTagName() { - return $this->ad_tag_name; + return isset($this->ad_tag_name) ? $this->ad_tag_name : ''; + } + + public function hasAdTagName() + { + return isset($this->ad_tag_name); + } + + public function clearAdTagName() + { + unset($this->ad_tag_name); } /** @@ -171,7 +191,7 @@ public function getAdTagName() * can use alphanumeric characters and symbols other than the following: * ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character. * - * Generated from protobuf field string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * Generated from protobuf field optional string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE]; * @param string $var * @return $this */ @@ -186,18 +206,28 @@ public function setAdTagName($var) /** * Optional. Descriptive name for the `CustomTargetingKey`. * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getDisplayName() { - return $this->display_name; + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); } /** * Optional. Descriptive name for the `CustomTargetingKey`. * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -214,12 +244,22 @@ public function setDisplayName($var) * create new targeting values, while specifying targeting criteria for a line * item. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED]; * @return int */ public function getType() { - return $this->type; + return isset($this->type) ? $this->type : 0; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); } /** @@ -227,7 +267,7 @@ public function getType() * create new targeting values, while specifying targeting criteria for a line * item. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED]; * @param int $var * @return $this */ @@ -242,18 +282,28 @@ public function setType($var) /** * Output only. Status of the `CustomTargetingKey`. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int */ public function getStatus() { - return $this->status; + return isset($this->status) ? $this->status : 0; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); } /** * Output only. Status of the `CustomTargetingKey`. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var * @return $this */ @@ -268,18 +318,28 @@ public function setStatus($var) /** * Required. Reportable state of the `CustomTargetingKey`. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED]; * @return int */ public function getReportableType() { - return $this->reportable_type; + return isset($this->reportable_type) ? $this->reportable_type : 0; + } + + public function hasReportableType() + { + return isset($this->reportable_type); + } + + public function clearReportableType() + { + unset($this->reportable_type); } /** * Required. Reportable state of the `CustomTargetingKey`. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED]; * @param int $var * @return $this */ diff --git a/AdsAdManager/src/V1/CustomTargetingValue.php b/AdsAdManager/src/V1/CustomTargetingValue.php index 2f74b25d0231..844841b82ffe 100644 --- a/AdsAdManager/src/V1/CustomTargetingValue.php +++ b/AdsAdManager/src/V1/CustomTargetingValue.php @@ -28,9 +28,9 @@ class CustomTargetingValue extends \Google\Protobuf\Internal\Message * Format: * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` * - * Generated from protobuf field string custom_targeting_key = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * Generated from protobuf field optional string custom_targeting_key = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { */ - protected $custom_targeting_key = ''; + protected $custom_targeting_key = null; /** * Immutable. Name of the `CustomTargetingValue`. Values can contain up to 40 * characters each. You can use alphanumeric characters and symbols other than @@ -38,28 +38,28 @@ class CustomTargetingValue extends \Google\Protobuf\Internal\Message * not data-specific; all values are treated as strings. For example, instead * of using "age>=18 AND <=34", try "18-34" * - * Generated from protobuf field string ad_tag_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * Generated from protobuf field optional string ad_tag_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; */ - protected $ad_tag_name = ''; + protected $ad_tag_name = null; /** * Optional. Descriptive name for the `CustomTargetingValue`. * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $display_name = ''; + protected $display_name = null; /** * Required. Immutable. The way in which the CustomTargetingValue.name strings * will be matched. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; */ - protected $match_type = 0; + protected $match_type = null; /** * Output only. Status of the `CustomTargetingValue`. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ - protected $status = 0; + protected $status = null; /** * Constructor. @@ -130,12 +130,22 @@ public function setName($var) * Format: * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` * - * Generated from protobuf field string custom_targeting_key = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * Generated from protobuf field optional string custom_targeting_key = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { * @return string */ public function getCustomTargetingKey() { - return $this->custom_targeting_key; + return isset($this->custom_targeting_key) ? $this->custom_targeting_key : ''; + } + + public function hasCustomTargetingKey() + { + return isset($this->custom_targeting_key); + } + + public function clearCustomTargetingKey() + { + unset($this->custom_targeting_key); } /** @@ -143,7 +153,7 @@ public function getCustomTargetingKey() * Format: * `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` * - * Generated from protobuf field string custom_targeting_key = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * Generated from protobuf field optional string custom_targeting_key = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { * @param string $var * @return $this */ @@ -162,12 +172,22 @@ public function setCustomTargetingKey($var) * not data-specific; all values are treated as strings. For example, instead * of using "age>=18 AND <=34", try "18-34" * - * Generated from protobuf field string ad_tag_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * Generated from protobuf field optional string ad_tag_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; * @return string */ public function getAdTagName() { - return $this->ad_tag_name; + return isset($this->ad_tag_name) ? $this->ad_tag_name : ''; + } + + public function hasAdTagName() + { + return isset($this->ad_tag_name); + } + + public function clearAdTagName() + { + unset($this->ad_tag_name); } /** @@ -177,7 +197,7 @@ public function getAdTagName() * not data-specific; all values are treated as strings. For example, instead * of using "age>=18 AND <=34", try "18-34" * - * Generated from protobuf field string ad_tag_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * Generated from protobuf field optional string ad_tag_name = 4 [(.google.api.field_behavior) = IMMUTABLE]; * @param string $var * @return $this */ @@ -192,18 +212,28 @@ public function setAdTagName($var) /** * Optional. Descriptive name for the `CustomTargetingValue`. * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getDisplayName() { - return $this->display_name; + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); } /** * Optional. Descriptive name for the `CustomTargetingValue`. * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional string display_name = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -219,19 +249,29 @@ public function setDisplayName($var) * Required. Immutable. The way in which the CustomTargetingValue.name strings * will be matched. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; * @return int */ public function getMatchType() { - return $this->match_type; + return isset($this->match_type) ? $this->match_type : 0; + } + + public function hasMatchType() + { + return isset($this->match_type); + } + + public function clearMatchType() + { + unset($this->match_type); } /** * Required. Immutable. The way in which the CustomTargetingValue.name strings * will be matched. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; * @param int $var * @return $this */ @@ -246,18 +286,28 @@ public function setMatchType($var) /** * Output only. Status of the `CustomTargetingValue`. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int */ public function getStatus() { - return $this->status; + return isset($this->status) ? $this->status : 0; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); } /** * Output only. Status of the `CustomTargetingValue`. * - * Generated from protobuf field .google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field optional .google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var * @return $this */ diff --git a/AdsAdManager/src/V1/DeviceCapability.php b/AdsAdManager/src/V1/DeviceCapability.php new file mode 100644 index 000000000000..e2d9a5a356fb --- /dev/null +++ b/AdsAdManager/src/V1/DeviceCapability.php @@ -0,0 +1,115 @@ +google.ads.admanager.v1.DeviceCapability + */ +class DeviceCapability extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `DeviceCapability`. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The localized name of the device capability. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `DeviceCapability`. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + * @type string $display_name + * Output only. The localized name of the device capability. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\DeviceCapabilityMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `DeviceCapability`. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `DeviceCapability`. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The localized name of the device capability. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Output only. The localized name of the device capability. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/DeviceCapabilityTargeting.php b/AdsAdManager/src/V1/DeviceCapabilityTargeting.php new file mode 100644 index 000000000000..3acce537b1c8 --- /dev/null +++ b/AdsAdManager/src/V1/DeviceCapabilityTargeting.php @@ -0,0 +1,113 @@ +google.ads.admanager.v1.DeviceCapabilityTargeting + */ +class DeviceCapabilityTargeting extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of device capability resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_capabilities = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_capabilities; + /** + * Optional. A list of device capability resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_capabilities = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_capabilities; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_capabilities + * Optional. A list of device capability resource names that should be + * targeted/included. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_capabilities + * Optional. A list of device capability resource names that should be + * excluded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of device capability resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_capabilities = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedCapabilities() + { + return $this->targeted_capabilities; + } + + /** + * Optional. A list of device capability resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_capabilities = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedCapabilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_capabilities = $arr; + + return $this; + } + + /** + * Optional. A list of device capability resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_capabilities = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedCapabilities() + { + return $this->excluded_capabilities; + } + + /** + * Optional. A list of device capability resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_capabilities = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedCapabilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_capabilities = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/DeviceManufacturer.php b/AdsAdManager/src/V1/DeviceManufacturer.php new file mode 100644 index 000000000000..f59124bb2c98 --- /dev/null +++ b/AdsAdManager/src/V1/DeviceManufacturer.php @@ -0,0 +1,119 @@ +google.ads.admanager.v1.DeviceManufacturer + */ +class DeviceManufacturer extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `DeviceManufacturer`. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The localized name of the device manufacturer. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `DeviceManufacturer`. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer}` + * @type string $display_name + * Output only. The localized name of the device manufacturer. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\DeviceManufacturerMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `DeviceManufacturer`. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `DeviceManufacturer`. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The localized name of the device manufacturer. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Output only. The localized name of the device manufacturer. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/DeviceManufacturerTargeting.php b/AdsAdManager/src/V1/DeviceManufacturerTargeting.php new file mode 100644 index 000000000000..fae5b700bef1 --- /dev/null +++ b/AdsAdManager/src/V1/DeviceManufacturerTargeting.php @@ -0,0 +1,261 @@ + + * Device manufacturer"). + * + * Generated from protobuf message google.ads.admanager.v1.DeviceManufacturerTargeting + */ +class DeviceManufacturerTargeting extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of device manufacturer resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_device_manufacturers = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_device_manufacturers; + /** + * Optional. A list of device manufacturer resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_device_manufacturers = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_device_manufacturers; + /** + * Optional. A list of mobile device resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_mobile_devices = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_mobile_devices; + /** + * Optional. A list of mobile device resource names that should be excluded. + * + * Generated from protobuf field repeated string excluded_mobile_devices = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_mobile_devices; + /** + * Optional. A list of mobile device submodel resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_mobile_device_submodels = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_mobile_device_submodels; + /** + * Optional. A list of mobile device submodel resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_mobile_device_submodels = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_mobile_device_submodels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_device_manufacturers + * Optional. A list of device manufacturer resource names that should be + * targeted/included. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_device_manufacturers + * Optional. A list of device manufacturer resource names that should be + * excluded. + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_mobile_devices + * Optional. A list of mobile device resource names that should be + * targeted/included. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_mobile_devices + * Optional. A list of mobile device resource names that should be excluded. + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_mobile_device_submodels + * Optional. A list of mobile device submodel resource names that should be + * targeted/included. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_mobile_device_submodels + * Optional. A list of mobile device submodel resource names that should be + * excluded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of device manufacturer resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_device_manufacturers = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedDeviceManufacturers() + { + return $this->targeted_device_manufacturers; + } + + /** + * Optional. A list of device manufacturer resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_device_manufacturers = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedDeviceManufacturers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_device_manufacturers = $arr; + + return $this; + } + + /** + * Optional. A list of device manufacturer resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_device_manufacturers = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedDeviceManufacturers() + { + return $this->excluded_device_manufacturers; + } + + /** + * Optional. A list of device manufacturer resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_device_manufacturers = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedDeviceManufacturers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_device_manufacturers = $arr; + + return $this; + } + + /** + * Optional. A list of mobile device resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_mobile_devices = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedMobileDevices() + { + return $this->targeted_mobile_devices; + } + + /** + * Optional. A list of mobile device resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_mobile_devices = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedMobileDevices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_mobile_devices = $arr; + + return $this; + } + + /** + * Optional. A list of mobile device resource names that should be excluded. + * + * Generated from protobuf field repeated string excluded_mobile_devices = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedMobileDevices() + { + return $this->excluded_mobile_devices; + } + + /** + * Optional. A list of mobile device resource names that should be excluded. + * + * Generated from protobuf field repeated string excluded_mobile_devices = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedMobileDevices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_mobile_devices = $arr; + + return $this; + } + + /** + * Optional. A list of mobile device submodel resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_mobile_device_submodels = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedMobileDeviceSubmodels() + { + return $this->targeted_mobile_device_submodels; + } + + /** + * Optional. A list of mobile device submodel resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_mobile_device_submodels = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedMobileDeviceSubmodels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_mobile_device_submodels = $arr; + + return $this; + } + + /** + * Optional. A list of mobile device submodel resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_mobile_device_submodels = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedMobileDeviceSubmodels() + { + return $this->excluded_mobile_device_submodels; + } + + /** + * Optional. A list of mobile device submodel resource names that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_mobile_device_submodels = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedMobileDeviceSubmodels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_mobile_device_submodels = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/DisapprovalReason.php b/AdsAdManager/src/V1/DisapprovalReason.php new file mode 100644 index 000000000000..9435f7599389 --- /dev/null +++ b/AdsAdManager/src/V1/DisapprovalReason.php @@ -0,0 +1,121 @@ +google.ads.admanager.v1.DisapprovalReason + */ +class DisapprovalReason extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The type of policy violation found for the Site. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = null; + /** + * Output only. Additional details for the disapproval of the Site. + * + * Generated from protobuf field optional string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Output only. The type of policy violation found for the Site. + * @type string $details + * Output only. Additional details for the disapproval of the Site. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteMessages::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The type of policy violation found for the Site. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return isset($this->type) ? $this->type : 0; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * Output only. The type of policy violation found for the Site. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\SiteDisapprovalReasonEnum\SiteDisapprovalReason::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. Additional details for the disapproval of the Site. + * + * Generated from protobuf field optional string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDetails() + { + return isset($this->details) ? $this->details : ''; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Output only. Additional details for the disapproval of the Site. + * + * Generated from protobuf field optional string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkString($var, True); + $this->details = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ExchangeSyndicationProductEnum.php b/AdsAdManager/src/V1/ExchangeSyndicationProductEnum.php new file mode 100644 index 000000000000..1c3190b11c41 --- /dev/null +++ b/AdsAdManager/src/V1/ExchangeSyndicationProductEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.ExchangeSyndicationProductEnum + */ +class ExchangeSyndicationProductEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ExchangeSyndicationProductEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/ExchangeSyndicationProductEnum/ExchangeSyndicationProduct.php b/AdsAdManager/src/V1/ExchangeSyndicationProductEnum/ExchangeSyndicationProduct.php new file mode 100644 index 000000000000..a5b8ae0d2b6b --- /dev/null +++ b/AdsAdManager/src/V1/ExchangeSyndicationProductEnum/ExchangeSyndicationProduct.php @@ -0,0 +1,76 @@ +google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct + */ +class ExchangeSyndicationProduct +{ + /** + * No value specified + * + * Generated from protobuf enum EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED = 0; + */ + const EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED = 0; + /** + * Property serves in-browser. + * + * Generated from protobuf enum DISPLAY = 1; + */ + const DISPLAY = 1; + /** + * Property serves on mobile applications (includes JS and SDK). + * + * Generated from protobuf enum MOBILE_APP = 2; + */ + const MOBILE_APP = 2; + /** + * Property serves video (includes audio). + * + * Generated from protobuf enum VIDEO_AND_AUDIO = 3; + */ + const VIDEO_AND_AUDIO = 3; + /** + * Property serves for games. + * + * Generated from protobuf enum GAMES = 4; + */ + const GAMES = 4; + + private static $valueToName = [ + self::EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED => 'EXCHANGE_SYNDICATION_PRODUCT_UNSPECIFIED', + self::DISPLAY => 'DISPLAY', + self::MOBILE_APP => 'MOBILE_APP', + self::VIDEO_AND_AUDIO => 'VIDEO_AND_AUDIO', + self::GAMES => 'GAMES', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/FetchReportResultRowsRequest.php b/AdsAdManager/src/V1/FetchReportResultRowsRequest.php index c12d3c16d43d..b23277077000 100644 --- a/AdsAdManager/src/V1/FetchReportResultRowsRequest.php +++ b/AdsAdManager/src/V1/FetchReportResultRowsRequest.php @@ -26,7 +26,8 @@ class FetchReportResultRowsRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of rows to return. The service may return * fewer than this value. If unspecified, at most 1,000 rows will be returned. - * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * The maximum value is 10,000; values greater than 10,000 will be reduced to + * 10,000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -67,7 +68,8 @@ public static function build(string $name): self * @type int $page_size * Optional. The maximum number of rows to return. The service may return * fewer than this value. If unspecified, at most 1,000 rows will be returned. - * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * The maximum value is 10,000; values greater than 10,000 will be reduced to + * 10,000. * @type string $page_token * Optional. A page token, received from a previous `FetchReportResultRows` * call. Provide this to retrieve the second and subsequent batches of rows. @@ -111,7 +113,8 @@ public function setName($var) /** * Optional. The maximum number of rows to return. The service may return * fewer than this value. If unspecified, at most 1,000 rows will be returned. - * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * The maximum value is 10,000; values greater than 10,000 will be reduced to + * 10,000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -124,7 +127,8 @@ public function getPageSize() /** * Optional. The maximum number of rows to return. The service may return * fewer than this value. If unspecified, at most 1,000 rows will be returned. - * The maximum value is 10,000; values above 10,000 will be reduced to 10,000. + * The maximum value is 10,000; values greater than 10,000 will be reduced to + * 10,000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/FetchReportResultRowsResponse.php b/AdsAdManager/src/V1/FetchReportResultRowsResponse.php index 74a9f55c6b63..fc893a549109 100644 --- a/AdsAdManager/src/V1/FetchReportResultRowsResponse.php +++ b/AdsAdManager/src/V1/FetchReportResultRowsResponse.php @@ -18,7 +18,7 @@ class FetchReportResultRowsResponse extends \Google\Protobuf\Internal\Message /** * Up to `page_size` rows of report data. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DataTable.Row rows = 1; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDataTable.Row rows = 1; */ private $rows; /** @@ -33,7 +33,7 @@ class FetchReportResultRowsResponse extends \Google\Protobuf\Internal\Message * Only returned with the first page of results (when page_token is not * included in the request). * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange date_ranges = 3; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange date_ranges = 3; */ private $date_ranges; /** @@ -41,7 +41,7 @@ class FetchReportResultRowsResponse extends \Google\Protobuf\Internal\Message * Only returned with the first page of results (when page_token is not * included in the request). * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange comparison_date_ranges = 4; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange comparison_date_ranges = 4; */ private $comparison_date_ranges; /** @@ -67,16 +67,16 @@ class FetchReportResultRowsResponse extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type array<\Google\Ads\AdManager\V1\Report\DataTable\Row>|\Google\Protobuf\Internal\RepeatedField $rows + * @type array<\Google\Ads\AdManager\V1\ReportDataTable\Row>|\Google\Protobuf\Internal\RepeatedField $rows * Up to `page_size` rows of report data. * @type \Google\Protobuf\Timestamp $run_time * The time at which the report was scheduled to run. For non-scheduled * reports, this is the time at which the report was requested to be run. - * @type array<\Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $date_ranges + * @type array<\Google\Ads\AdManager\V1\ReportDefinition\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $date_ranges * The computed fixed date ranges this report includes. * Only returned with the first page of results (when page_token is not * included in the request). - * @type array<\Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $comparison_date_ranges + * @type array<\Google\Ads\AdManager\V1\ReportDefinition\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $comparison_date_ranges * The computed comparison fixed date ranges this report includes. * Only returned with the first page of results (when page_token is not * included in the request). @@ -98,7 +98,7 @@ public function __construct($data = NULL) { /** * Up to `page_size` rows of report data. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DataTable.Row rows = 1; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDataTable.Row rows = 1; * @return \Google\Protobuf\Internal\RepeatedField */ public function getRows() @@ -109,13 +109,13 @@ public function getRows() /** * Up to `page_size` rows of report data. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DataTable.Row rows = 1; - * @param array<\Google\Ads\AdManager\V1\Report\DataTable\Row>|\Google\Protobuf\Internal\RepeatedField $var + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDataTable.Row rows = 1; + * @param array<\Google\Ads\AdManager\V1\ReportDataTable\Row>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setRows($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\DataTable\Row::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportDataTable\Row::class); $this->rows = $arr; return $this; @@ -164,7 +164,7 @@ public function setRunTime($var) * Only returned with the first page of results (when page_token is not * included in the request). * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange date_ranges = 3; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange date_ranges = 3; * @return \Google\Protobuf\Internal\RepeatedField */ public function getDateRanges() @@ -177,13 +177,13 @@ public function getDateRanges() * Only returned with the first page of results (when page_token is not * included in the request). * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange date_ranges = 3; - * @param array<\Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $var + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange date_ranges = 3; + * @param array<\Google\Ads\AdManager\V1\ReportDefinition\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setDateRanges($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportDefinition\DateRange\FixedDateRange::class); $this->date_ranges = $arr; return $this; @@ -194,7 +194,7 @@ public function setDateRanges($var) * Only returned with the first page of results (when page_token is not * included in the request). * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange comparison_date_ranges = 4; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange comparison_date_ranges = 4; * @return \Google\Protobuf\Internal\RepeatedField */ public function getComparisonDateRanges() @@ -207,13 +207,13 @@ public function getComparisonDateRanges() * Only returned with the first page of results (when page_token is not * included in the request). * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.DateRange.FixedDateRange comparison_date_ranges = 4; - * @param array<\Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $var + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange comparison_date_ranges = 4; + * @param array<\Google\Ads\AdManager\V1\ReportDefinition\DateRange\FixedDateRange>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setComparisonDateRanges($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\DateRange\FixedDateRange::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportDefinition\DateRange\FixedDateRange::class); $this->comparison_date_ranges = $arr; return $this; diff --git a/AdsAdManager/src/V1/FirstPartyMobileApplicationTargeting.php b/AdsAdManager/src/V1/FirstPartyMobileApplicationTargeting.php new file mode 100644 index 000000000000..105717038c5f --- /dev/null +++ b/AdsAdManager/src/V1/FirstPartyMobileApplicationTargeting.php @@ -0,0 +1,109 @@ +google.ads.admanager.v1.FirstPartyMobileApplicationTargeting + */ +class FirstPartyMobileApplicationTargeting extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The resource names of the first-party applications that should be + * targeted. + * + * Generated from protobuf field repeated string targeted_applications = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_applications; + /** + * Optional. The resource names of the first-party applications that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_applications = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_applications; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_applications + * Optional. The resource names of the first-party applications that should be + * targeted. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_applications + * Optional. The resource names of the first-party applications that should be + * excluded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The resource names of the first-party applications that should be + * targeted. + * + * Generated from protobuf field repeated string targeted_applications = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedApplications() + { + return $this->targeted_applications; + } + + /** + * Optional. The resource names of the first-party applications that should be + * targeted. + * + * Generated from protobuf field repeated string targeted_applications = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedApplications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_applications = $arr; + + return $this; + } + + /** + * Optional. The resource names of the first-party applications that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_applications = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedApplications() + { + return $this->excluded_applications; + } + + /** + * Optional. The resource names of the first-party applications that should be + * excluded. + * + * Generated from protobuf field repeated string excluded_applications = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedApplications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_applications = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetApplicationRequest.php b/AdsAdManager/src/V1/GetApplicationRequest.php new file mode 100644 index 000000000000..eb816d6561cc --- /dev/null +++ b/AdsAdManager/src/V1/GetApplicationRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetApplicationRequest + */ +class GetApplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Application. + * Format: `networks/{network_code}/applications/{application_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Application. + * Format: `networks/{network_code}/applications/{application_id}` + * Please see {@see ApplicationServiceClient::applicationName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetApplicationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Application. + * Format: `networks/{network_code}/applications/{application_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ApplicationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Application. + * Format: `networks/{network_code}/applications/{application_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Application. + * Format: `networks/{network_code}/applications/{application_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetAudienceSegmentRequest.php b/AdsAdManager/src/V1/GetAudienceSegmentRequest.php new file mode 100644 index 000000000000..60546c0d5697 --- /dev/null +++ b/AdsAdManager/src/V1/GetAudienceSegmentRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetAudienceSegmentRequest + */ +class GetAudienceSegmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the AudienceSegment. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the AudienceSegment. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + * Please see {@see AudienceSegmentServiceClient::audienceSegmentName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetAudienceSegmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the AudienceSegment. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AudienceSegmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the AudienceSegment. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the AudienceSegment. + * Format: `networks/{network_code}/audienceSegments/{audience_segment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetBrowserLanguageRequest.php b/AdsAdManager/src/V1/GetBrowserLanguageRequest.php new file mode 100644 index 000000000000..41c1f2705ed8 --- /dev/null +++ b/AdsAdManager/src/V1/GetBrowserLanguageRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetBrowserLanguageRequest + */ +class GetBrowserLanguageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the BrowserLanguage. + * Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the BrowserLanguage. + * Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + * Please see {@see BrowserLanguageServiceClient::browserLanguageName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetBrowserLanguageRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the BrowserLanguage. + * Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\BrowserLanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the BrowserLanguage. + * Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the BrowserLanguage. + * Format: `networks/{network_code}/browserLanguages/{browser_language_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetBrowserRequest.php b/AdsAdManager/src/V1/GetBrowserRequest.php new file mode 100644 index 000000000000..e89455c2fcd9 --- /dev/null +++ b/AdsAdManager/src/V1/GetBrowserRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetBrowserRequest + */ +class GetBrowserRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Browser. + * Format: `networks/{network_code}/browsers/{browser_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Browser. + * Format: `networks/{network_code}/browsers/{browser_id}` + * Please see {@see BrowserServiceClient::browserName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetBrowserRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Browser. + * Format: `networks/{network_code}/browsers/{browser_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\BrowserService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Browser. + * Format: `networks/{network_code}/browsers/{browser_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Browser. + * Format: `networks/{network_code}/browsers/{browser_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetCmsMetadataKeyRequest.php b/AdsAdManager/src/V1/GetCmsMetadataKeyRequest.php new file mode 100644 index 000000000000..9a473dbf3b81 --- /dev/null +++ b/AdsAdManager/src/V1/GetCmsMetadataKeyRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetCmsMetadataKeyRequest + */ +class GetCmsMetadataKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * Please see {@see CmsMetadataKeyServiceClient::cmsMetadataKeyName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetCmsMetadataKeyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CmsMetadataKeyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataKeys/{cms_metadata_key_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetCmsMetadataValueRequest.php b/AdsAdManager/src/V1/GetCmsMetadataValueRequest.php new file mode 100644 index 000000000000..0120929642ae --- /dev/null +++ b/AdsAdManager/src/V1/GetCmsMetadataValueRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetCmsMetadataValueRequest + */ +class GetCmsMetadataValueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * Please see {@see CmsMetadataValueServiceClient::cmsMetadataValueName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetCmsMetadataValueRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CmsMetadataValueService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the CmsMetadataKey. + * Format: `networks/{network_code}/cmsMetadataValues/{cms_metadata_value_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetContactRequest.php b/AdsAdManager/src/V1/GetContactRequest.php new file mode 100644 index 000000000000..e07fbb8381d8 --- /dev/null +++ b/AdsAdManager/src/V1/GetContactRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetContactRequest + */ +class GetContactRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Contact. + * Format: `networks/{network_code}/contacts/{contact_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Contact. + * Format: `networks/{network_code}/contacts/{contact_id}` + * Please see {@see ContactServiceClient::contactName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetContactRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Contact. + * Format: `networks/{network_code}/contacts/{contact_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Contact. + * Format: `networks/{network_code}/contacts/{contact_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Contact. + * Format: `networks/{network_code}/contacts/{contact_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetContentBundleRequest.php b/AdsAdManager/src/V1/GetContentBundleRequest.php new file mode 100644 index 000000000000..24d01ad4a5a7 --- /dev/null +++ b/AdsAdManager/src/V1/GetContentBundleRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetContentBundleRequest + */ +class GetContentBundleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ContentBundle. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the ContentBundle. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * Please see {@see ContentBundleServiceClient::contentBundleName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetContentBundleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ContentBundle. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentBundleService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ContentBundle. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ContentBundle. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetContentLabelRequest.php b/AdsAdManager/src/V1/GetContentLabelRequest.php new file mode 100644 index 000000000000..b4cc1ba3aa40 --- /dev/null +++ b/AdsAdManager/src/V1/GetContentLabelRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetContentLabelRequest + */ +class GetContentLabelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ContentLabel. + * Format: `networks/{network_code}/contentLabels/{content_label_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the ContentLabel. + * Format: `networks/{network_code}/contentLabels/{content_label_id}` + * Please see {@see ContentLabelServiceClient::contentLabelName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetContentLabelRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ContentLabel. + * Format: `networks/{network_code}/contentLabels/{content_label_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentLabelService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ContentLabel. + * Format: `networks/{network_code}/contentLabels/{content_label_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ContentLabel. + * Format: `networks/{network_code}/contentLabels/{content_label_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetContentRequest.php b/AdsAdManager/src/V1/GetContentRequest.php new file mode 100644 index 000000000000..f939b11c5693 --- /dev/null +++ b/AdsAdManager/src/V1/GetContentRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetContentRequest + */ +class GetContentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Content. + * Format: `networks/{network_code}/content/{content_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Content. + * Format: `networks/{network_code}/content/{content_id}` + * Please see {@see ContentServiceClient::contentName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetContentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Content. + * Format: `networks/{network_code}/content/{content_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Content. + * Format: `networks/{network_code}/content/{content_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Content. + * Format: `networks/{network_code}/content/{content_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetCreativeTemplateRequest.php b/AdsAdManager/src/V1/GetCreativeTemplateRequest.php new file mode 100644 index 000000000000..67ab39dfcb17 --- /dev/null +++ b/AdsAdManager/src/V1/GetCreativeTemplateRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetCreativeTemplateRequest + */ +class GetCreativeTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the CreativeTemplate. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the CreativeTemplate. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + * Please see {@see CreativeTemplateServiceClient::creativeTemplateName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetCreativeTemplateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the CreativeTemplate. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the CreativeTemplate. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the CreativeTemplate. + * Format: `networks/{network_code}/creativeTemplates/{creative_template_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetDeviceCapabilityRequest.php b/AdsAdManager/src/V1/GetDeviceCapabilityRequest.php new file mode 100644 index 000000000000..d56347865ccb --- /dev/null +++ b/AdsAdManager/src/V1/GetDeviceCapabilityRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetDeviceCapabilityRequest + */ +class GetDeviceCapabilityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DeviceCapability. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the DeviceCapability. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + * Please see {@see DeviceCapabilityServiceClient::deviceCapabilityName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetDeviceCapabilityRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the DeviceCapability. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\DeviceCapabilityService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DeviceCapability. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the DeviceCapability. + * Format: `networks/{network_code}/deviceCapabilities/{device_capability_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetDeviceManufacturerRequest.php b/AdsAdManager/src/V1/GetDeviceManufacturerRequest.php new file mode 100644 index 000000000000..2ecc3c740979 --- /dev/null +++ b/AdsAdManager/src/V1/GetDeviceManufacturerRequest.php @@ -0,0 +1,91 @@ +google.ads.admanager.v1.GetDeviceManufacturerRequest + */ +class GetDeviceManufacturerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the DeviceManufacturer. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the DeviceManufacturer. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer_id}` + * Please see {@see DeviceManufacturerServiceClient::deviceManufacturerName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetDeviceManufacturerRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the DeviceManufacturer. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\DeviceManufacturerService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the DeviceManufacturer. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the DeviceManufacturer. + * Format: + * `networks/{network_code}/deviceManufacturers/{device_manufacturer_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetMobileCarrierRequest.php b/AdsAdManager/src/V1/GetMobileCarrierRequest.php new file mode 100644 index 000000000000..0e257c6b4525 --- /dev/null +++ b/AdsAdManager/src/V1/GetMobileCarrierRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetMobileCarrierRequest + */ +class GetMobileCarrierRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the MobileCarrier. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the MobileCarrier. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier_id}` + * Please see {@see MobileCarrierServiceClient::mobileCarrierName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetMobileCarrierRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the MobileCarrier. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileCarrierService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the MobileCarrier. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the MobileCarrier. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetMobileDeviceRequest.php b/AdsAdManager/src/V1/GetMobileDeviceRequest.php new file mode 100644 index 000000000000..d8246fc722a4 --- /dev/null +++ b/AdsAdManager/src/V1/GetMobileDeviceRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetMobileDeviceRequest + */ +class GetMobileDeviceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the MobileDevice. + * Format: `networks/{network_code}/mobileDevices/{mobile_device_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the MobileDevice. + * Format: `networks/{network_code}/mobileDevices/{mobile_device_id}` + * Please see {@see MobileDeviceServiceClient::mobileDeviceName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetMobileDeviceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the MobileDevice. + * Format: `networks/{network_code}/mobileDevices/{mobile_device_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileDeviceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the MobileDevice. + * Format: `networks/{network_code}/mobileDevices/{mobile_device_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the MobileDevice. + * Format: `networks/{network_code}/mobileDevices/{mobile_device_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetMobileDeviceSubmodelRequest.php b/AdsAdManager/src/V1/GetMobileDeviceSubmodelRequest.php new file mode 100644 index 000000000000..c117b1b43cb3 --- /dev/null +++ b/AdsAdManager/src/V1/GetMobileDeviceSubmodelRequest.php @@ -0,0 +1,91 @@ +google.ads.admanager.v1.GetMobileDeviceSubmodelRequest + */ +class GetMobileDeviceSubmodelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the MobileDeviceSubmodel. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the MobileDeviceSubmodel. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel_id}` + * Please see {@see MobileDeviceSubmodelServiceClient::mobileDeviceSubmodelName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetMobileDeviceSubmodelRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the MobileDeviceSubmodel. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileDeviceSubmodelService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the MobileDeviceSubmodel. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the MobileDeviceSubmodel. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetSiteRequest.php b/AdsAdManager/src/V1/GetSiteRequest.php new file mode 100644 index 000000000000..e8b680dadd78 --- /dev/null +++ b/AdsAdManager/src/V1/GetSiteRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetSiteRequest + */ +class GetSiteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Site. + * Format: `networks/{network_code}/sites/{site_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Site. + * Format: `networks/{network_code}/sites/{site_id}` + * Please see {@see SiteServiceClient::siteName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetSiteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Site. + * Format: `networks/{network_code}/sites/{site_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Site. + * Format: `networks/{network_code}/sites/{site_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Site. + * Format: `networks/{network_code}/sites/{site_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GetTeamRequest.php b/AdsAdManager/src/V1/GetTeamRequest.php new file mode 100644 index 000000000000..31b95f5d3299 --- /dev/null +++ b/AdsAdManager/src/V1/GetTeamRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetTeamRequest + */ +class GetTeamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Team. + * Format: `networks/{network_code}/teams/{team_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Team. + * Format: `networks/{network_code}/teams/{team_id}` + * Please see {@see TeamServiceClient::teamName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetTeamRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Team. + * Format: `networks/{network_code}/teams/{team_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Team. + * Format: `networks/{network_code}/teams/{team_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Team. + * Format: `networks/{network_code}/teams/{team_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/LabelFrequencyCap.php b/AdsAdManager/src/V1/LabelFrequencyCap.php index 114c8b3e3776..e64694387979 100644 --- a/AdsAdManager/src/V1/LabelFrequencyCap.php +++ b/AdsAdManager/src/V1/LabelFrequencyCap.php @@ -19,13 +19,13 @@ class LabelFrequencyCap extends \Google\Protobuf\Internal\Message * Required. The label to used for frequency capping. * Format: "networks/{network_code}/labels/{label_id}" * - * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field optional string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ - protected $label = ''; + protected $label = null; /** * The frequency cap. * - * Generated from protobuf field .google.ads.admanager.v1.FrequencyCap frequency_cap = 2; + * Generated from protobuf field optional .google.ads.admanager.v1.FrequencyCap frequency_cap = 2; */ protected $frequency_cap = null; @@ -51,19 +51,29 @@ public function __construct($data = NULL) { * Required. The label to used for frequency capping. * Format: "networks/{network_code}/labels/{label_id}" * - * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field optional string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string */ public function getLabel() { - return $this->label; + return isset($this->label) ? $this->label : ''; + } + + public function hasLabel() + { + return isset($this->label); + } + + public function clearLabel() + { + unset($this->label); } /** * Required. The label to used for frequency capping. * Format: "networks/{network_code}/labels/{label_id}" * - * Generated from protobuf field string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field optional string label = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var * @return $this */ @@ -78,7 +88,7 @@ public function setLabel($var) /** * The frequency cap. * - * Generated from protobuf field .google.ads.admanager.v1.FrequencyCap frequency_cap = 2; + * Generated from protobuf field optional .google.ads.admanager.v1.FrequencyCap frequency_cap = 2; * @return \Google\Ads\AdManager\V1\FrequencyCap|null */ public function getFrequencyCap() @@ -99,7 +109,7 @@ public function clearFrequencyCap() /** * The frequency cap. * - * Generated from protobuf field .google.ads.admanager.v1.FrequencyCap frequency_cap = 2; + * Generated from protobuf field optional .google.ads.admanager.v1.FrequencyCap frequency_cap = 2; * @param \Google\Ads\AdManager\V1\FrequencyCap $var * @return $this */ diff --git a/AdsAdManager/src/V1/ListAdBreaksResponse.php b/AdsAdManager/src/V1/ListAdBreaksResponse.php index 5efd829c3cef..07f1234b86cf 100644 --- a/AdsAdManager/src/V1/ListAdBreaksResponse.php +++ b/AdsAdManager/src/V1/ListAdBreaksResponse.php @@ -34,7 +34,7 @@ class ListAdBreaksResponse extends \Google\Protobuf\Internal\Message * Total number of `AdBreak` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -61,7 +61,7 @@ class ListAdBreaksResponse extends \Google\Protobuf\Internal\Message * Total number of `AdBreak` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -134,7 +134,7 @@ public function setNextPageToken($var) * Total number of `AdBreak` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -153,7 +153,7 @@ public function getTotalSize() * Total number of `AdBreak` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListAdUnitSizesRequest.php b/AdsAdManager/src/V1/ListAdUnitSizesRequest.php index 14020cd4f7ef..0738fead7604 100644 --- a/AdsAdManager/src/V1/ListAdUnitSizesRequest.php +++ b/AdsAdManager/src/V1/ListAdUnitSizesRequest.php @@ -25,8 +25,8 @@ class ListAdUnitSizesRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of AdUnitSizes to return. The service may * return fewer than this value. If unspecified, at most 50 ad unit sizes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -90,8 +90,8 @@ public static function build(string $parent): self * @type int $page_size * Optional. The maximum number of AdUnitSizes to return. The service may * return fewer than this value. If unspecified, at most 50 ad unit sizes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListAdUnitSizes` call. * Provide this to retrieve the subsequent page. @@ -145,8 +145,8 @@ public function setParent($var) /** * Optional. The maximum number of AdUnitSizes to return. The service may * return fewer than this value. If unspecified, at most 50 ad unit sizes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -159,8 +159,8 @@ public function getPageSize() /** * Optional. The maximum number of AdUnitSizes to return. The service may * return fewer than this value. If unspecified, at most 50 ad unit sizes will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListAdUnitSizesResponse.php b/AdsAdManager/src/V1/ListAdUnitSizesResponse.php index c9b275f95ca0..471fe5e27ba6 100644 --- a/AdsAdManager/src/V1/ListAdUnitSizesResponse.php +++ b/AdsAdManager/src/V1/ListAdUnitSizesResponse.php @@ -32,7 +32,7 @@ class ListAdUnitSizesResponse extends \Google\Protobuf\Internal\Message * Total number of AdUnitSizes. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -58,7 +58,7 @@ class ListAdUnitSizesResponse extends \Google\Protobuf\Internal\Message * Total number of AdUnitSizes. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -129,7 +129,7 @@ public function setNextPageToken($var) * Total number of AdUnitSizes. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -148,7 +148,7 @@ public function getTotalSize() * Total number of AdUnitSizes. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListAdUnitsRequest.php b/AdsAdManager/src/V1/ListAdUnitsRequest.php index a026663a9637..727ea00d649d 100644 --- a/AdsAdManager/src/V1/ListAdUnitsRequest.php +++ b/AdsAdManager/src/V1/ListAdUnitsRequest.php @@ -25,8 +25,8 @@ class ListAdUnitsRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of AdUnits to return. The service may return * fewer than this value. If unspecified, at most 50 ad units will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -90,8 +90,8 @@ public static function build(string $parent): self * @type int $page_size * Optional. The maximum number of AdUnits to return. The service may return * fewer than this value. If unspecified, at most 50 ad units will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListAdUnits` call. * Provide this to retrieve the subsequent page. @@ -145,8 +145,8 @@ public function setParent($var) /** * Optional. The maximum number of AdUnits to return. The service may return * fewer than this value. If unspecified, at most 50 ad units will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -159,8 +159,8 @@ public function getPageSize() /** * Optional. The maximum number of AdUnits to return. The service may return * fewer than this value. If unspecified, at most 50 ad units will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListAdUnitsResponse.php b/AdsAdManager/src/V1/ListAdUnitsResponse.php index 455e35caede7..fdbd1e40affd 100644 --- a/AdsAdManager/src/V1/ListAdUnitsResponse.php +++ b/AdsAdManager/src/V1/ListAdUnitsResponse.php @@ -32,7 +32,7 @@ class ListAdUnitsResponse extends \Google\Protobuf\Internal\Message * Total number of AdUnits. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -58,7 +58,7 @@ class ListAdUnitsResponse extends \Google\Protobuf\Internal\Message * Total number of AdUnits. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -129,7 +129,7 @@ public function setNextPageToken($var) * Total number of AdUnits. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -148,7 +148,7 @@ public function getTotalSize() * Total number of AdUnits. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListApplicationsRequest.php b/AdsAdManager/src/V1/ListApplicationsRequest.php new file mode 100644 index 000000000000..4fb765bf8cc7 --- /dev/null +++ b/AdsAdManager/src/V1/ListApplicationsRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListApplicationsRequest + */ +class ListApplicationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Applications. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Applications` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Applications` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListApplications` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListApplications` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of Applications. + * Format: `networks/{network_code}` + * Please see {@see ApplicationServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListApplicationsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of Applications. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Applications` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Applications` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListApplications` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListApplications` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ApplicationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Applications. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of Applications. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `Applications` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Applications` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `Applications` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Applications` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListApplications` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListApplications` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListApplications` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListApplications` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListApplicationsResponse.php b/AdsAdManager/src/V1/ListApplicationsResponse.php new file mode 100644 index 000000000000..78cec3199daf --- /dev/null +++ b/AdsAdManager/src/V1/ListApplicationsResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListApplicationsResponse + */ +class ListApplicationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Application` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Application applications = 1; + */ + private $applications; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `Application` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Application>|\Google\Protobuf\Internal\RepeatedField $applications + * The `Application` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `Application` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ApplicationService::initOnce(); + parent::__construct($data); + } + + /** + * The `Application` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Application applications = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getApplications() + { + return $this->applications; + } + + /** + * The `Application` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Application applications = 1; + * @param array<\Google\Ads\AdManager\V1\Application>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setApplications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Application::class); + $this->applications = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `Application` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Application` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListAudienceSegmentsRequest.php b/AdsAdManager/src/V1/ListAudienceSegmentsRequest.php new file mode 100644 index 000000000000..76542e3e7d28 --- /dev/null +++ b/AdsAdManager/src/V1/ListAudienceSegmentsRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListAudienceSegmentsRequest + */ +class ListAudienceSegmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent publisher network associated with these audience + * segments. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `AudienceSegments` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `AudienceSegments` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListAudienceSegments` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceSegments` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent publisher network associated with these audience + * segments. Format: `networks/{network_code}` + * Please see {@see AudienceSegmentServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListAudienceSegmentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent publisher network associated with these audience + * segments. Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `AudienceSegments` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `AudienceSegments` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListAudienceSegments` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceSegments` + * must match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AudienceSegmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent publisher network associated with these audience + * segments. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent publisher network associated with these audience + * segments. Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `AudienceSegments` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `AudienceSegments` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `AudienceSegments` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `AudienceSegments` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListAudienceSegments` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceSegments` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListAudienceSegments` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudienceSegments` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListAudienceSegmentsResponse.php b/AdsAdManager/src/V1/ListAudienceSegmentsResponse.php new file mode 100644 index 000000000000..ede103f7fd5f --- /dev/null +++ b/AdsAdManager/src/V1/ListAudienceSegmentsResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListAudienceSegmentsResponse + */ +class ListAudienceSegmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `AudienceSegment` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AudienceSegment audience_segments = 1; + */ + private $audience_segments; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `AudienceSegment` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\AudienceSegment>|\Google\Protobuf\Internal\RepeatedField $audience_segments + * The `AudienceSegment` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `AudienceSegment` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AudienceSegmentService::initOnce(); + parent::__construct($data); + } + + /** + * The `AudienceSegment` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AudienceSegment audience_segments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAudienceSegments() + { + return $this->audience_segments; + } + + /** + * The `AudienceSegment` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AudienceSegment audience_segments = 1; + * @param array<\Google\Ads\AdManager\V1\AudienceSegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAudienceSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AudienceSegment::class); + $this->audience_segments = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `AudienceSegment` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `AudienceSegment` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListBandwidthGroupsRequest.php b/AdsAdManager/src/V1/ListBandwidthGroupsRequest.php index c1fa162aedac..7558ac214e44 100644 --- a/AdsAdManager/src/V1/ListBandwidthGroupsRequest.php +++ b/AdsAdManager/src/V1/ListBandwidthGroupsRequest.php @@ -25,8 +25,8 @@ class ListBandwidthGroupsRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of `BandwidthGroups` to return. The service * may return fewer than this value. If unspecified, at most 50 - * `BandwidthGroups` will be returned. The maximum value is 1000; values above - * 1000 will be coerced to 1000. + * `BandwidthGroups` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -90,8 +90,8 @@ public static function build(string $parent): self * @type int $page_size * Optional. The maximum number of `BandwidthGroups` to return. The service * may return fewer than this value. If unspecified, at most 50 - * `BandwidthGroups` will be returned. The maximum value is 1000; values above - * 1000 will be coerced to 1000. + * `BandwidthGroups` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListBandwidthGroups` * call. Provide this to retrieve the subsequent page. @@ -145,8 +145,8 @@ public function setParent($var) /** * Optional. The maximum number of `BandwidthGroups` to return. The service * may return fewer than this value. If unspecified, at most 50 - * `BandwidthGroups` will be returned. The maximum value is 1000; values above - * 1000 will be coerced to 1000. + * `BandwidthGroups` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -159,8 +159,8 @@ public function getPageSize() /** * Optional. The maximum number of `BandwidthGroups` to return. The service * may return fewer than this value. If unspecified, at most 50 - * `BandwidthGroups` will be returned. The maximum value is 1000; values above - * 1000 will be coerced to 1000. + * `BandwidthGroups` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListBandwidthGroupsResponse.php b/AdsAdManager/src/V1/ListBandwidthGroupsResponse.php index 7141f871beed..e9c271e781f6 100644 --- a/AdsAdManager/src/V1/ListBandwidthGroupsResponse.php +++ b/AdsAdManager/src/V1/ListBandwidthGroupsResponse.php @@ -33,7 +33,7 @@ class ListBandwidthGroupsResponse extends \Google\Protobuf\Internal\Message * Total number of `BandwidthGroup` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListBandwidthGroupsResponse extends \Google\Protobuf\Internal\Message * Total number of `BandwidthGroup` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `BandwidthGroup` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `BandwidthGroup` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListBrowserLanguagesRequest.php b/AdsAdManager/src/V1/ListBrowserLanguagesRequest.php new file mode 100644 index 000000000000..eb0a1c17a674 --- /dev/null +++ b/AdsAdManager/src/V1/ListBrowserLanguagesRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListBrowserLanguagesRequest + */ +class ListBrowserLanguagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of BrowserLanguages. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `BrowserLanguages` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `BrowserLanguages` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListBrowserLanguages` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBrowserLanguages` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of BrowserLanguages. + * Format: `networks/{network_code}` + * Please see {@see BrowserLanguageServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListBrowserLanguagesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of BrowserLanguages. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `BrowserLanguages` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `BrowserLanguages` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListBrowserLanguages` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBrowserLanguages` + * must match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\BrowserLanguageService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of BrowserLanguages. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of BrowserLanguages. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `BrowserLanguages` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `BrowserLanguages` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `BrowserLanguages` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `BrowserLanguages` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListBrowserLanguages` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBrowserLanguages` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListBrowserLanguages` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBrowserLanguages` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListBrowserLanguagesResponse.php b/AdsAdManager/src/V1/ListBrowserLanguagesResponse.php new file mode 100644 index 000000000000..a6514d2b4dda --- /dev/null +++ b/AdsAdManager/src/V1/ListBrowserLanguagesResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListBrowserLanguagesResponse + */ +class ListBrowserLanguagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `BrowserLanguage` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.BrowserLanguage browser_languages = 1; + */ + private $browser_languages; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `BrowserLanguage` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\BrowserLanguage>|\Google\Protobuf\Internal\RepeatedField $browser_languages + * The `BrowserLanguage` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `BrowserLanguage` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\BrowserLanguageService::initOnce(); + parent::__construct($data); + } + + /** + * The `BrowserLanguage` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.BrowserLanguage browser_languages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBrowserLanguages() + { + return $this->browser_languages; + } + + /** + * The `BrowserLanguage` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.BrowserLanguage browser_languages = 1; + * @param array<\Google\Ads\AdManager\V1\BrowserLanguage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBrowserLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\BrowserLanguage::class); + $this->browser_languages = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `BrowserLanguage` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `BrowserLanguage` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListBrowsersRequest.php b/AdsAdManager/src/V1/ListBrowsersRequest.php new file mode 100644 index 000000000000..036eb4f1f05b --- /dev/null +++ b/AdsAdManager/src/V1/ListBrowsersRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListBrowsersRequest + */ +class ListBrowsersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Browsers. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Browsers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Browsers` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListBrowsers` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBrowsers` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of Browsers. + * Format: `networks/{network_code}` + * Please see {@see BrowserServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListBrowsersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of Browsers. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Browsers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Browsers` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListBrowsers` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBrowsers` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\BrowserService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Browsers. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of Browsers. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `Browsers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Browsers` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `Browsers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Browsers` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListBrowsers` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBrowsers` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListBrowsers` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBrowsers` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListBrowsersResponse.php b/AdsAdManager/src/V1/ListBrowsersResponse.php new file mode 100644 index 000000000000..98de4a70161f --- /dev/null +++ b/AdsAdManager/src/V1/ListBrowsersResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListBrowsersResponse + */ +class ListBrowsersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Browser` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Browser browsers = 1; + */ + private $browsers; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `Browser` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Browser>|\Google\Protobuf\Internal\RepeatedField $browsers + * The `Browser` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `Browser` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\BrowserService::initOnce(); + parent::__construct($data); + } + + /** + * The `Browser` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Browser browsers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBrowsers() + { + return $this->browsers; + } + + /** + * The `Browser` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Browser browsers = 1; + * @param array<\Google\Ads\AdManager\V1\Browser>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBrowsers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Browser::class); + $this->browsers = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `Browser` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Browser` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCmsMetadataKeysRequest.php b/AdsAdManager/src/V1/ListCmsMetadataKeysRequest.php new file mode 100644 index 000000000000..5651c4404a96 --- /dev/null +++ b/AdsAdManager/src/V1/ListCmsMetadataKeysRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListCmsMetadataKeysRequest + */ +class ListCmsMetadataKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of CmsMetadataKeys. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `CmsMetadataKeys` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataKeys` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListCmsMetadataKeys` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCmsMetadataKeys` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of CmsMetadataKeys. + * Format: `networks/{network_code}` + * Please see {@see CmsMetadataKeyServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListCmsMetadataKeysRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of CmsMetadataKeys. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `CmsMetadataKeys` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataKeys` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListCmsMetadataKeys` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCmsMetadataKeys` + * must match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CmsMetadataKeyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of CmsMetadataKeys. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of CmsMetadataKeys. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `CmsMetadataKeys` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataKeys` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `CmsMetadataKeys` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataKeys` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListCmsMetadataKeys` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCmsMetadataKeys` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListCmsMetadataKeys` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCmsMetadataKeys` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCmsMetadataKeysResponse.php b/AdsAdManager/src/V1/ListCmsMetadataKeysResponse.php new file mode 100644 index 000000000000..aab95dd57506 --- /dev/null +++ b/AdsAdManager/src/V1/ListCmsMetadataKeysResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListCmsMetadataKeysResponse + */ +class ListCmsMetadataKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `CmsMetadataKey` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CmsMetadataKey cms_metadata_keys = 1; + */ + private $cms_metadata_keys; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `CmsMetadataKey` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\CmsMetadataKey>|\Google\Protobuf\Internal\RepeatedField $cms_metadata_keys + * The `CmsMetadataKey` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `CmsMetadataKey` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CmsMetadataKeyService::initOnce(); + parent::__construct($data); + } + + /** + * The `CmsMetadataKey` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CmsMetadataKey cms_metadata_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCmsMetadataKeys() + { + return $this->cms_metadata_keys; + } + + /** + * The `CmsMetadataKey` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CmsMetadataKey cms_metadata_keys = 1; + * @param array<\Google\Ads\AdManager\V1\CmsMetadataKey>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCmsMetadataKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CmsMetadataKey::class); + $this->cms_metadata_keys = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `CmsMetadataKey` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `CmsMetadataKey` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCmsMetadataValuesRequest.php b/AdsAdManager/src/V1/ListCmsMetadataValuesRequest.php new file mode 100644 index 000000000000..81a7b235dd5d --- /dev/null +++ b/AdsAdManager/src/V1/ListCmsMetadataValuesRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListCmsMetadataValuesRequest + */ +class ListCmsMetadataValuesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of CmsMetadataValues. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `CmsMetadataValues` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataValues` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListCmsMetadataValues` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCmsMetadataValues` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of CmsMetadataValues. + * Format: `networks/{network_code}` + * Please see {@see CmsMetadataValueServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListCmsMetadataValuesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of CmsMetadataValues. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `CmsMetadataValues` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataValues` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListCmsMetadataValues` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCmsMetadataValues` + * must match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CmsMetadataValueService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of CmsMetadataValues. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of CmsMetadataValues. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `CmsMetadataValues` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataValues` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `CmsMetadataValues` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CmsMetadataValues` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListCmsMetadataValues` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCmsMetadataValues` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListCmsMetadataValues` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCmsMetadataValues` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCmsMetadataValuesResponse.php b/AdsAdManager/src/V1/ListCmsMetadataValuesResponse.php new file mode 100644 index 000000000000..772f9eb151e5 --- /dev/null +++ b/AdsAdManager/src/V1/ListCmsMetadataValuesResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListCmsMetadataValuesResponse + */ +class ListCmsMetadataValuesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `CmsMetadataValue` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CmsMetadataValue cms_metadata_values = 1; + */ + private $cms_metadata_values; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `CmsMetadataValue` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\CmsMetadataValue>|\Google\Protobuf\Internal\RepeatedField $cms_metadata_values + * The `CmsMetadataValue` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `CmsMetadataValue` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CmsMetadataValueService::initOnce(); + parent::__construct($data); + } + + /** + * The `CmsMetadataValue` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CmsMetadataValue cms_metadata_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCmsMetadataValues() + { + return $this->cms_metadata_values; + } + + /** + * The `CmsMetadataValue` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CmsMetadataValue cms_metadata_values = 1; + * @param array<\Google\Ads\AdManager\V1\CmsMetadataValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCmsMetadataValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CmsMetadataValue::class); + $this->cms_metadata_values = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `CmsMetadataValue` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `CmsMetadataValue` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCompaniesRequest.php b/AdsAdManager/src/V1/ListCompaniesRequest.php index 92854e1e909c..c3b776eef434 100644 --- a/AdsAdManager/src/V1/ListCompaniesRequest.php +++ b/AdsAdManager/src/V1/ListCompaniesRequest.php @@ -25,8 +25,8 @@ class ListCompaniesRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of `Companies` to return. The service may * return fewer than this value. If unspecified, at most 50 `Companies` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -90,8 +90,8 @@ public static function build(string $parent): self * @type int $page_size * Optional. The maximum number of `Companies` to return. The service may * return fewer than this value. If unspecified, at most 50 `Companies` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListCompanies` call. * Provide this to retrieve the subsequent page. @@ -145,8 +145,8 @@ public function setParent($var) /** * Optional. The maximum number of `Companies` to return. The service may * return fewer than this value. If unspecified, at most 50 `Companies` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -159,8 +159,8 @@ public function getPageSize() /** * Optional. The maximum number of `Companies` to return. The service may * return fewer than this value. If unspecified, at most 50 `Companies` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListCompaniesResponse.php b/AdsAdManager/src/V1/ListCompaniesResponse.php index 2dc511fcdc1e..69a940f8970d 100644 --- a/AdsAdManager/src/V1/ListCompaniesResponse.php +++ b/AdsAdManager/src/V1/ListCompaniesResponse.php @@ -33,7 +33,7 @@ class ListCompaniesResponse extends \Google\Protobuf\Internal\Message * Total number of `Company` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListCompaniesResponse extends \Google\Protobuf\Internal\Message * Total number of `Company` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `Company` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `Company` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListContactsRequest.php b/AdsAdManager/src/V1/ListContactsRequest.php new file mode 100644 index 000000000000..6300afa50222 --- /dev/null +++ b/AdsAdManager/src/V1/ListContactsRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListContactsRequest + */ +class ListContactsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Contacts. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Contacts` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Contacts` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListContacts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContacts` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of Contacts. + * Format: `networks/{network_code}` + * Please see {@see ContactServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListContactsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of Contacts. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Contacts` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Contacts` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListContacts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContacts` must match + * the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Contacts. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of Contacts. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `Contacts` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Contacts` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `Contacts` to return. The service may + * return fewer than this value. If unspecified, at most 50 `Contacts` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListContacts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContacts` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListContacts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContacts` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListContactsResponse.php b/AdsAdManager/src/V1/ListContactsResponse.php new file mode 100644 index 000000000000..eb92fbf0369c --- /dev/null +++ b/AdsAdManager/src/V1/ListContactsResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListContactsResponse + */ +class ListContactsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Contact` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Contact contacts = 1; + */ + private $contacts; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `Contact` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $contacts + * The `Contact` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `Contact` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactService::initOnce(); + parent::__construct($data); + } + + /** + * The `Contact` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Contact contacts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContacts() + { + return $this->contacts; + } + + /** + * The `Contact` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Contact contacts = 1; + * @param array<\Google\Ads\AdManager\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Contact::class); + $this->contacts = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `Contact` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Contact` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListContentBundlesRequest.php b/AdsAdManager/src/V1/ListContentBundlesRequest.php new file mode 100644 index 000000000000..8c4587a3285d --- /dev/null +++ b/AdsAdManager/src/V1/ListContentBundlesRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListContentBundlesRequest + */ +class ListContentBundlesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of ContentBundles. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `ContentBundles` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentBundles` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListContentBundles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContentBundles` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of ContentBundles. + * Format: `networks/{network_code}` + * Please see {@see ContentBundleServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListContentBundlesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of ContentBundles. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `ContentBundles` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentBundles` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListContentBundles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContentBundles` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentBundleService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of ContentBundles. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of ContentBundles. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `ContentBundles` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentBundles` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `ContentBundles` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentBundles` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListContentBundles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContentBundles` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListContentBundles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContentBundles` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListContentBundlesResponse.php b/AdsAdManager/src/V1/ListContentBundlesResponse.php new file mode 100644 index 000000000000..5c641394874b --- /dev/null +++ b/AdsAdManager/src/V1/ListContentBundlesResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListContentBundlesResponse + */ +class ListContentBundlesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `ContentBundle` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ContentBundle content_bundles = 1; + */ + private $content_bundles; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `ContentBundle` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\ContentBundle>|\Google\Protobuf\Internal\RepeatedField $content_bundles + * The `ContentBundle` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `ContentBundle` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentBundleService::initOnce(); + parent::__construct($data); + } + + /** + * The `ContentBundle` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ContentBundle content_bundles = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContentBundles() + { + return $this->content_bundles; + } + + /** + * The `ContentBundle` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ContentBundle content_bundles = 1; + * @param array<\Google\Ads\AdManager\V1\ContentBundle>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContentBundles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ContentBundle::class); + $this->content_bundles = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `ContentBundle` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `ContentBundle` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListContentLabelsRequest.php b/AdsAdManager/src/V1/ListContentLabelsRequest.php new file mode 100644 index 000000000000..663c18d1e117 --- /dev/null +++ b/AdsAdManager/src/V1/ListContentLabelsRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListContentLabelsRequest + */ +class ListContentLabelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of ContentLabels. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `ContentLabels` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentLabels` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListContentLabels` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContentLabels` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of ContentLabels. + * Format: `networks/{network_code}` + * Please see {@see ContentLabelServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListContentLabelsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of ContentLabels. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `ContentLabels` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentLabels` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListContentLabels` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContentLabels` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentLabelService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of ContentLabels. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of ContentLabels. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `ContentLabels` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentLabels` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `ContentLabels` to return. The service may + * return fewer than this value. If unspecified, at most 50 `ContentLabels` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListContentLabels` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContentLabels` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListContentLabels` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContentLabels` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListContentLabelsResponse.php b/AdsAdManager/src/V1/ListContentLabelsResponse.php new file mode 100644 index 000000000000..5cdee14a06c7 --- /dev/null +++ b/AdsAdManager/src/V1/ListContentLabelsResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListContentLabelsResponse + */ +class ListContentLabelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `ContentLabel` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ContentLabel content_labels = 1; + */ + private $content_labels; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `ContentLabel` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\ContentLabel>|\Google\Protobuf\Internal\RepeatedField $content_labels + * The `ContentLabel` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `ContentLabel` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentLabelService::initOnce(); + parent::__construct($data); + } + + /** + * The `ContentLabel` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ContentLabel content_labels = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContentLabels() + { + return $this->content_labels; + } + + /** + * The `ContentLabel` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ContentLabel content_labels = 1; + * @param array<\Google\Ads\AdManager\V1\ContentLabel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContentLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ContentLabel::class); + $this->content_labels = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `ContentLabel` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `ContentLabel` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListContentRequest.php b/AdsAdManager/src/V1/ListContentRequest.php new file mode 100644 index 000000000000..faf057e29f9f --- /dev/null +++ b/AdsAdManager/src/V1/ListContentRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListContentRequest + */ +class ListContentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Content. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Content` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Content` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListContent` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContent` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of Content. + * Format: `networks/{network_code}` + * Please see {@see ContentServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListContentRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of Content. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Content` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Content` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListContent` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContent` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Content. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of Content. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `Content` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Content` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `Content` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Content` will be + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListContent` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContent` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListContent` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListContent` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListContentResponse.php b/AdsAdManager/src/V1/ListContentResponse.php new file mode 100644 index 000000000000..78259996b02d --- /dev/null +++ b/AdsAdManager/src/V1/ListContentResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListContentResponse + */ +class ListContentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Content` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Content content = 1; + */ + private $content; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `Content` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Content>|\Google\Protobuf\Internal\RepeatedField $content + * The `Content` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `Content` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContentService::initOnce(); + parent::__construct($data); + } + + /** + * The `Content` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Content content = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContent() + { + return $this->content; + } + + /** + * The `Content` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Content content = 1; + * @param array<\Google\Ads\AdManager\V1\Content>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContent($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Content::class); + $this->content = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `Content` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Content` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCreativeTemplatesRequest.php b/AdsAdManager/src/V1/ListCreativeTemplatesRequest.php new file mode 100644 index 000000000000..aa66046f623c --- /dev/null +++ b/AdsAdManager/src/V1/ListCreativeTemplatesRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListCreativeTemplatesRequest + */ +class ListCreativeTemplatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of CreativeTemplates. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `CreativeTemplates` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CreativeTemplates` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListCreativeTemplates` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCreativeTemplates` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of CreativeTemplates. + * Format: `networks/{network_code}` + * Please see {@see CreativeTemplateServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListCreativeTemplatesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of CreativeTemplates. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `CreativeTemplates` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CreativeTemplates` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListCreativeTemplates` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCreativeTemplates` + * must match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of CreativeTemplates. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of CreativeTemplates. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `CreativeTemplates` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CreativeTemplates` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `CreativeTemplates` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `CreativeTemplates` will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListCreativeTemplates` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCreativeTemplates` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListCreativeTemplates` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCreativeTemplates` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCreativeTemplatesResponse.php b/AdsAdManager/src/V1/ListCreativeTemplatesResponse.php new file mode 100644 index 000000000000..7730360aad64 --- /dev/null +++ b/AdsAdManager/src/V1/ListCreativeTemplatesResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListCreativeTemplatesResponse + */ +class ListCreativeTemplatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `CreativeTemplate` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplate creative_templates = 1; + */ + private $creative_templates; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `CreativeTemplate` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\CreativeTemplate>|\Google\Protobuf\Internal\RepeatedField $creative_templates + * The `CreativeTemplate` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `CreativeTemplate` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTemplateService::initOnce(); + parent::__construct($data); + } + + /** + * The `CreativeTemplate` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplate creative_templates = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCreativeTemplates() + { + return $this->creative_templates; + } + + /** + * The `CreativeTemplate` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTemplate creative_templates = 1; + * @param array<\Google\Ads\AdManager\V1\CreativeTemplate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCreativeTemplates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreativeTemplate::class); + $this->creative_templates = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `CreativeTemplate` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `CreativeTemplate` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCustomFieldsRequest.php b/AdsAdManager/src/V1/ListCustomFieldsRequest.php index 503b26124a12..24f40056566b 100644 --- a/AdsAdManager/src/V1/ListCustomFieldsRequest.php +++ b/AdsAdManager/src/V1/ListCustomFieldsRequest.php @@ -25,8 +25,8 @@ class ListCustomFieldsRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of `CustomFields` to return. The service may * return fewer than this value. If unspecified, at most 50 `CustomFields` - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -90,8 +90,8 @@ public static function build(string $parent): self * @type int $page_size * Optional. The maximum number of `CustomFields` to return. The service may * return fewer than this value. If unspecified, at most 50 `CustomFields` - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListCustomFields` call. * Provide this to retrieve the subsequent page. @@ -145,8 +145,8 @@ public function setParent($var) /** * Optional. The maximum number of `CustomFields` to return. The service may * return fewer than this value. If unspecified, at most 50 `CustomFields` - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -159,8 +159,8 @@ public function getPageSize() /** * Optional. The maximum number of `CustomFields` to return. The service may * return fewer than this value. If unspecified, at most 50 `CustomFields` - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListCustomFieldsResponse.php b/AdsAdManager/src/V1/ListCustomFieldsResponse.php index 0309c4dbb01a..8ec896f118f9 100644 --- a/AdsAdManager/src/V1/ListCustomFieldsResponse.php +++ b/AdsAdManager/src/V1/ListCustomFieldsResponse.php @@ -33,7 +33,7 @@ class ListCustomFieldsResponse extends \Google\Protobuf\Internal\Message * Total number of `CustomField` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListCustomFieldsResponse extends \Google\Protobuf\Internal\Message * Total number of `CustomField` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `CustomField` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `CustomField` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListCustomTargetingKeysResponse.php b/AdsAdManager/src/V1/ListCustomTargetingKeysResponse.php index 891f1e3aff20..9f478cfee346 100644 --- a/AdsAdManager/src/V1/ListCustomTargetingKeysResponse.php +++ b/AdsAdManager/src/V1/ListCustomTargetingKeysResponse.php @@ -33,7 +33,7 @@ class ListCustomTargetingKeysResponse extends \Google\Protobuf\Internal\Message * Total number of `CustomTargetingKey` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListCustomTargetingKeysResponse extends \Google\Protobuf\Internal\Message * Total number of `CustomTargetingKey` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `CustomTargetingKey` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `CustomTargetingKey` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListCustomTargetingValuesResponse.php b/AdsAdManager/src/V1/ListCustomTargetingValuesResponse.php index e1711c0af28f..34765904f69e 100644 --- a/AdsAdManager/src/V1/ListCustomTargetingValuesResponse.php +++ b/AdsAdManager/src/V1/ListCustomTargetingValuesResponse.php @@ -33,7 +33,7 @@ class ListCustomTargetingValuesResponse extends \Google\Protobuf\Internal\Messag * Total number of `CustomTargetingValue` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListCustomTargetingValuesResponse extends \Google\Protobuf\Internal\Messag * Total number of `CustomTargetingValue` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `CustomTargetingValue` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `CustomTargetingValue` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListDeviceCapabilitiesRequest.php b/AdsAdManager/src/V1/ListDeviceCapabilitiesRequest.php new file mode 100644 index 000000000000..a720626287cd --- /dev/null +++ b/AdsAdManager/src/V1/ListDeviceCapabilitiesRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListDeviceCapabilitiesRequest + */ +class ListDeviceCapabilitiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of DeviceCapabilities. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `DeviceCapabilities` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `DeviceCapabilities` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListDeviceCapabilities` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeviceCapabilities` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of DeviceCapabilities. + * Format: `networks/{network_code}` + * Please see {@see DeviceCapabilityServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListDeviceCapabilitiesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of DeviceCapabilities. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `DeviceCapabilities` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `DeviceCapabilities` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListDeviceCapabilities` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeviceCapabilities` + * must match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\DeviceCapabilityService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of DeviceCapabilities. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of DeviceCapabilities. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `DeviceCapabilities` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `DeviceCapabilities` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `DeviceCapabilities` to return. The service + * may return fewer than this value. If unspecified, at most 50 + * `DeviceCapabilities` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListDeviceCapabilities` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeviceCapabilities` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListDeviceCapabilities` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeviceCapabilities` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListDeviceCapabilitiesResponse.php b/AdsAdManager/src/V1/ListDeviceCapabilitiesResponse.php new file mode 100644 index 000000000000..1e5c3d26cce4 --- /dev/null +++ b/AdsAdManager/src/V1/ListDeviceCapabilitiesResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListDeviceCapabilitiesResponse + */ +class ListDeviceCapabilitiesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `DeviceCapability` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.DeviceCapability device_capabilities = 1; + */ + private $device_capabilities; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `DeviceCapability` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\DeviceCapability>|\Google\Protobuf\Internal\RepeatedField $device_capabilities + * The `DeviceCapability` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `DeviceCapability` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\DeviceCapabilityService::initOnce(); + parent::__construct($data); + } + + /** + * The `DeviceCapability` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.DeviceCapability device_capabilities = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeviceCapabilities() + { + return $this->device_capabilities; + } + + /** + * The `DeviceCapability` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.DeviceCapability device_capabilities = 1; + * @param array<\Google\Ads\AdManager\V1\DeviceCapability>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeviceCapabilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\DeviceCapability::class); + $this->device_capabilities = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `DeviceCapability` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `DeviceCapability` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListDeviceCategoriesRequest.php b/AdsAdManager/src/V1/ListDeviceCategoriesRequest.php index 4a2e85e64690..6489d950b751 100644 --- a/AdsAdManager/src/V1/ListDeviceCategoriesRequest.php +++ b/AdsAdManager/src/V1/ListDeviceCategoriesRequest.php @@ -26,7 +26,7 @@ class ListDeviceCategoriesRequest extends \Google\Protobuf\Internal\Message * Optional. The maximum number of `DeviceCategories` to return. The service * may return fewer than this value. If unspecified, at most 50 * `DeviceCategories` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -91,7 +91,7 @@ public static function build(string $parent): self * Optional. The maximum number of `DeviceCategories` to return. The service * may return fewer than this value. If unspecified, at most 50 * `DeviceCategories` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListDeviceCategories` * call. Provide this to retrieve the subsequent page. @@ -146,7 +146,7 @@ public function setParent($var) * Optional. The maximum number of `DeviceCategories` to return. The service * may return fewer than this value. If unspecified, at most 50 * `DeviceCategories` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -160,7 +160,7 @@ public function getPageSize() * Optional. The maximum number of `DeviceCategories` to return. The service * may return fewer than this value. If unspecified, at most 50 * `DeviceCategories` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListDeviceCategoriesResponse.php b/AdsAdManager/src/V1/ListDeviceCategoriesResponse.php index 4126f254c2f1..535a42efdd64 100644 --- a/AdsAdManager/src/V1/ListDeviceCategoriesResponse.php +++ b/AdsAdManager/src/V1/ListDeviceCategoriesResponse.php @@ -33,7 +33,7 @@ class ListDeviceCategoriesResponse extends \Google\Protobuf\Internal\Message * Total number of `DeviceCategory` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListDeviceCategoriesResponse extends \Google\Protobuf\Internal\Message * Total number of `DeviceCategory` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `DeviceCategory` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `DeviceCategory` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListDeviceManufacturersRequest.php b/AdsAdManager/src/V1/ListDeviceManufacturersRequest.php new file mode 100644 index 000000000000..a0f8efe1cd0e --- /dev/null +++ b/AdsAdManager/src/V1/ListDeviceManufacturersRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListDeviceManufacturersRequest + */ +class ListDeviceManufacturersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of DeviceManufacturers. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `DeviceManufacturers` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `DeviceManufacturers` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListDeviceManufacturers` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeviceManufacturers` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of DeviceManufacturers. + * Format: `networks/{network_code}` + * Please see {@see DeviceManufacturerServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListDeviceManufacturersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of DeviceManufacturers. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `DeviceManufacturers` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `DeviceManufacturers` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListDeviceManufacturers` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeviceManufacturers` + * must match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\DeviceManufacturerService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of DeviceManufacturers. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of DeviceManufacturers. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `DeviceManufacturers` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `DeviceManufacturers` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `DeviceManufacturers` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `DeviceManufacturers` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListDeviceManufacturers` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeviceManufacturers` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListDeviceManufacturers` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeviceManufacturers` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListDeviceManufacturersResponse.php b/AdsAdManager/src/V1/ListDeviceManufacturersResponse.php new file mode 100644 index 000000000000..45d41aa9bcb7 --- /dev/null +++ b/AdsAdManager/src/V1/ListDeviceManufacturersResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListDeviceManufacturersResponse + */ +class ListDeviceManufacturersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `DeviceManufacturer` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.DeviceManufacturer device_manufacturers = 1; + */ + private $device_manufacturers; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `DeviceManufacturer` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\DeviceManufacturer>|\Google\Protobuf\Internal\RepeatedField $device_manufacturers + * The `DeviceManufacturer` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `DeviceManufacturer` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\DeviceManufacturerService::initOnce(); + parent::__construct($data); + } + + /** + * The `DeviceManufacturer` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.DeviceManufacturer device_manufacturers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeviceManufacturers() + { + return $this->device_manufacturers; + } + + /** + * The `DeviceManufacturer` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.DeviceManufacturer device_manufacturers = 1; + * @param array<\Google\Ads\AdManager\V1\DeviceManufacturer>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeviceManufacturers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\DeviceManufacturer::class); + $this->device_manufacturers = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `DeviceManufacturer` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `DeviceManufacturer` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListEntitySignalsMappingsResponse.php b/AdsAdManager/src/V1/ListEntitySignalsMappingsResponse.php index 9cd5bb39eea0..e634bf1af866 100644 --- a/AdsAdManager/src/V1/ListEntitySignalsMappingsResponse.php +++ b/AdsAdManager/src/V1/ListEntitySignalsMappingsResponse.php @@ -33,7 +33,7 @@ class ListEntitySignalsMappingsResponse extends \Google\Protobuf\Internal\Messag * Total number of `EntitySignalsMappings`. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListEntitySignalsMappingsResponse extends \Google\Protobuf\Internal\Messag * Total number of `EntitySignalsMappings`. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `EntitySignalsMappings`. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `EntitySignalsMappings`. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListGeoTargetsRequest.php b/AdsAdManager/src/V1/ListGeoTargetsRequest.php index 2123e1f8c21e..ee35713eaa03 100644 --- a/AdsAdManager/src/V1/ListGeoTargetsRequest.php +++ b/AdsAdManager/src/V1/ListGeoTargetsRequest.php @@ -25,8 +25,8 @@ class ListGeoTargetsRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of `GeoTargets` to return. The service may * return fewer than this value. If unspecified, at most 50 `GeoTargets` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -90,8 +90,8 @@ public static function build(string $parent): self * @type int $page_size * Optional. The maximum number of `GeoTargets` to return. The service may * return fewer than this value. If unspecified, at most 50 `GeoTargets` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListGeoTargets` call. * Provide this to retrieve the subsequent page. @@ -145,8 +145,8 @@ public function setParent($var) /** * Optional. The maximum number of `GeoTargets` to return. The service may * return fewer than this value. If unspecified, at most 50 `GeoTargets` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -159,8 +159,8 @@ public function getPageSize() /** * Optional. The maximum number of `GeoTargets` to return. The service may * return fewer than this value. If unspecified, at most 50 `GeoTargets` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListGeoTargetsResponse.php b/AdsAdManager/src/V1/ListGeoTargetsResponse.php index bf751770209e..ad738b31f5bf 100644 --- a/AdsAdManager/src/V1/ListGeoTargetsResponse.php +++ b/AdsAdManager/src/V1/ListGeoTargetsResponse.php @@ -33,7 +33,7 @@ class ListGeoTargetsResponse extends \Google\Protobuf\Internal\Message * Total number of `GeoTarget` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListGeoTargetsResponse extends \Google\Protobuf\Internal\Message * Total number of `GeoTarget` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `GeoTarget` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `GeoTarget` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListMobileCarriersRequest.php b/AdsAdManager/src/V1/ListMobileCarriersRequest.php new file mode 100644 index 000000000000..1471aee51a1d --- /dev/null +++ b/AdsAdManager/src/V1/ListMobileCarriersRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListMobileCarriersRequest + */ +class ListMobileCarriersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of MobileCarriers. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `MobileCarriers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileCarriers` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListMobileCarriers` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMobileCarriers` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of MobileCarriers. + * Format: `networks/{network_code}` + * Please see {@see MobileCarrierServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListMobileCarriersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of MobileCarriers. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `MobileCarriers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileCarriers` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListMobileCarriers` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMobileCarriers` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileCarrierService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of MobileCarriers. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of MobileCarriers. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `MobileCarriers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileCarriers` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `MobileCarriers` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileCarriers` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListMobileCarriers` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMobileCarriers` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListMobileCarriers` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMobileCarriers` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListMobileCarriersResponse.php b/AdsAdManager/src/V1/ListMobileCarriersResponse.php new file mode 100644 index 000000000000..fbc4f3851a55 --- /dev/null +++ b/AdsAdManager/src/V1/ListMobileCarriersResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListMobileCarriersResponse + */ +class ListMobileCarriersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `MobileCarrier` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.MobileCarrier mobile_carriers = 1; + */ + private $mobile_carriers; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `MobileCarrier` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\MobileCarrier>|\Google\Protobuf\Internal\RepeatedField $mobile_carriers + * The `MobileCarrier` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `MobileCarrier` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileCarrierService::initOnce(); + parent::__construct($data); + } + + /** + * The `MobileCarrier` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.MobileCarrier mobile_carriers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMobileCarriers() + { + return $this->mobile_carriers; + } + + /** + * The `MobileCarrier` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.MobileCarrier mobile_carriers = 1; + * @param array<\Google\Ads\AdManager\V1\MobileCarrier>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMobileCarriers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\MobileCarrier::class); + $this->mobile_carriers = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `MobileCarrier` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `MobileCarrier` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListMobileDeviceSubmodelsRequest.php b/AdsAdManager/src/V1/ListMobileDeviceSubmodelsRequest.php new file mode 100644 index 000000000000..02f07bcf3f4c --- /dev/null +++ b/AdsAdManager/src/V1/ListMobileDeviceSubmodelsRequest.php @@ -0,0 +1,304 @@ +google.ads.admanager.v1.ListMobileDeviceSubmodelsRequest + */ +class ListMobileDeviceSubmodelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of MobileDeviceSubmodels. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `MobileDeviceSubmodels` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `MobileDeviceSubmodels` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous + * `ListMobileDeviceSubmodels` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListMobileDeviceSubmodels` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of MobileDeviceSubmodels. + * Format: `networks/{network_code}` + * Please see {@see MobileDeviceSubmodelServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListMobileDeviceSubmodelsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of MobileDeviceSubmodels. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `MobileDeviceSubmodels` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `MobileDeviceSubmodels` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous + * `ListMobileDeviceSubmodels` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListMobileDeviceSubmodels` must match the call that provided the page + * token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileDeviceSubmodelService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of MobileDeviceSubmodels. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of MobileDeviceSubmodels. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `MobileDeviceSubmodels` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `MobileDeviceSubmodels` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `MobileDeviceSubmodels` to return. The + * service may return fewer than this value. If unspecified, at most 50 + * `MobileDeviceSubmodels` will be returned. The maximum value is 1000; values + * above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous + * `ListMobileDeviceSubmodels` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListMobileDeviceSubmodels` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous + * `ListMobileDeviceSubmodels` call. Provide this to retrieve the subsequent + * page. + * When paginating, all other parameters provided to + * `ListMobileDeviceSubmodels` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListMobileDeviceSubmodelsResponse.php b/AdsAdManager/src/V1/ListMobileDeviceSubmodelsResponse.php new file mode 100644 index 000000000000..bfa8f32ccead --- /dev/null +++ b/AdsAdManager/src/V1/ListMobileDeviceSubmodelsResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListMobileDeviceSubmodelsResponse + */ +class ListMobileDeviceSubmodelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `MobileDeviceSubmodel` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.MobileDeviceSubmodel mobile_device_submodels = 1; + */ + private $mobile_device_submodels; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `MobileDeviceSubmodel` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\MobileDeviceSubmodel>|\Google\Protobuf\Internal\RepeatedField $mobile_device_submodels + * The `MobileDeviceSubmodel` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `MobileDeviceSubmodel` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileDeviceSubmodelService::initOnce(); + parent::__construct($data); + } + + /** + * The `MobileDeviceSubmodel` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.MobileDeviceSubmodel mobile_device_submodels = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMobileDeviceSubmodels() + { + return $this->mobile_device_submodels; + } + + /** + * The `MobileDeviceSubmodel` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.MobileDeviceSubmodel mobile_device_submodels = 1; + * @param array<\Google\Ads\AdManager\V1\MobileDeviceSubmodel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMobileDeviceSubmodels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\MobileDeviceSubmodel::class); + $this->mobile_device_submodels = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `MobileDeviceSubmodel` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `MobileDeviceSubmodel` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListMobileDevicesRequest.php b/AdsAdManager/src/V1/ListMobileDevicesRequest.php new file mode 100644 index 000000000000..45b107b1bf08 --- /dev/null +++ b/AdsAdManager/src/V1/ListMobileDevicesRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListMobileDevicesRequest + */ +class ListMobileDevicesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of MobileDevices. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `MobileDevices` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileDevices` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListMobileDevices` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMobileDevices` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of MobileDevices. + * Format: `networks/{network_code}` + * Please see {@see MobileDeviceServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListMobileDevicesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of MobileDevices. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `MobileDevices` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileDevices` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListMobileDevices` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMobileDevices` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileDeviceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of MobileDevices. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of MobileDevices. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `MobileDevices` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileDevices` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `MobileDevices` to return. The service may + * return fewer than this value. If unspecified, at most 50 `MobileDevices` + * will be returned. The maximum value is 1000; values greater than 1000 will + * be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListMobileDevices` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMobileDevices` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListMobileDevices` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMobileDevices` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListMobileDevicesResponse.php b/AdsAdManager/src/V1/ListMobileDevicesResponse.php new file mode 100644 index 000000000000..308102cb3ebe --- /dev/null +++ b/AdsAdManager/src/V1/ListMobileDevicesResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListMobileDevicesResponse + */ +class ListMobileDevicesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `MobileDevice` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.MobileDevice mobile_devices = 1; + */ + private $mobile_devices; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `MobileDevice` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\MobileDevice>|\Google\Protobuf\Internal\RepeatedField $mobile_devices + * The `MobileDevice` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `MobileDevice` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileDeviceService::initOnce(); + parent::__construct($data); + } + + /** + * The `MobileDevice` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.MobileDevice mobile_devices = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMobileDevices() + { + return $this->mobile_devices; + } + + /** + * The `MobileDevice` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.MobileDevice mobile_devices = 1; + * @param array<\Google\Ads\AdManager\V1\MobileDevice>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMobileDevices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\MobileDevice::class); + $this->mobile_devices = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `MobileDevice` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `MobileDevice` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListOperatingSystemVersionsRequest.php b/AdsAdManager/src/V1/ListOperatingSystemVersionsRequest.php index ae13815ccdf2..79c4603bed4e 100644 --- a/AdsAdManager/src/V1/ListOperatingSystemVersionsRequest.php +++ b/AdsAdManager/src/V1/ListOperatingSystemVersionsRequest.php @@ -26,7 +26,7 @@ class ListOperatingSystemVersionsRequest extends \Google\Protobuf\Internal\Messa * Optional. The maximum number of `OperatingSystemVersions` to return. The * service may return fewer than this value. If unspecified, at most 50 * `OperatingSystemVersions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -93,7 +93,7 @@ public static function build(string $parent): self * Optional. The maximum number of `OperatingSystemVersions` to return. The * service may return fewer than this value. If unspecified, at most 50 * `OperatingSystemVersions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous * `ListOperatingSystemVersions` call. Provide this to retrieve the subsequent @@ -150,7 +150,7 @@ public function setParent($var) * Optional. The maximum number of `OperatingSystemVersions` to return. The * service may return fewer than this value. If unspecified, at most 50 * `OperatingSystemVersions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -164,7 +164,7 @@ public function getPageSize() * Optional. The maximum number of `OperatingSystemVersions` to return. The * service may return fewer than this value. If unspecified, at most 50 * `OperatingSystemVersions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListOperatingSystemVersionsResponse.php b/AdsAdManager/src/V1/ListOperatingSystemVersionsResponse.php index 3ae54b5f2013..34daa1fe6128 100644 --- a/AdsAdManager/src/V1/ListOperatingSystemVersionsResponse.php +++ b/AdsAdManager/src/V1/ListOperatingSystemVersionsResponse.php @@ -33,7 +33,7 @@ class ListOperatingSystemVersionsResponse extends \Google\Protobuf\Internal\Mess * Total number of `OperatingSystemVersion` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListOperatingSystemVersionsResponse extends \Google\Protobuf\Internal\Mess * Total number of `OperatingSystemVersion` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `OperatingSystemVersion` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `OperatingSystemVersion` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListOperatingSystemsRequest.php b/AdsAdManager/src/V1/ListOperatingSystemsRequest.php index 5efe8a5c6019..24e2509af4e9 100644 --- a/AdsAdManager/src/V1/ListOperatingSystemsRequest.php +++ b/AdsAdManager/src/V1/ListOperatingSystemsRequest.php @@ -26,7 +26,7 @@ class ListOperatingSystemsRequest extends \Google\Protobuf\Internal\Message * Optional. The maximum number of `OperatingSystems` to return. The service * may return fewer than this value. If unspecified, at most 50 * `OperatingSystems` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -91,7 +91,7 @@ public static function build(string $parent): self * Optional. The maximum number of `OperatingSystems` to return. The service * may return fewer than this value. If unspecified, at most 50 * `OperatingSystems` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListOperatingSystems` * call. Provide this to retrieve the subsequent page. @@ -146,7 +146,7 @@ public function setParent($var) * Optional. The maximum number of `OperatingSystems` to return. The service * may return fewer than this value. If unspecified, at most 50 * `OperatingSystems` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -160,7 +160,7 @@ public function getPageSize() * Optional. The maximum number of `OperatingSystems` to return. The service * may return fewer than this value. If unspecified, at most 50 * `OperatingSystems` will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. + * greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListOperatingSystemsResponse.php b/AdsAdManager/src/V1/ListOperatingSystemsResponse.php index 19463b3aab0f..9e5a3456c49a 100644 --- a/AdsAdManager/src/V1/ListOperatingSystemsResponse.php +++ b/AdsAdManager/src/V1/ListOperatingSystemsResponse.php @@ -33,7 +33,7 @@ class ListOperatingSystemsResponse extends \Google\Protobuf\Internal\Message * Total number of `OperatingSystem` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListOperatingSystemsResponse extends \Google\Protobuf\Internal\Message * Total number of `OperatingSystem` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `OperatingSystem` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `OperatingSystem` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListOrdersRequest.php b/AdsAdManager/src/V1/ListOrdersRequest.php index 3aad5cd01b81..be867d697fcc 100644 --- a/AdsAdManager/src/V1/ListOrdersRequest.php +++ b/AdsAdManager/src/V1/ListOrdersRequest.php @@ -25,8 +25,8 @@ class ListOrdersRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of `Orders` to return. The service may return * fewer than this value. If unspecified, at most 50 `Orders` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -90,8 +90,8 @@ public static function build(string $parent): self * @type int $page_size * Optional. The maximum number of `Orders` to return. The service may return * fewer than this value. If unspecified, at most 50 `Orders` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListOrders` call. * Provide this to retrieve the subsequent page. @@ -145,8 +145,8 @@ public function setParent($var) /** * Optional. The maximum number of `Orders` to return. The service may return * fewer than this value. If unspecified, at most 50 `Orders` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -159,8 +159,8 @@ public function getPageSize() /** * Optional. The maximum number of `Orders` to return. The service may return * fewer than this value. If unspecified, at most 50 `Orders` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListOrdersResponse.php b/AdsAdManager/src/V1/ListOrdersResponse.php index d8f3a73eeeee..02cb3bda5914 100644 --- a/AdsAdManager/src/V1/ListOrdersResponse.php +++ b/AdsAdManager/src/V1/ListOrdersResponse.php @@ -33,7 +33,7 @@ class ListOrdersResponse extends \Google\Protobuf\Internal\Message * Total number of `Orders`. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListOrdersResponse extends \Google\Protobuf\Internal\Message * Total number of `Orders`. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `Orders`. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `Orders`. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListPlacementsRequest.php b/AdsAdManager/src/V1/ListPlacementsRequest.php index 0c728e44c3de..99ed2b60ebb7 100644 --- a/AdsAdManager/src/V1/ListPlacementsRequest.php +++ b/AdsAdManager/src/V1/ListPlacementsRequest.php @@ -25,8 +25,8 @@ class ListPlacementsRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of `Placements` to return. The service may * return fewer than this value. If unspecified, at most 50 `Placements` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -90,8 +90,8 @@ public static function build(string $parent): self * @type int $page_size * Optional. The maximum number of `Placements` to return. The service may * return fewer than this value. If unspecified, at most 50 `Placements` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListPlacements` call. * Provide this to retrieve the subsequent page. @@ -145,8 +145,8 @@ public function setParent($var) /** * Optional. The maximum number of `Placements` to return. The service may * return fewer than this value. If unspecified, at most 50 `Placements` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -159,8 +159,8 @@ public function getPageSize() /** * Optional. The maximum number of `Placements` to return. The service may * return fewer than this value. If unspecified, at most 50 `Placements` will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. + * be returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListPlacementsResponse.php b/AdsAdManager/src/V1/ListPlacementsResponse.php index 0d509198484e..33ead5a228c9 100644 --- a/AdsAdManager/src/V1/ListPlacementsResponse.php +++ b/AdsAdManager/src/V1/ListPlacementsResponse.php @@ -33,7 +33,7 @@ class ListPlacementsResponse extends \Google\Protobuf\Internal\Message * Total number of `Placement` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListPlacementsResponse extends \Google\Protobuf\Internal\Message * Total number of `Placement` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `Placement` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `Placement` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListPrivateAuctionDealsRequest.php b/AdsAdManager/src/V1/ListPrivateAuctionDealsRequest.php index 3fd372fc55f3..871cfed21011 100644 --- a/AdsAdManager/src/V1/ListPrivateAuctionDealsRequest.php +++ b/AdsAdManager/src/V1/ListPrivateAuctionDealsRequest.php @@ -27,7 +27,7 @@ class ListPrivateAuctionDealsRequest extends \Google\Protobuf\Internal\Message * Optional. The maximum number of `PrivateAuctionDeals` to return. The * service may return fewer than this value. If unspecified, at most 50 * `PrivateAuctionDeals` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -95,7 +95,7 @@ public static function build(string $parent): self * Optional. The maximum number of `PrivateAuctionDeals` to return. The * service may return fewer than this value. If unspecified, at most 50 * `PrivateAuctionDeals` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListPrivateAuctionDeals` * call. Provide this to retrieve the subsequent page. @@ -153,7 +153,7 @@ public function setParent($var) * Optional. The maximum number of `PrivateAuctionDeals` to return. The * service may return fewer than this value. If unspecified, at most 50 * `PrivateAuctionDeals` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -167,7 +167,7 @@ public function getPageSize() * Optional. The maximum number of `PrivateAuctionDeals` to return. The * service may return fewer than this value. If unspecified, at most 50 * `PrivateAuctionDeals` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListPrivateAuctionDealsResponse.php b/AdsAdManager/src/V1/ListPrivateAuctionDealsResponse.php index c23e78413321..1855104b1b70 100644 --- a/AdsAdManager/src/V1/ListPrivateAuctionDealsResponse.php +++ b/AdsAdManager/src/V1/ListPrivateAuctionDealsResponse.php @@ -33,7 +33,7 @@ class ListPrivateAuctionDealsResponse extends \Google\Protobuf\Internal\Message * Total number of `PrivateAuctionDeal` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListPrivateAuctionDealsResponse extends \Google\Protobuf\Internal\Message * Total number of `PrivateAuctionDeal` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `PrivateAuctionDeal` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `PrivateAuctionDeal` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListPrivateAuctionsRequest.php b/AdsAdManager/src/V1/ListPrivateAuctionsRequest.php index 741dc52aecdc..381c9c2be4e2 100644 --- a/AdsAdManager/src/V1/ListPrivateAuctionsRequest.php +++ b/AdsAdManager/src/V1/ListPrivateAuctionsRequest.php @@ -26,7 +26,7 @@ class ListPrivateAuctionsRequest extends \Google\Protobuf\Internal\Message * Optional. The maximum number of `PrivateAuctions` to return. The service * may return fewer than this value. If unspecified, at most 50 * `PrivateAuctions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -92,7 +92,7 @@ public static function build(string $parent): self * Optional. The maximum number of `PrivateAuctions` to return. The service * may return fewer than this value. If unspecified, at most 50 * `PrivateAuctions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListPrivateAuctions` * call. Provide this to retrieve the subsequent page. @@ -148,7 +148,7 @@ public function setParent($var) * Optional. The maximum number of `PrivateAuctions` to return. The service * may return fewer than this value. If unspecified, at most 50 * `PrivateAuctions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -162,7 +162,7 @@ public function getPageSize() * Optional. The maximum number of `PrivateAuctions` to return. The service * may return fewer than this value. If unspecified, at most 50 * `PrivateAuctions` will be returned. The maximum value is 1000; - * values above 1000 will be coerced to 1000. + * values greater than 1000 will be coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListPrivateAuctionsResponse.php b/AdsAdManager/src/V1/ListPrivateAuctionsResponse.php index ddc09e5e938e..63c0a21fbdf0 100644 --- a/AdsAdManager/src/V1/ListPrivateAuctionsResponse.php +++ b/AdsAdManager/src/V1/ListPrivateAuctionsResponse.php @@ -33,7 +33,7 @@ class ListPrivateAuctionsResponse extends \Google\Protobuf\Internal\Message * Total number of `PrivateAuction` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListPrivateAuctionsResponse extends \Google\Protobuf\Internal\Message * Total number of `PrivateAuction` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `PrivateAuction` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `PrivateAuction` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListProgrammaticBuyersResponse.php b/AdsAdManager/src/V1/ListProgrammaticBuyersResponse.php index aef266e1befc..51c9ce753278 100644 --- a/AdsAdManager/src/V1/ListProgrammaticBuyersResponse.php +++ b/AdsAdManager/src/V1/ListProgrammaticBuyersResponse.php @@ -33,7 +33,7 @@ class ListProgrammaticBuyersResponse extends \Google\Protobuf\Internal\Message * Total number of `ProgrammaticBuyer` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListProgrammaticBuyersResponse extends \Google\Protobuf\Internal\Message * Total number of `ProgrammaticBuyer` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `ProgrammaticBuyer` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `ProgrammaticBuyer` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListReportsRequest.php b/AdsAdManager/src/V1/ListReportsRequest.php index 4f9ef229c9d0..d669dd54c4a4 100644 --- a/AdsAdManager/src/V1/ListReportsRequest.php +++ b/AdsAdManager/src/V1/ListReportsRequest.php @@ -25,8 +25,8 @@ class ListReportsRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of `Reports` to return. The service may return * fewer than this value. If unspecified, at most 50 `Reports` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -90,8 +90,8 @@ public static function build(string $parent): self * @type int $page_size * Optional. The maximum number of `Reports` to return. The service may return * fewer than this value. If unspecified, at most 50 `Reports` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * @type string $page_token * Optional. A page token, received from a previous `ListReports` call. * Provide this to retrieve the subsequent page. @@ -145,8 +145,8 @@ public function setParent($var) /** * Optional. The maximum number of `Reports` to return. The service may return * fewer than this value. If unspecified, at most 50 `Reports` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -159,8 +159,8 @@ public function getPageSize() /** * Optional. The maximum number of `Reports` to return. The service may return * fewer than this value. If unspecified, at most 50 `Reports` will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. + * returned. The maximum value is 1000; values greater than 1000 will be + * coerced to 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListReportsResponse.php b/AdsAdManager/src/V1/ListReportsResponse.php index 7acc7238699f..d657eb5bb2ad 100644 --- a/AdsAdManager/src/V1/ListReportsResponse.php +++ b/AdsAdManager/src/V1/ListReportsResponse.php @@ -33,7 +33,7 @@ class ListReportsResponse extends \Google\Protobuf\Internal\Message * Total number of `Report` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListReportsResponse extends \Google\Protobuf\Internal\Message * Total number of `Report` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `Report` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `Report` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListRolesRequest.php b/AdsAdManager/src/V1/ListRolesRequest.php index ae086b8ea872..2ecdc519297e 100644 --- a/AdsAdManager/src/V1/ListRolesRequest.php +++ b/AdsAdManager/src/V1/ListRolesRequest.php @@ -25,7 +25,8 @@ class ListRolesRequest extends \Google\Protobuf\Internal\Message /** * Optional. The maximum number of `Roles` to return. The service may return * fewer than this value. If unspecified, at most 50 `Roles` will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -89,7 +90,8 @@ public static function build(string $parent): self * @type int $page_size * Optional. The maximum number of `Roles` to return. The service may return * fewer than this value. If unspecified, at most 50 `Roles` will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. * @type string $page_token * Optional. A page token, received from a previous `ListRoles` call. * Provide this to retrieve the subsequent page. @@ -143,7 +145,8 @@ public function setParent($var) /** * Optional. The maximum number of `Roles` to return. The service may return * fewer than this value. If unspecified, at most 50 `Roles` will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -156,7 +159,8 @@ public function getPageSize() /** * Optional. The maximum number of `Roles` to return. The service may return * fewer than this value. If unspecified, at most 50 `Roles` will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/AdsAdManager/src/V1/ListRolesResponse.php b/AdsAdManager/src/V1/ListRolesResponse.php index 6eb4ef45ab2c..f7830a172031 100644 --- a/AdsAdManager/src/V1/ListRolesResponse.php +++ b/AdsAdManager/src/V1/ListRolesResponse.php @@ -32,7 +32,7 @@ class ListRolesResponse extends \Google\Protobuf\Internal\Message * Total number of `Role` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -58,7 +58,7 @@ class ListRolesResponse extends \Google\Protobuf\Internal\Message * Total number of `Role` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -129,7 +129,7 @@ public function setNextPageToken($var) * Total number of `Role` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -148,7 +148,7 @@ public function getTotalSize() * Total number of `Role` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListSitesRequest.php b/AdsAdManager/src/V1/ListSitesRequest.php new file mode 100644 index 000000000000..ecc2f63f9fbc --- /dev/null +++ b/AdsAdManager/src/V1/ListSitesRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListSitesRequest + */ +class ListSitesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Sites. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Sites` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Sites` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListSites` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSites` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of Sites. + * Format: `networks/{network_code}` + * Please see {@see SiteServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListSitesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of Sites. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Sites` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Sites` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListSites` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSites` must match + * the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Sites. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of Sites. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `Sites` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Sites` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `Sites` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Sites` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListSites` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSites` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListSites` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSites` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListSitesResponse.php b/AdsAdManager/src/V1/ListSitesResponse.php new file mode 100644 index 000000000000..d32bdedcf98d --- /dev/null +++ b/AdsAdManager/src/V1/ListSitesResponse.php @@ -0,0 +1,171 @@ +google.ads.admanager.v1.ListSitesResponse + */ +class ListSitesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Site` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Site sites = 1; + */ + private $sites; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `Site` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Site>|\Google\Protobuf\Internal\RepeatedField $sites + * The `Site` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `Site` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * The `Site` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Site sites = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSites() + { + return $this->sites; + } + + /** + * The `Site` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Site sites = 1; + * @param array<\Google\Ads\AdManager\V1\Site>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Site::class); + $this->sites = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `Site` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Site` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListTaxonomyCategoriesResponse.php b/AdsAdManager/src/V1/ListTaxonomyCategoriesResponse.php index 66c311184902..64472ff15193 100644 --- a/AdsAdManager/src/V1/ListTaxonomyCategoriesResponse.php +++ b/AdsAdManager/src/V1/ListTaxonomyCategoriesResponse.php @@ -33,7 +33,7 @@ class ListTaxonomyCategoriesResponse extends \Google\Protobuf\Internal\Message * Total number of `TaxonomyCategory` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -59,7 +59,7 @@ class ListTaxonomyCategoriesResponse extends \Google\Protobuf\Internal\Message * Total number of `TaxonomyCategory` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -130,7 +130,7 @@ public function setNextPageToken($var) * Total number of `TaxonomyCategory` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. @@ -149,7 +149,7 @@ public function getTotalSize() * Total number of `TaxonomyCategory` objects. * If a filter was included in the request, this reflects the total number * after the filtering is applied. - * `total_size` will not be calculated in the response unless it has been + * `total_size` won't be calculated in the response unless it has been * included in a response field mask. The response field mask can be provided * to the method by using the URL parameter `$fields` or `fields`, or by using * the HTTP/gRPC header `X-Goog-FieldMask`. diff --git a/AdsAdManager/src/V1/ListTeamsRequest.php b/AdsAdManager/src/V1/ListTeamsRequest.php new file mode 100644 index 000000000000..996f65fc2f39 --- /dev/null +++ b/AdsAdManager/src/V1/ListTeamsRequest.php @@ -0,0 +1,296 @@ +google.ads.admanager.v1.ListTeamsRequest + */ +class ListTeamsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Teams. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of `Teams` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Teams` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListTeams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTeams` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of Teams. + * Format: `networks/{network_code}` + * Please see {@see TeamServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListTeamsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of Teams. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Teams` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Teams` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListTeams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTeams` must match + * the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Teams. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of Teams. + * Format: `networks/{network_code}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of `Teams` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Teams` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of `Teams` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Teams` will be returned. + * The maximum value is 1000; values greater than 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListTeams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTeams` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListTeams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTeams` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression to filter the response. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Expression to specify sorting order. + * See syntax details at + * https://developers.google.com/ad-manager/api/beta/filters#order + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSkip() + { + return $this->skip; + } + + /** + * Optional. Number of individual resources to skip while paginating. + * + * Generated from protobuf field int32 skip = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSkip($var) + { + GPBUtil::checkInt32($var); + $this->skip = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListTeamsResponse.php b/AdsAdManager/src/V1/ListTeamsResponse.php new file mode 100644 index 000000000000..5eb89120ec22 --- /dev/null +++ b/AdsAdManager/src/V1/ListTeamsResponse.php @@ -0,0 +1,171 @@ +google.ads.admanager.v1.ListTeamsResponse + */ +class ListTeamsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Team` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Team teams = 1; + */ + private $teams; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total number of `Team` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\Team>|\Google\Protobuf\Internal\RepeatedField $teams + * The `Team` objects from the specified network. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type int $total_size + * Total number of `Team` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * The `Team` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Team teams = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTeams() + { + return $this->teams; + } + + /** + * The `Team` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Team teams = 1; + * @param array<\Google\Ads\AdManager\V1\Team>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTeams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Team::class); + $this->teams = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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 `Team` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Team` objects. + * If a filter was included in the request, this reflects the total number + * after the filtering is applied. + * `total_size` won't be calculated in the response unless it has been + * included in a response field mask. The response field mask can be provided + * to the method by using the URL parameter `$fields` or `fields`, or by using + * the HTTP/gRPC header `X-Goog-FieldMask`. + * For more information, see + * https://developers.google.com/ad-manager/api/beta/field-masks + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/MobileApplicationTargeting.php b/AdsAdManager/src/V1/MobileApplicationTargeting.php new file mode 100644 index 000000000000..d8a0315e83db --- /dev/null +++ b/AdsAdManager/src/V1/MobileApplicationTargeting.php @@ -0,0 +1,75 @@ +google.ads.admanager.v1.MobileApplicationTargeting + */ +class MobileApplicationTargeting extends \Google\Protobuf\Internal\Message +{ + protected $targeting; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\FirstPartyMobileApplicationTargeting $first_party_targeting + * Optional. The targeted/excluded first-party mobile applications. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The targeted/excluded first-party mobile applications. + * + * Generated from protobuf field .google.ads.admanager.v1.FirstPartyMobileApplicationTargeting first_party_targeting = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\FirstPartyMobileApplicationTargeting|null + */ + public function getFirstPartyTargeting() + { + return $this->readOneof(1); + } + + public function hasFirstPartyTargeting() + { + return $this->hasOneof(1); + } + + /** + * Optional. The targeted/excluded first-party mobile applications. + * + * Generated from protobuf field .google.ads.admanager.v1.FirstPartyMobileApplicationTargeting first_party_targeting = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\FirstPartyMobileApplicationTargeting $var + * @return $this + */ + public function setFirstPartyTargeting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\FirstPartyMobileApplicationTargeting::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getTargeting() + { + return $this->whichOneof("targeting"); + } + +} + diff --git a/AdsAdManager/src/V1/MobileCarrier.php b/AdsAdManager/src/V1/MobileCarrier.php new file mode 100644 index 000000000000..3666af472e5f --- /dev/null +++ b/AdsAdManager/src/V1/MobileCarrier.php @@ -0,0 +1,159 @@ +google.ads.admanager.v1.MobileCarrier + */ +class MobileCarrier extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `MobileCarrier`. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The localized name of the mobile carrier. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = null; + /** + * Output only. The region code of the mobile carrier. + * + * Generated from protobuf field optional string region_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $region_code = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `MobileCarrier`. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier}` + * @type string $display_name + * Output only. The localized name of the mobile carrier. + * @type string $region_code + * Output only. The region code of the mobile carrier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileCarrierMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `MobileCarrier`. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `MobileCarrier`. + * Format: `networks/{network_code}/mobileCarriers/{mobile_carrier}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The localized name of the mobile carrier. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Output only. The localized name of the mobile carrier. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The region code of the mobile carrier. + * + * Generated from protobuf field optional string region_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRegionCode() + { + return isset($this->region_code) ? $this->region_code : ''; + } + + public function hasRegionCode() + { + return isset($this->region_code); + } + + public function clearRegionCode() + { + unset($this->region_code); + } + + /** + * Output only. The region code of the mobile carrier. + * + * Generated from protobuf field optional string region_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRegionCode($var) + { + GPBUtil::checkString($var, True); + $this->region_code = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/MobileCarrierTargeting.php b/AdsAdManager/src/V1/MobileCarrierTargeting.php new file mode 100644 index 000000000000..87a6985d6ab1 --- /dev/null +++ b/AdsAdManager/src/V1/MobileCarrierTargeting.php @@ -0,0 +1,107 @@ +google.ads.admanager.v1.MobileCarrierTargeting + */ +class MobileCarrierTargeting extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of mobile carrier resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_mobile_carriers = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $targeted_mobile_carriers; + /** + * Optional. A list of mobile carrier resource names that should be excluded. + * + * Generated from protobuf field repeated string excluded_mobile_carriers = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $excluded_mobile_carriers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $targeted_mobile_carriers + * Optional. A list of mobile carrier resource names that should be + * targeted/included. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_mobile_carriers + * Optional. A list of mobile carrier resource names that should be excluded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of mobile carrier resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_mobile_carriers = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetedMobileCarriers() + { + return $this->targeted_mobile_carriers; + } + + /** + * Optional. A list of mobile carrier resource names that should be + * targeted/included. + * + * Generated from protobuf field repeated string targeted_mobile_carriers = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetedMobileCarriers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeted_mobile_carriers = $arr; + + return $this; + } + + /** + * Optional. A list of mobile carrier resource names that should be excluded. + * + * Generated from protobuf field repeated string excluded_mobile_carriers = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedMobileCarriers() + { + return $this->excluded_mobile_carriers; + } + + /** + * Optional. A list of mobile carrier resource names that should be excluded. + * + * Generated from protobuf field repeated string excluded_mobile_carriers = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedMobileCarriers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_mobile_carriers = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/MobileDevice.php b/AdsAdManager/src/V1/MobileDevice.php new file mode 100644 index 000000000000..287bd1bf4023 --- /dev/null +++ b/AdsAdManager/src/V1/MobileDevice.php @@ -0,0 +1,163 @@ +google.ads.admanager.v1.MobileDevice + */ +class MobileDevice extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `MobileDevice`. + * Format: `networks/{network_code}/mobileDevices/{mobile_device}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The localized name of the mobile device. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = null; + /** + * Output only. The manufacturer associated with the mobile device. + * Format: `networks/{network_code}/deviceManufacturers/{device_manufacturer}` + * + * Generated from protobuf field optional string manufacturer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $manufacturer = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `MobileDevice`. + * Format: `networks/{network_code}/mobileDevices/{mobile_device}` + * @type string $display_name + * Output only. The localized name of the mobile device. + * @type string $manufacturer + * Output only. The manufacturer associated with the mobile device. + * Format: `networks/{network_code}/deviceManufacturers/{device_manufacturer}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileDeviceMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `MobileDevice`. + * Format: `networks/{network_code}/mobileDevices/{mobile_device}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `MobileDevice`. + * Format: `networks/{network_code}/mobileDevices/{mobile_device}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The localized name of the mobile device. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Output only. The localized name of the mobile device. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The manufacturer associated with the mobile device. + * Format: `networks/{network_code}/deviceManufacturers/{device_manufacturer}` + * + * Generated from protobuf field optional string manufacturer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getManufacturer() + { + return isset($this->manufacturer) ? $this->manufacturer : ''; + } + + public function hasManufacturer() + { + return isset($this->manufacturer); + } + + public function clearManufacturer() + { + unset($this->manufacturer); + } + + /** + * Output only. The manufacturer associated with the mobile device. + * Format: `networks/{network_code}/deviceManufacturers/{device_manufacturer}` + * + * Generated from protobuf field optional string manufacturer = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setManufacturer($var) + { + GPBUtil::checkString($var, True); + $this->manufacturer = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/MobileDeviceSubmodel.php b/AdsAdManager/src/V1/MobileDeviceSubmodel.php new file mode 100644 index 000000000000..2b0ff3d1df58 --- /dev/null +++ b/AdsAdManager/src/V1/MobileDeviceSubmodel.php @@ -0,0 +1,167 @@ +google.ads.admanager.v1.MobileDeviceSubmodel + */ +class MobileDeviceSubmodel extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `MobileDeviceSubmodel`. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The display name of the mobile device submodel. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = null; + /** + * Output only. The mobile device associated with the submodel. + * Format: `networks/{network_code}/mobileDevices/{mobile_device}` + * + * Generated from protobuf field optional string mobile_device = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $mobile_device = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `MobileDeviceSubmodel`. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}` + * @type string $display_name + * Output only. The display name of the mobile device submodel. + * @type string $mobile_device + * Output only. The mobile device associated with the submodel. + * Format: `networks/{network_code}/mobileDevices/{mobile_device}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\MobileDeviceSubmodelMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `MobileDeviceSubmodel`. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `MobileDeviceSubmodel`. + * Format: + * `networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The display name of the mobile device submodel. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Output only. The display name of the mobile device submodel. + * + * Generated from protobuf field optional string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The mobile device associated with the submodel. + * Format: `networks/{network_code}/mobileDevices/{mobile_device}` + * + * Generated from protobuf field optional string mobile_device = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getMobileDevice() + { + return isset($this->mobile_device) ? $this->mobile_device : ''; + } + + public function hasMobileDevice() + { + return isset($this->mobile_device); + } + + public function clearMobileDevice() + { + unset($this->mobile_device); + } + + /** + * Output only. The mobile device associated with the submodel. + * Format: `networks/{network_code}/mobileDevices/{mobile_device}` + * + * Generated from protobuf field optional string mobile_device = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMobileDevice($var) + { + GPBUtil::checkString($var, True); + $this->mobile_device = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/Order.php b/AdsAdManager/src/V1/Order.php index a333ecf28f4d..25dbdd3777f6 100644 --- a/AdsAdManager/src/V1/Order.php +++ b/AdsAdManager/src/V1/Order.php @@ -94,8 +94,7 @@ class Order extends \Google\Protobuf\Internal\Message private $effective_teams; /** * Output only. The resource name of the User who created the Order on behalf - * of the advertiser. This value is assigned by Google. Format: - * "networks/{network_code}/users/{user_id}" + * of the advertiser. Format: "networks/{network_code}/users/{user_id}" * * Generated from protobuf field optional string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { */ @@ -108,17 +107,17 @@ class Order extends \Google\Protobuf\Internal\Message */ protected $currency_code = null; /** - * Output only. The instant at which the Order and its associated line items - * are eligible to begin serving. This attribute is derived from the line item - * of the order that has the earliest LineItem.start_time. + * Output only. The instant at which the Order and its associated Line items + * are eligible to begin serving. This attribute is derived from the Line item + * of the order that has the earliest `LineItem.start_time`. * * Generated from protobuf field optional .google.protobuf.Timestamp start_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $start_time = null; /** - * Output only. The instant at which the Order and its associated line items - * stop being served. This attribute is derived from the line item of the - * order that has the latest LineItem.end_time. + * Output only. The instant at which the Order and its associated Line items + * stop being served. This attribute is derived from the Line item of the + * order that has the latest `LineItem.end_time`. * * Generated from protobuf field optional .google.protobuf.Timestamp end_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -261,19 +260,18 @@ class Order extends \Google\Protobuf\Internal\Message * inherited values. Format: "networks/{network_code}/teams/{team_id}" * @type string $creator * Output only. The resource name of the User who created the Order on behalf - * of the advertiser. This value is assigned by Google. Format: - * "networks/{network_code}/users/{user_id}" + * of the advertiser. Format: "networks/{network_code}/users/{user_id}" * @type string $currency_code * Output only. The ISO 4217 3-letter currency code for the currency used by * the Order. This value is the network's currency code. * @type \Google\Protobuf\Timestamp $start_time - * Output only. The instant at which the Order and its associated line items - * are eligible to begin serving. This attribute is derived from the line item - * of the order that has the earliest LineItem.start_time. + * Output only. The instant at which the Order and its associated Line items + * are eligible to begin serving. This attribute is derived from the Line item + * of the order that has the earliest `LineItem.start_time`. * @type \Google\Protobuf\Timestamp $end_time - * Output only. The instant at which the Order and its associated line items - * stop being served. This attribute is derived from the line item of the - * order that has the latest LineItem.end_time. + * Output only. The instant at which the Order and its associated Line items + * stop being served. This attribute is derived from the Line item of the + * order that has the latest `LineItem.end_time`. * @type bool $unlimited_end_time * Output only. Indicates whether or not this Order has an end time. * @type int $external_order_id @@ -691,8 +689,7 @@ public function setEffectiveTeams($var) /** * Output only. The resource name of the User who created the Order on behalf - * of the advertiser. This value is assigned by Google. Format: - * "networks/{network_code}/users/{user_id}" + * of the advertiser. Format: "networks/{network_code}/users/{user_id}" * * Generated from protobuf field optional string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { * @return string @@ -714,8 +711,7 @@ public function clearCreator() /** * Output only. The resource name of the User who created the Order on behalf - * of the advertiser. This value is assigned by Google. Format: - * "networks/{network_code}/users/{user_id}" + * of the advertiser. Format: "networks/{network_code}/users/{user_id}" * * Generated from protobuf field optional string creator = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { * @param string $var @@ -768,9 +764,9 @@ public function setCurrencyCode($var) } /** - * Output only. The instant at which the Order and its associated line items - * are eligible to begin serving. This attribute is derived from the line item - * of the order that has the earliest LineItem.start_time. + * Output only. The instant at which the Order and its associated Line items + * are eligible to begin serving. This attribute is derived from the Line item + * of the order that has the earliest `LineItem.start_time`. * * Generated from protobuf field optional .google.protobuf.Timestamp start_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null @@ -791,9 +787,9 @@ public function clearStartTime() } /** - * Output only. The instant at which the Order and its associated line items - * are eligible to begin serving. This attribute is derived from the line item - * of the order that has the earliest LineItem.start_time. + * Output only. The instant at which the Order and its associated Line items + * are eligible to begin serving. This attribute is derived from the Line item + * of the order that has the earliest `LineItem.start_time`. * * Generated from protobuf field optional .google.protobuf.Timestamp start_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var @@ -808,9 +804,9 @@ public function setStartTime($var) } /** - * Output only. The instant at which the Order and its associated line items - * stop being served. This attribute is derived from the line item of the - * order that has the latest LineItem.end_time. + * Output only. The instant at which the Order and its associated Line items + * stop being served. This attribute is derived from the Line item of the + * order that has the latest `LineItem.end_time`. * * Generated from protobuf field optional .google.protobuf.Timestamp end_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null @@ -831,9 +827,9 @@ public function clearEndTime() } /** - * Output only. The instant at which the Order and its associated line items - * stop being served. This attribute is derived from the line item of the - * order that has the latest LineItem.end_time. + * Output only. The instant at which the Order and its associated Line items + * stop being served. This attribute is derived from the Line item of the + * order that has the latest `LineItem.end_time`. * * Generated from protobuf field optional .google.protobuf.Timestamp end_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var diff --git a/AdsAdManager/src/V1/Report.php b/AdsAdManager/src/V1/Report.php index e43e74a34472..3e9c1a2c1e8a 100644 --- a/AdsAdManager/src/V1/Report.php +++ b/AdsAdManager/src/V1/Report.php @@ -61,7 +61,7 @@ class Report extends \Google\Protobuf\Internal\Message protected $create_time = null; /** * Output only. The locale of this report. Locale is set from the user's - * locale at the time of the request. Locale can not be modified. + * locale at the time of the request. Locale can't be modified. * * Generated from protobuf field string locale = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -97,7 +97,7 @@ class Report extends \Google\Protobuf\Internal\Message * Output only. The instant this report was created. * @type string $locale * Output only. The locale of this report. Locale is set from the user's - * locale at the time of the request. Locale can not be modified. + * locale at the time of the request. Locale can't be modified. * @type \Google\Ads\AdManager\V1\ScheduleOptions $schedule_options * Optional. The schedule options of this report. * } @@ -325,7 +325,7 @@ public function setCreateTime($var) /** * Output only. The locale of this report. Locale is set from the user's - * locale at the time of the request. Locale can not be modified. + * locale at the time of the request. Locale can't be modified. * * Generated from protobuf field string locale = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -337,7 +337,7 @@ public function getLocale() /** * Output only. The locale of this report. Locale is set from the user's - * locale at the time of the request. Locale can not be modified. + * locale at the time of the request. Locale can't be modified. * * Generated from protobuf field string locale = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var diff --git a/AdsAdManager/src/V1/Report/Visibility.php b/AdsAdManager/src/V1/Report/Visibility.php index a93c1bb6b240..e19bb07255e1 100644 --- a/AdsAdManager/src/V1/Report/Visibility.php +++ b/AdsAdManager/src/V1/Report/Visibility.php @@ -14,7 +14,7 @@ class Visibility { /** - * Default value. Reports with hidden visibility will not appear in the Ad + * Default value. Reports with hidden visibility won't appear in the Ad * Manager UI. * * Generated from protobuf enum HIDDEN = 0; diff --git a/AdsAdManager/src/V1/ReportDataTable.php b/AdsAdManager/src/V1/ReportDataTable.php new file mode 100644 index 000000000000..e8943002eb21 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDataTable.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.ReportDataTable + */ +class ReportDataTable extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportMessages::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/ReportDataTable/MetricValueGroup.php b/AdsAdManager/src/V1/ReportDataTable/MetricValueGroup.php new file mode 100644 index 000000000000..0014dd904045 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDataTable/MetricValueGroup.php @@ -0,0 +1,287 @@ +google.ads.admanager.v1.ReportDataTable.MetricValueGroup + */ +class MetricValueGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Data for the PRIMARY MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue primary_values = 1; + */ + private $primary_values; + /** + * Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue primary_percent_of_total_values = 2; + */ + private $primary_percent_of_total_values; + /** + * Data for the COMPARISON MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue comparison_values = 3; + */ + private $comparison_values; + /** + * Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue comparison_percent_of_total_values = 4; + */ + private $comparison_percent_of_total_values; + /** + * Data for the ABSOLUTE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue absolute_change_values = 5; + */ + private $absolute_change_values; + /** + * Data for the RELATIVE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue relative_change_values = 6; + */ + private $relative_change_values; + /** + * If true, the flag's conditions are met. If false, the flag's + * conditions are not met. flag_values has the same length as + * flags and index i of flag_values represents the flag at index i + * of flags. + * + * Generated from protobuf field repeated bool flag_values = 7; + */ + private $flag_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $primary_values + * Data for the PRIMARY MetricValueType. + * @type array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $primary_percent_of_total_values + * Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. + * @type array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $comparison_values + * Data for the COMPARISON MetricValueType. + * @type array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $comparison_percent_of_total_values + * Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. + * @type array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $absolute_change_values + * Data for the ABSOLUTE_CHANGE MetricValueType. + * @type array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $relative_change_values + * Data for the RELATIVE_CHANGE MetricValueType. + * @type array|\Google\Protobuf\Internal\RepeatedField $flag_values + * If true, the flag's conditions are met. If false, the flag's + * conditions are not met. flag_values has the same length as + * flags and index i of flag_values represents the flag at index i + * of flags. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportMessages::initOnce(); + parent::__construct($data); + } + + /** + * Data for the PRIMARY MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue primary_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrimaryValues() + { + return $this->primary_values; + } + + /** + * Data for the PRIMARY MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue primary_values = 1; + * @param array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrimaryValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportValue::class); + $this->primary_values = $arr; + + return $this; + } + + /** + * Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue primary_percent_of_total_values = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrimaryPercentOfTotalValues() + { + return $this->primary_percent_of_total_values; + } + + /** + * Data for the PRIMARY_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue primary_percent_of_total_values = 2; + * @param array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrimaryPercentOfTotalValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportValue::class); + $this->primary_percent_of_total_values = $arr; + + return $this; + } + + /** + * Data for the COMPARISON MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue comparison_values = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getComparisonValues() + { + return $this->comparison_values; + } + + /** + * Data for the COMPARISON MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue comparison_values = 3; + * @param array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setComparisonValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportValue::class); + $this->comparison_values = $arr; + + return $this; + } + + /** + * Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue comparison_percent_of_total_values = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getComparisonPercentOfTotalValues() + { + return $this->comparison_percent_of_total_values; + } + + /** + * Data for the COMPARISON_PERCENT_OF_TOTAL MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue comparison_percent_of_total_values = 4; + * @param array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setComparisonPercentOfTotalValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportValue::class); + $this->comparison_percent_of_total_values = $arr; + + return $this; + } + + /** + * Data for the ABSOLUTE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue absolute_change_values = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAbsoluteChangeValues() + { + return $this->absolute_change_values; + } + + /** + * Data for the ABSOLUTE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue absolute_change_values = 5; + * @param array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAbsoluteChangeValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportValue::class); + $this->absolute_change_values = $arr; + + return $this; + } + + /** + * Data for the RELATIVE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue relative_change_values = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelativeChangeValues() + { + return $this->relative_change_values; + } + + /** + * Data for the RELATIVE_CHANGE MetricValueType. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue relative_change_values = 6; + * @param array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelativeChangeValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportValue::class); + $this->relative_change_values = $arr; + + return $this; + } + + /** + * If true, the flag's conditions are met. If false, the flag's + * conditions are not met. flag_values has the same length as + * flags and index i of flag_values represents the flag at index i + * of flags. + * + * Generated from protobuf field repeated bool flag_values = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFlagValues() + { + return $this->flag_values; + } + + /** + * If true, the flag's conditions are met. If false, the flag's + * conditions are not met. flag_values has the same length as + * flags and index i of flag_values represents the flag at index i + * of flags. + * + * Generated from protobuf field repeated bool flag_values = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFlagValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL); + $this->flag_values = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDataTable/Row.php b/AdsAdManager/src/V1/ReportDataTable/Row.php new file mode 100644 index 000000000000..7c3f17dbff4d --- /dev/null +++ b/AdsAdManager/src/V1/ReportDataTable/Row.php @@ -0,0 +1,134 @@ +google.ads.admanager.v1.ReportDataTable.Row + */ +class Row extends \Google\Protobuf\Internal\Message +{ + /** + * The order of the dimension values is the same as the order of the + * dimensions specified in the request. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue dimension_values = 1; + */ + private $dimension_values; + /** + * The length of the metric_value_groups + * field will be equal to the length of the date_ranges field in the + * fetch response. The metric_value_groups field is + * ordered such that each index corresponds to the date_range at the same + * index. For example, given date_ranges [x, y], metric_value_groups will + * have a length of two. The first entry in metric_value_groups represents + * the metrics for date x and the second entry in metric_value_groups + * represents the metrics for date y. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDataTable.MetricValueGroup metric_value_groups = 2; + */ + private $metric_value_groups; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $dimension_values + * The order of the dimension values is the same as the order of the + * dimensions specified in the request. + * @type array<\Google\Ads\AdManager\V1\ReportDataTable\MetricValueGroup>|\Google\Protobuf\Internal\RepeatedField $metric_value_groups + * The length of the metric_value_groups + * field will be equal to the length of the date_ranges field in the + * fetch response. The metric_value_groups field is + * ordered such that each index corresponds to the date_range at the same + * index. For example, given date_ranges [x, y], metric_value_groups will + * have a length of two. The first entry in metric_value_groups represents + * the metrics for date x and the second entry in metric_value_groups + * represents the metrics for date y. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportMessages::initOnce(); + parent::__construct($data); + } + + /** + * The order of the dimension values is the same as the order of the + * dimensions specified in the request. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue dimension_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDimensionValues() + { + return $this->dimension_values; + } + + /** + * The order of the dimension values is the same as the order of the + * dimensions specified in the request. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue dimension_values = 1; + * @param array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDimensionValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportValue::class); + $this->dimension_values = $arr; + + return $this; + } + + /** + * The length of the metric_value_groups + * field will be equal to the length of the date_ranges field in the + * fetch response. The metric_value_groups field is + * ordered such that each index corresponds to the date_range at the same + * index. For example, given date_ranges [x, y], metric_value_groups will + * have a length of two. The first entry in metric_value_groups represents + * the metrics for date x and the second entry in metric_value_groups + * represents the metrics for date y. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDataTable.MetricValueGroup metric_value_groups = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetricValueGroups() + { + return $this->metric_value_groups; + } + + /** + * The length of the metric_value_groups + * field will be equal to the length of the date_ranges field in the + * fetch response. The metric_value_groups field is + * ordered such that each index corresponds to the date_range at the same + * index. For example, given date_ranges [x, y], metric_value_groups will + * have a length of two. The first entry in metric_value_groups represents + * the metrics for date x and the second entry in metric_value_groups + * represents the metrics for date y. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDataTable.MetricValueGroup metric_value_groups = 2; + * @param array<\Google\Ads\AdManager\V1\ReportDataTable\MetricValueGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetricValueGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportDataTable\MetricValueGroup::class); + $this->metric_value_groups = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition.php b/AdsAdManager/src/V1/ReportDefinition.php index 6593bc03cf36..2a69b0bcadd9 100644 --- a/AdsAdManager/src/V1/ReportDefinition.php +++ b/AdsAdManager/src/V1/ReportDefinition.php @@ -1,6 +1,6 @@ repeated .google.ads.admanager.v1.Report.Dimension dimensions = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Dimension dimensions = 1 [(.google.api.field_behavior) = REQUIRED]; */ private $dimensions; /** * Required. The list of metrics to report on. If empty, the report will have * no metrics. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Metric metrics = 2 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Metric metrics = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $metrics; /** * Optional. The filters for this report. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Filter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $filters; /** * Optional. Where to get the time zone for this report. Defaults to using the * network time zone setting (PUBLISHER). If source is PROVIDED, the time_zone - * field in the report definition must also be provided with the desired time - * zone. + * field in the report definition must also set a time zone. * - * Generated from protobuf field .google.ads.admanager.v1.Report.TimeZoneSource time_zone_source = 20 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.TimeZoneSource time_zone_source = 20 [(.google.api.field_behavior) = OPTIONAL]; */ protected $time_zone_source = 0; /** * Optional. If time_zone_source is PROVIDED, this is the time zone to use for * this report. Leave empty for any other time zone source. Time zone in IANA - * format (e.g. "America/New_York"). + * format. For example, "America/New_York". * * Generated from protobuf field string time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -62,14 +61,14 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message /** * Required. The primary date range of this report. * - * Generated from protobuf field .google.ads.admanager.v1.Report.DateRange date_range = 6 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.DateRange date_range = 6 [(.google.api.field_behavior) = REQUIRED]; */ protected $date_range = null; /** * Optional. The comparison date range of this report. If unspecified, the - * report will not have any comparison metrics. + * report won't have any comparison metrics. * - * Generated from protobuf field optional .google.ads.admanager.v1.Report.DateRange comparison_date_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.DateRange comparison_date_range = 9 [(.google.api.field_behavior) = OPTIONAL]; */ protected $comparison_date_range = null; /** @@ -111,7 +110,7 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message /** * Required. The type of this report. * - * Generated from protobuf field .google.ads.admanager.v1.Report.ReportType report_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.ReportType report_type = 8 [(.google.api.field_behavior) = REQUIRED]; */ protected $report_type = 0; /** @@ -122,20 +121,20 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message * column will also include comparison values for its relative previous * quarter. * - * Generated from protobuf field .google.ads.admanager.v1.Report.TimePeriodColumn time_period_column = 10 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.TimePeriodColumn time_period_column = 10 [(.google.api.field_behavior) = OPTIONAL]; */ protected $time_period_column = 0; /** * Optional. List of flags for this report. Used to flag rows in a result set * based on a set of defined filters. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 14 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Flag flags = 14 [(.google.api.field_behavior) = OPTIONAL]; */ private $flags; /** * Optional. Default sorts to apply to this report. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Sort sorts = 15 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Sort sorts = 15 [(.google.api.field_behavior) = OPTIONAL]; */ private $sorts; @@ -151,25 +150,24 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message * @type array|\Google\Protobuf\Internal\RepeatedField $metrics * Required. The list of metrics to report on. If empty, the report will have * no metrics. - * @type array<\Google\Ads\AdManager\V1\Report\Filter>|\Google\Protobuf\Internal\RepeatedField $filters + * @type array<\Google\Ads\AdManager\V1\ReportDefinition\Filter>|\Google\Protobuf\Internal\RepeatedField $filters * Optional. The filters for this report. * @type int $time_zone_source * Optional. Where to get the time zone for this report. Defaults to using the * network time zone setting (PUBLISHER). If source is PROVIDED, the time_zone - * field in the report definition must also be provided with the desired time - * zone. + * field in the report definition must also set a time zone. * @type string $time_zone * Optional. If time_zone_source is PROVIDED, this is the time zone to use for * this report. Leave empty for any other time zone source. Time zone in IANA - * format (e.g. "America/New_York"). + * format. For example, "America/New_York". * @type string $currency_code * Optional. The ISO 4217 currency code for this report. Defaults to publisher * currency code if not specified. - * @type \Google\Ads\AdManager\V1\Report\DateRange $date_range + * @type \Google\Ads\AdManager\V1\ReportDefinition\DateRange $date_range * Required. The primary date range of this report. - * @type \Google\Ads\AdManager\V1\Report\DateRange $comparison_date_range + * @type \Google\Ads\AdManager\V1\ReportDefinition\DateRange $comparison_date_range * Optional. The comparison date range of this report. If unspecified, the - * report will not have any comparison metrics. + * report won't have any comparison metrics. * @type array|array|\Google\Protobuf\Internal\RepeatedField $custom_dimension_key_ids * Optional. Custom Dimension keys that represent CUSTOM_DIMENSION_* * dimensions. The index of this repeated field corresponds to the index on @@ -199,15 +197,15 @@ class ReportDefinition extends \Google\Protobuf\Internal\Message * "PREVIOUS PERIOD" is specified in comparison_date_range, then each quarter * column will also include comparison values for its relative previous * quarter. - * @type array<\Google\Ads\AdManager\V1\Report\Flag>|\Google\Protobuf\Internal\RepeatedField $flags + * @type array<\Google\Ads\AdManager\V1\ReportDefinition\Flag>|\Google\Protobuf\Internal\RepeatedField $flags * Optional. List of flags for this report. Used to flag rows in a result set * based on a set of defined filters. - * @type array<\Google\Ads\AdManager\V1\Report\Sort>|\Google\Protobuf\Internal\RepeatedField $sorts + * @type array<\Google\Ads\AdManager\V1\ReportDefinition\Sort>|\Google\Protobuf\Internal\RepeatedField $sorts * Optional. Default sorts to apply to this report. * } */ public function __construct($data = NULL) { - \GPBMetadata\Google\Ads\Admanager\V1\ReportMessages::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); parent::__construct($data); } @@ -215,7 +213,7 @@ public function __construct($data = NULL) { * Required. The list of dimensions to report on. If empty, the report will * have no dimensions, and any metrics will be totals. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Dimension dimensions = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Dimension dimensions = 1 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getDimensions() @@ -227,13 +225,13 @@ public function getDimensions() * Required. The list of dimensions to report on. If empty, the report will * have no dimensions, and any metrics will be totals. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Dimension dimensions = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Dimension dimensions = 1 [(.google.api.field_behavior) = REQUIRED]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setDimensions($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\AdManager\V1\Report\Dimension::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\AdManager\V1\ReportDefinition\Dimension::class); $this->dimensions = $arr; return $this; @@ -243,7 +241,7 @@ public function setDimensions($var) * Required. The list of metrics to report on. If empty, the report will have * no metrics. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Metric metrics = 2 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Metric metrics = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getMetrics() @@ -255,13 +253,13 @@ public function getMetrics() * Required. The list of metrics to report on. If empty, the report will have * no metrics. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Metric metrics = 2 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Metric metrics = 2 [(.google.api.field_behavior) = REQUIRED]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setMetrics($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\AdManager\V1\Report\Metric::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\AdManager\V1\ReportDefinition\Metric::class); $this->metrics = $arr; return $this; @@ -270,7 +268,7 @@ public function setMetrics($var) /** * Optional. The filters for this report. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Filter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getFilters() @@ -281,13 +279,13 @@ public function getFilters() /** * Optional. The filters for this report. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Filter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Ads\AdManager\V1\Report\Filter>|\Google\Protobuf\Internal\RepeatedField $var + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Filter filters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\ReportDefinition\Filter>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setFilters($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Filter::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportDefinition\Filter::class); $this->filters = $arr; return $this; @@ -296,10 +294,9 @@ public function setFilters($var) /** * Optional. Where to get the time zone for this report. Defaults to using the * network time zone setting (PUBLISHER). If source is PROVIDED, the time_zone - * field in the report definition must also be provided with the desired time - * zone. + * field in the report definition must also set a time zone. * - * Generated from protobuf field .google.ads.admanager.v1.Report.TimeZoneSource time_zone_source = 20 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.TimeZoneSource time_zone_source = 20 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getTimeZoneSource() @@ -310,16 +307,15 @@ public function getTimeZoneSource() /** * Optional. Where to get the time zone for this report. Defaults to using the * network time zone setting (PUBLISHER). If source is PROVIDED, the time_zone - * field in the report definition must also be provided with the desired time - * zone. + * field in the report definition must also set a time zone. * - * Generated from protobuf field .google.ads.admanager.v1.Report.TimeZoneSource time_zone_source = 20 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.TimeZoneSource time_zone_source = 20 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ public function setTimeZoneSource($var) { - GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\TimeZoneSource::class); + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReportDefinition\TimeZoneSource::class); $this->time_zone_source = $var; return $this; @@ -328,7 +324,7 @@ public function setTimeZoneSource($var) /** * Optional. If time_zone_source is PROVIDED, this is the time zone to use for * this report. Leave empty for any other time zone source. Time zone in IANA - * format (e.g. "America/New_York"). + * format. For example, "America/New_York". * * Generated from protobuf field string time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -341,7 +337,7 @@ public function getTimeZone() /** * Optional. If time_zone_source is PROVIDED, this is the time zone to use for * this report. Leave empty for any other time zone source. Time zone in IANA - * format (e.g. "America/New_York"). + * format. For example, "America/New_York". * * Generated from protobuf field string time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var @@ -386,8 +382,8 @@ public function setCurrencyCode($var) /** * Required. The primary date range of this report. * - * Generated from protobuf field .google.ads.admanager.v1.Report.DateRange date_range = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Ads\AdManager\V1\Report\DateRange|null + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.DateRange date_range = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\ReportDefinition\DateRange|null */ public function getDateRange() { @@ -407,13 +403,13 @@ public function clearDateRange() /** * Required. The primary date range of this report. * - * Generated from protobuf field .google.ads.admanager.v1.Report.DateRange date_range = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Ads\AdManager\V1\Report\DateRange $var + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.DateRange date_range = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\ReportDefinition\DateRange $var * @return $this */ public function setDateRange($var) { - GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\DateRange::class); + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\DateRange::class); $this->date_range = $var; return $this; @@ -421,10 +417,10 @@ public function setDateRange($var) /** * Optional. The comparison date range of this report. If unspecified, the - * report will not have any comparison metrics. + * report won't have any comparison metrics. * - * Generated from protobuf field optional .google.ads.admanager.v1.Report.DateRange comparison_date_range = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Ads\AdManager\V1\Report\DateRange|null + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.DateRange comparison_date_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\ReportDefinition\DateRange|null */ public function getComparisonDateRange() { @@ -443,15 +439,15 @@ public function clearComparisonDateRange() /** * Optional. The comparison date range of this report. If unspecified, the - * report will not have any comparison metrics. + * report won't have any comparison metrics. * - * Generated from protobuf field optional .google.ads.admanager.v1.Report.DateRange comparison_date_range = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Ads\AdManager\V1\Report\DateRange $var + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.DateRange comparison_date_range = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\ReportDefinition\DateRange $var * @return $this */ public function setComparisonDateRange($var) { - GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Report\DateRange::class); + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\DateRange::class); $this->comparison_date_range = $var; return $this; @@ -588,7 +584,7 @@ public function setCreativeCustomFieldIds($var) /** * Required. The type of this report. * - * Generated from protobuf field .google.ads.admanager.v1.Report.ReportType report_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.ReportType report_type = 8 [(.google.api.field_behavior) = REQUIRED]; * @return int */ public function getReportType() @@ -599,13 +595,13 @@ public function getReportType() /** * Required. The type of this report. * - * Generated from protobuf field .google.ads.admanager.v1.Report.ReportType report_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.ReportType report_type = 8 [(.google.api.field_behavior) = REQUIRED]; * @param int $var * @return $this */ public function setReportType($var) { - GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\ReportType::class); + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReportDefinition\ReportType::class); $this->report_type = $var; return $this; @@ -619,7 +615,7 @@ public function setReportType($var) * column will also include comparison values for its relative previous * quarter. * - * Generated from protobuf field .google.ads.admanager.v1.Report.TimePeriodColumn time_period_column = 10 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.TimePeriodColumn time_period_column = 10 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getTimePeriodColumn() @@ -635,13 +631,13 @@ public function getTimePeriodColumn() * column will also include comparison values for its relative previous * quarter. * - * Generated from protobuf field .google.ads.admanager.v1.Report.TimePeriodColumn time_period_column = 10 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.TimePeriodColumn time_period_column = 10 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ public function setTimePeriodColumn($var) { - GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\Report\TimePeriodColumn::class); + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReportDefinition\TimePeriodColumn::class); $this->time_period_column = $var; return $this; @@ -651,7 +647,7 @@ public function setTimePeriodColumn($var) * Optional. List of flags for this report. Used to flag rows in a result set * based on a set of defined filters. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 14 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Flag flags = 14 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getFlags() @@ -663,13 +659,13 @@ public function getFlags() * Optional. List of flags for this report. Used to flag rows in a result set * based on a set of defined filters. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Ads\AdManager\V1\Report\Flag>|\Google\Protobuf\Internal\RepeatedField $var + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Flag flags = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\ReportDefinition\Flag>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setFlags($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Flag::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportDefinition\Flag::class); $this->flags = $arr; return $this; @@ -678,7 +674,7 @@ public function setFlags($var) /** * Optional. Default sorts to apply to this report. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Sort sorts = 15 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Sort sorts = 15 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getSorts() @@ -689,13 +685,13 @@ public function getSorts() /** * Optional. Default sorts to apply to this report. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Sort sorts = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Ads\AdManager\V1\Report\Sort>|\Google\Protobuf\Internal\RepeatedField $var + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Sort sorts = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\ReportDefinition\Sort>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setSorts($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Sort::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportDefinition\Sort::class); $this->sorts = $arr; return $this; diff --git a/AdsAdManager/src/V1/ReportDefinition/DateRange.php b/AdsAdManager/src/V1/ReportDefinition/DateRange.php new file mode 100644 index 000000000000..8e808b367fa3 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/DateRange.php @@ -0,0 +1,109 @@ +google.ads.admanager.v1.ReportDefinition.DateRange + */ +class DateRange extends \Google\Protobuf\Internal\Message +{ + protected $date_range_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\ReportDefinition\DateRange\FixedDateRange $fixed + * A fixed date range. + * @type int $relative + * A relative date range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); + parent::__construct($data); + } + + /** + * A fixed date range. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange fixed = 1; + * @return \Google\Ads\AdManager\V1\ReportDefinition\DateRange\FixedDateRange|null + */ + public function getFixed() + { + return $this->readOneof(1); + } + + public function hasFixed() + { + return $this->hasOneof(1); + } + + /** + * A fixed date range. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange fixed = 1; + * @param \Google\Ads\AdManager\V1\ReportDefinition\DateRange\FixedDateRange $var + * @return $this + */ + public function setFixed($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\DateRange\FixedDateRange::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A relative date range. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange relative = 2; + * @return int + */ + public function getRelative() + { + return $this->readOneof(2); + } + + public function hasRelative() + { + return $this->hasOneof(2); + } + + /** + * A relative date range. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange relative = 2; + * @param int $var + * @return $this + */ + public function setRelative($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReportDefinition\DateRange\RelativeDateRange::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getDateRangeType() + { + return $this->whichOneof("date_range_type"); + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/DateRange/FixedDateRange.php b/AdsAdManager/src/V1/ReportDefinition/DateRange/FixedDateRange.php new file mode 100644 index 000000000000..da9ea2fc1443 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/DateRange/FixedDateRange.php @@ -0,0 +1,122 @@ +google.ads.admanager.v1.ReportDefinition.DateRange.FixedDateRange + */ +class FixedDateRange extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The start date of this date range. + * + * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_date = null; + /** + * Required. The end date (inclusive) of this date range. + * + * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $end_date = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Date $start_date + * Required. The start date of this date range. + * @type \Google\Type\Date $end_date + * Required. The end date (inclusive) of this date range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); + parent::__construct($data); + } + + /** + * Required. The start date of this date range. + * + * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Date|null + */ + public function getStartDate() + { + return $this->start_date; + } + + public function hasStartDate() + { + return isset($this->start_date); + } + + public function clearStartDate() + { + unset($this->start_date); + } + + /** + * Required. The start date of this date range. + * + * Generated from protobuf field .google.type.Date start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->start_date = $var; + + return $this; + } + + /** + * Required. The end date (inclusive) of this date range. + * + * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Date|null + */ + public function getEndDate() + { + return $this->end_date; + } + + public function hasEndDate() + { + return isset($this->end_date); + } + + public function clearEndDate() + { + unset($this->end_date); + } + + /** + * Required. The end date (inclusive) of this date range. + * + * Generated from protobuf field .google.type.Date end_date = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_date = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/DateRange/RelativeDateRange.php b/AdsAdManager/src/V1/ReportDefinition/DateRange/RelativeDateRange.php new file mode 100644 index 000000000000..e31302d27699 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/DateRange/RelativeDateRange.php @@ -0,0 +1,338 @@ +google.ads.admanager.v1.ReportDefinition.DateRange.RelativeDateRange + */ +class RelativeDateRange +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum RELATIVE_DATE_RANGE_UNSPECIFIED = 0; + */ + const RELATIVE_DATE_RANGE_UNSPECIFIED = 0; + /** + * The date the report is run. + * + * Generated from protobuf enum TODAY = 1; + */ + const TODAY = 1; + /** + * The date a day before the date that the report is run. + * + * Generated from protobuf enum YESTERDAY = 2; + */ + const YESTERDAY = 2; + /** + * The full week in which this report is run. Could include dates in + * the future. + * + * Generated from protobuf enum THIS_WEEK = 3; + */ + const THIS_WEEK = 3; + /** + * From the beginning of the calendar week (Monday to Sunday) in which the + * up to and including the day the report is run. + * + * Generated from protobuf enum THIS_WEEK_TO_DATE = 29; + */ + const THIS_WEEK_TO_DATE = 29; + /** + * The full month in which this report is run. Could include dates in + * the future. + * + * Generated from protobuf enum THIS_MONTH = 4; + */ + const THIS_MONTH = 4; + /** + * From the beginning of the calendar month in which the report is run, to + * up to and including the day the report is run. + * + * Generated from protobuf enum THIS_MONTH_TO_DATE = 26; + */ + const THIS_MONTH_TO_DATE = 26; + /** + * The full quarter in which this report is run. Could include dates + * in the future. + * + * Generated from protobuf enum THIS_QUARTER = 5; + */ + const THIS_QUARTER = 5; + /** + * From the beginning of the calendar quarter in which the report is run, + * up to and including the day the report is run. + * + * Generated from protobuf enum THIS_QUARTER_TO_DATE = 27; + */ + const THIS_QUARTER_TO_DATE = 27; + /** + * The full year in which this report is run. Could include dates in + * the future. + * + * Generated from protobuf enum THIS_YEAR = 6; + */ + const THIS_YEAR = 6; + /** + * From the beginning of the calendar year in which the report is run, to + * up to and including the day the report is run. + * + * Generated from protobuf enum THIS_YEAR_TO_DATE = 28; + */ + const THIS_YEAR_TO_DATE = 28; + /** + * The entire previous calendar week, Monday to Sunday (inclusive), + * preceding the calendar week the report is run. + * + * Generated from protobuf enum LAST_WEEK = 7; + */ + const LAST_WEEK = 7; + /** + * The entire previous calendar month preceding the calendar month the + * report is run. + * + * Generated from protobuf enum LAST_MONTH = 8; + */ + const LAST_MONTH = 8; + /** + * The entire previous calendar quarter preceding the calendar quarter the + * report is run. + * + * Generated from protobuf enum LAST_QUARTER = 9; + */ + const LAST_QUARTER = 9; + /** + * The entire previous calendar year preceding the calendar year the + * report is run. + * + * Generated from protobuf enum LAST_YEAR = 10; + */ + const LAST_YEAR = 10; + /** + * The 7 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_7_DAYS = 11; + */ + const LAST_7_DAYS = 11; + /** + * The 30 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_30_DAYS = 12; + */ + const LAST_30_DAYS = 12; + /** + * The 60 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_60_DAYS = 13; + */ + const LAST_60_DAYS = 13; + /** + * The 90 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_90_DAYS = 14; + */ + const LAST_90_DAYS = 14; + /** + * The 180 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_180_DAYS = 15; + */ + const LAST_180_DAYS = 15; + /** + * The 360 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_360_DAYS = 16; + */ + const LAST_360_DAYS = 16; + /** + * The 365 days preceding the day the report is run. + * + * Generated from protobuf enum LAST_365_DAYS = 17; + */ + const LAST_365_DAYS = 17; + /** + * The entire previous 3 calendar months preceding the calendar month the + * report is run. + * + * Generated from protobuf enum LAST_3_MONTHS = 18; + */ + const LAST_3_MONTHS = 18; + /** + * The entire previous 6 calendar months preceding the calendar month the + * report is run. + * + * Generated from protobuf enum LAST_6_MONTHS = 19; + */ + const LAST_6_MONTHS = 19; + /** + * The entire previous 6 calendar months preceding the calendar month the + * report is run. + * + * Generated from protobuf enum LAST_12_MONTHS = 20; + */ + const LAST_12_MONTHS = 20; + /** + * From 3 years before the report is run, to the day before the report is + * run, inclusive. + * + * Generated from protobuf enum ALL_AVAILABLE = 21; + */ + const ALL_AVAILABLE = 21; + /** + * The date a day after the date that the report is run. + * + * Generated from protobuf enum TOMORROW = 30; + */ + const TOMORROW = 30; + /** + * The 90 days following the day the report is run. + * + * Generated from protobuf enum NEXT_90_DAYS = 31; + */ + const NEXT_90_DAYS = 31; + /** + * The entire calendar month following the calendar month the report is + * run. + * + * Generated from protobuf enum NEXT_MONTH = 32; + */ + const NEXT_MONTH = 32; + /** + * The entire 3 calendar months following the calendar month the report + * is run. + * + * Generated from protobuf enum NEXT_3_MONTHS = 33; + */ + const NEXT_3_MONTHS = 33; + /** + * The entire 12 calendar months following the calendar month the report + * is run. + * + * Generated from protobuf enum NEXT_12_MONTHS = 34; + */ + const NEXT_12_MONTHS = 34; + /** + * The entire calendar week, Monday to Sunday (inclusive), following the + * calendar week the report is run. + * + * Generated from protobuf enum NEXT_WEEK = 35; + */ + const NEXT_WEEK = 35; + /** + * The entire calendar quarter following the calendar quarter the report + * is run. + * + * Generated from protobuf enum NEXT_QUARTER = 36; + */ + const NEXT_QUARTER = 36; + /** + * From the date a day after the date that the report is run, to the end + * of the calendar month following the calendar month the report is run. + * + * Generated from protobuf enum TO_END_OF_NEXT_MONTH = 37; + */ + const TO_END_OF_NEXT_MONTH = 37; + /** + * Only valid when used in the comparison_date_range field. The complete + * period preceding the date period provided in date_range. + * In the case where date_range is a FixedDateRange of N days, this will + * be a period of N days where the end date is the date preceding the + * start date of the date_range. + * In the case where date_range is a RelativeDateRange, this will be a + * period of the same timeframe preceding the date_range. In the case + * where the date_range does not capture the full period because a report + * is run in the middle of that period, this will still be the full + * preceding period. For example, if date_range is THIS_WEEK, but the + * report is run on a Wednesday, THIS_WEEK will be Monday - Wednesday, but + * PREVIOUS_PERIOD will be Monday - Sunday. + * + * Generated from protobuf enum PREVIOUS_PERIOD = 22; + */ + const PREVIOUS_PERIOD = 22; + /** + * Only valid when used in the comparison_date_range field. The period + * starting 1 year prior to the date period provided in date_range. + * In the case where date_range is a FixedDateRange, this will be a date + * range starting 1 year prior to the date_range start date and ending 1 + * year prior to the date_range end date. + * In the case where date_range is a RelativeDateRange, this will be a + * period of the same timeframe exactly 1 year prior to the date_range. + * In the case where the date_range does not capture the full period + * because a report is run in the middle of that period, this will still + * be the full period 1 year prior. For example, if date range is + * THIS_WEEK, but the report is run on a Wednesday, THIS_WEEK will be + * Monday - Wednesday, but SAME_PERIOD_PREVIOUS_YEAR will be Monday - + * Sunday. + * + * Generated from protobuf enum SAME_PERIOD_PREVIOUS_YEAR = 24; + */ + const SAME_PERIOD_PREVIOUS_YEAR = 24; + + private static $valueToName = [ + self::RELATIVE_DATE_RANGE_UNSPECIFIED => 'RELATIVE_DATE_RANGE_UNSPECIFIED', + self::TODAY => 'TODAY', + self::YESTERDAY => 'YESTERDAY', + self::THIS_WEEK => 'THIS_WEEK', + self::THIS_WEEK_TO_DATE => 'THIS_WEEK_TO_DATE', + self::THIS_MONTH => 'THIS_MONTH', + self::THIS_MONTH_TO_DATE => 'THIS_MONTH_TO_DATE', + self::THIS_QUARTER => 'THIS_QUARTER', + self::THIS_QUARTER_TO_DATE => 'THIS_QUARTER_TO_DATE', + self::THIS_YEAR => 'THIS_YEAR', + self::THIS_YEAR_TO_DATE => 'THIS_YEAR_TO_DATE', + self::LAST_WEEK => 'LAST_WEEK', + self::LAST_MONTH => 'LAST_MONTH', + self::LAST_QUARTER => 'LAST_QUARTER', + self::LAST_YEAR => 'LAST_YEAR', + self::LAST_7_DAYS => 'LAST_7_DAYS', + self::LAST_30_DAYS => 'LAST_30_DAYS', + self::LAST_60_DAYS => 'LAST_60_DAYS', + self::LAST_90_DAYS => 'LAST_90_DAYS', + self::LAST_180_DAYS => 'LAST_180_DAYS', + self::LAST_360_DAYS => 'LAST_360_DAYS', + self::LAST_365_DAYS => 'LAST_365_DAYS', + self::LAST_3_MONTHS => 'LAST_3_MONTHS', + self::LAST_6_MONTHS => 'LAST_6_MONTHS', + self::LAST_12_MONTHS => 'LAST_12_MONTHS', + self::ALL_AVAILABLE => 'ALL_AVAILABLE', + self::TOMORROW => 'TOMORROW', + self::NEXT_90_DAYS => 'NEXT_90_DAYS', + self::NEXT_MONTH => 'NEXT_MONTH', + self::NEXT_3_MONTHS => 'NEXT_3_MONTHS', + self::NEXT_12_MONTHS => 'NEXT_12_MONTHS', + self::NEXT_WEEK => 'NEXT_WEEK', + self::NEXT_QUARTER => 'NEXT_QUARTER', + self::TO_END_OF_NEXT_MONTH => 'TO_END_OF_NEXT_MONTH', + self::PREVIOUS_PERIOD => 'PREVIOUS_PERIOD', + self::SAME_PERIOD_PREVIOUS_YEAR => 'SAME_PERIOD_PREVIOUS_YEAR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/Dimension.php b/AdsAdManager/src/V1/ReportDefinition/Dimension.php new file mode 100644 index 000000000000..99005f0eef46 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/Dimension.php @@ -0,0 +1,6825 @@ +google.ads.admanager.v1.ReportDefinition.Dimension + */ +class Dimension +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum DIMENSION_UNSPECIFIED = 0; + */ + const DIMENSION_UNSPECIFIED = 0; + /** + * The measurement source of a video ad. + * Corresponds to "Active View measurement source value" in the Ad Manager + * UI (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum ACTIVE_VIEW_MEASUREMENT_SOURCE = 575; + */ + const ACTIVE_VIEW_MEASUREMENT_SOURCE = 575; + /** + * Active View measurement source localized name. + * Corresponds to "Active View measurement source" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME = 576; + */ + const ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME = 576; + /** + * Advertiser credit status ENUM + * Corresponds to "Advertiser credit status value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum ADVERTISER_CREDIT_STATUS = 475; + */ + const ADVERTISER_CREDIT_STATUS = 475; + /** + * Advertiser credit status locallized name + * Corresponds to "Advertiser credit status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum ADVERTISER_CREDIT_STATUS_NAME = 476; + */ + const ADVERTISER_CREDIT_STATUS_NAME = 476; + /** + * The domain name of the advertiser. + * Corresponds to "Advertiser domain" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum ADVERTISER_DOMAIN_NAME = 242; + */ + const ADVERTISER_DOMAIN_NAME = 242; + /** + * The ID used in an external system for advertiser identification + * Corresponds to "Advertiser external ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum ADVERTISER_EXTERNAL_ID = 228; + */ + const ADVERTISER_EXTERNAL_ID = 228; + /** + * The ID of an advertiser company assigned to an order + * Corresponds to "Advertiser ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum ADVERTISER_ID = 131; + */ + const ADVERTISER_ID = 131; + /** + * Labels applied to the advertiser + * can be used for either competitive exclusion or ad exclusion + * Corresponds to "Advertiser labels" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum ADVERTISER_LABELS = 230; + */ + const ADVERTISER_LABELS = 230; + /** + * Label ids applied to the advertiser + * can be used for either competitive exclusion or ad exclusion + * Corresponds to "Advertiser label IDs" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER_LIST` + * + * Generated from protobuf enum ADVERTISER_LABEL_IDS = 229; + */ + const ADVERTISER_LABEL_IDS = 229; + /** + * The name of an advertiser company assigned to an order + * Corresponds to "Advertiser" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum ADVERTISER_NAME = 132; + */ + const ADVERTISER_NAME = 132; + /** + * The name of the contact associated with an advertiser company + * Corresponds to "Advertiser primary contact" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum ADVERTISER_PRIMARY_CONTACT = 227; + */ + const ADVERTISER_PRIMARY_CONTACT = 227; + /** + * Advertiser status ENUM + * Corresponds to "Advertiser status value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum ADVERTISER_STATUS = 471; + */ + const ADVERTISER_STATUS = 471; + /** + * Advertiser status locallized name + * Corresponds to "Advertiser status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum ADVERTISER_STATUS_NAME = 472; + */ + const ADVERTISER_STATUS_NAME = 472; + /** + * Advertiser type ENUM + * Corresponds to "Advertiser type value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum ADVERTISER_TYPE = 473; + */ + const ADVERTISER_TYPE = 473; + /** + * Advertiser type locallized name + * Corresponds to "Advertiser type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum ADVERTISER_TYPE_NAME = 474; + */ + const ADVERTISER_TYPE_NAME = 474; + /** + * The category of an advertiser, such as Arts & Entertainment or Travel & + * Tourism. + * Corresponds to "Advertiser vertical" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum ADVERTISER_VERTICAL = 580; + */ + const ADVERTISER_VERTICAL = 580; + /** + * Classification of different Ad Exchange products. + * Corresponds to "Ad Exchange product value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum ADX_PRODUCT = 499; + */ + const ADX_PRODUCT = 499; + /** + * Localized name of the classification of different Ad Exchange + * products. + * Corresponds to "Ad Exchange product" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum ADX_PRODUCT_NAME = 500; + */ + const ADX_PRODUCT_NAME = 500; + /** + * Ad experiences type. + * Corresponds to "Ad experiences value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum AD_EXPERIENCES_TYPE = 641; + */ + const AD_EXPERIENCES_TYPE = 641; + /** + * Localized name of the Ad experiences type. + * Corresponds to "Ad experiences" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AD_EXPERIENCES_TYPE_NAME = 642; + */ + const AD_EXPERIENCES_TYPE_NAME = 642; + /** + * Shows an ENUM value describing whether a given piece of publisher + * inventory was above (ATF) or below the fold (BTF) of a page. + * Corresponds to "Ad location value" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum AD_LOCATION = 390; + */ + const AD_LOCATION = 390; + /** + * Shows a localized string describing whether a given piece of publisher + * inventory was above (ATF) or below the fold (BTF) of a page. + * Corresponds to "Ad location" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AD_LOCATION_NAME = 391; + */ + const AD_LOCATION_NAME = 391; + /** + * The domain of the ad technology provider associated with the bid. + * Corresponds to "Ad technology provider domain" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AD_TECHNOLOGY_PROVIDER_DOMAIN = 620; + */ + const AD_TECHNOLOGY_PROVIDER_DOMAIN = 620; + /** + * The ID of the ad technology provider associated with the bid. + * Corresponds to "Ad technology provider ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_TECHNOLOGY_PROVIDER_ID = 621; + */ + const AD_TECHNOLOGY_PROVIDER_ID = 621; + /** + * The name of the ad technology provider associated with the bid. + * Corresponds to "Ad technology provider" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AD_TECHNOLOGY_PROVIDER_NAME = 622; + */ + const AD_TECHNOLOGY_PROVIDER_NAME = 622; + /** + * Segmentation of ad types. + * Corresponds to "Ad type value" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum AD_TYPE = 497; + */ + const AD_TYPE = 497; + /** + * Localized name of the ad type. + * Corresponds to "Ad type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AD_TYPE_NAME = 498; + */ + const AD_TYPE_NAME = 498; + /** + * The code of the ad unit where the ad was requested. + * Corresponds to "Ad unit code" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + * `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE = 64; + */ + const AD_UNIT_CODE = 64; + /** + * The code of the first level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 1" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_1 = 65; + */ + const AD_UNIT_CODE_LEVEL_1 = 65; + /** + * The code of the tenth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 10" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_10 = 74; + */ + const AD_UNIT_CODE_LEVEL_10 = 74; + /** + * The code of the eleventh level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 11" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_11 = 75; + */ + const AD_UNIT_CODE_LEVEL_11 = 75; + /** + * The code of the twelfth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 12" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_12 = 76; + */ + const AD_UNIT_CODE_LEVEL_12 = 76; + /** + * The code of the thirteenth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 13" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_13 = 77; + */ + const AD_UNIT_CODE_LEVEL_13 = 77; + /** + * The code of the fourteenth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 14" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_14 = 78; + */ + const AD_UNIT_CODE_LEVEL_14 = 78; + /** + * The code of the fifteenth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 15" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_15 = 79; + */ + const AD_UNIT_CODE_LEVEL_15 = 79; + /** + * The code of the sixteenth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 16" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_16 = 80; + */ + const AD_UNIT_CODE_LEVEL_16 = 80; + /** + * The code of the second level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 2" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_2 = 66; + */ + const AD_UNIT_CODE_LEVEL_2 = 66; + /** + * The code of the third level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 3" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_3 = 67; + */ + const AD_UNIT_CODE_LEVEL_3 = 67; + /** + * The code of the fourth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 4" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_4 = 68; + */ + const AD_UNIT_CODE_LEVEL_4 = 68; + /** + * The code of the fifth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 5" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_5 = 69; + */ + const AD_UNIT_CODE_LEVEL_5 = 69; + /** + * The code of the sixth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 6" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_6 = 70; + */ + const AD_UNIT_CODE_LEVEL_6 = 70; + /** + * The code of the seventh level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 7" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_7 = 71; + */ + const AD_UNIT_CODE_LEVEL_7 = 71; + /** + * The code of the eighth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 8" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_8 = 72; + */ + const AD_UNIT_CODE_LEVEL_8 = 72; + /** + * The code of the ninth level ad unit of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit code level 9" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_CODE_LEVEL_9 = 73; + */ + const AD_UNIT_CODE_LEVEL_9 = 73; + /** + * The ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + * `REACH` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID = 25; + */ + const AD_UNIT_ID = 25; + /** + * The full hierarchy of ad unit IDs where the ad was requested, from + * root to leaf, excluding the root ad unit ID. + * Corresponds to "Ad unit ID (all levels)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + * `REACH` + * Data format: `IDENTIFIER_LIST` + * + * Generated from protobuf enum AD_UNIT_ID_ALL_LEVEL = 27; + */ + const AD_UNIT_ID_ALL_LEVEL = 27; + /** + * The first level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 1" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_1 = 30; + */ + const AD_UNIT_ID_LEVEL_1 = 30; + /** + * The tenth level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 10" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_10 = 48; + */ + const AD_UNIT_ID_LEVEL_10 = 48; + /** + * The eleventh level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 11" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_11 = 50; + */ + const AD_UNIT_ID_LEVEL_11 = 50; + /** + * The twelfth level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 12" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_12 = 52; + */ + const AD_UNIT_ID_LEVEL_12 = 52; + /** + * The thirteenth level ad unit ID of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit ID level 13" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_13 = 54; + */ + const AD_UNIT_ID_LEVEL_13 = 54; + /** + * The fourteenth level ad unit ID of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit ID level 14" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_14 = 56; + */ + const AD_UNIT_ID_LEVEL_14 = 56; + /** + * The fifteenth level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 15" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_15 = 58; + */ + const AD_UNIT_ID_LEVEL_15 = 58; + /** + * The sixteenth level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 16" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_16 = 60; + */ + const AD_UNIT_ID_LEVEL_16 = 60; + /** + * The second level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 2" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_2 = 32; + */ + const AD_UNIT_ID_LEVEL_2 = 32; + /** + * The third level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 3" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_3 = 34; + */ + const AD_UNIT_ID_LEVEL_3 = 34; + /** + * The fourth level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 4" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_4 = 36; + */ + const AD_UNIT_ID_LEVEL_4 = 36; + /** + * The fifth level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 5" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_5 = 38; + */ + const AD_UNIT_ID_LEVEL_5 = 38; + /** + * The sixth level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 6" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_6 = 40; + */ + const AD_UNIT_ID_LEVEL_6 = 40; + /** + * The seventh level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 7" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_7 = 42; + */ + const AD_UNIT_ID_LEVEL_7 = 42; + /** + * The eighth level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 8" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_8 = 44; + */ + const AD_UNIT_ID_LEVEL_8 = 44; + /** + * The ninth level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID level 9" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_LEVEL_9 = 46; + */ + const AD_UNIT_ID_LEVEL_9 = 46; + /** + * The top-level ad unit ID of the ad unit where the ad was requested. + * Corresponds to "Ad unit ID (top level)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AD_UNIT_ID_TOP_LEVEL = 142; + */ + const AD_UNIT_ID_TOP_LEVEL = 142; + /** + * The name of the ad unit where the ad was requested. + * Corresponds to "Ad unit" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + * `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME = 26; + */ + const AD_UNIT_NAME = 26; + /** + * The full hierarchy of ad unit names where the ad was requested, from + * root to leaf, excluding the root ad unit name. + * Corresponds to "Ad unit (all levels)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + * `REACH` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum AD_UNIT_NAME_ALL_LEVEL = 29; + */ + const AD_UNIT_NAME_ALL_LEVEL = 29; + /** + * The first level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 1" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_1 = 31; + */ + const AD_UNIT_NAME_LEVEL_1 = 31; + /** + * The tenth level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 10" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_10 = 49; + */ + const AD_UNIT_NAME_LEVEL_10 = 49; + /** + * The eleventh level ad unit name of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit level 11" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_11 = 51; + */ + const AD_UNIT_NAME_LEVEL_11 = 51; + /** + * The twelfth level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 12" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_12 = 53; + */ + const AD_UNIT_NAME_LEVEL_12 = 53; + /** + * The thirteenth level ad unit name of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit level 13" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_13 = 55; + */ + const AD_UNIT_NAME_LEVEL_13 = 55; + /** + * The fourteenth level ad unit name of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit level 14" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_14 = 57; + */ + const AD_UNIT_NAME_LEVEL_14 = 57; + /** + * The fifteenth level ad unit name of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit level 15" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_15 = 59; + */ + const AD_UNIT_NAME_LEVEL_15 = 59; + /** + * The sixteenth level ad unit name of the ad unit where the ad was + * requested. + * Corresponds to "Ad unit level 16" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_16 = 61; + */ + const AD_UNIT_NAME_LEVEL_16 = 61; + /** + * The second level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 2" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_2 = 33; + */ + const AD_UNIT_NAME_LEVEL_2 = 33; + /** + * The third level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 3" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_3 = 35; + */ + const AD_UNIT_NAME_LEVEL_3 = 35; + /** + * The fourth level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 4" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_4 = 37; + */ + const AD_UNIT_NAME_LEVEL_4 = 37; + /** + * The fifth level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 5" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_5 = 39; + */ + const AD_UNIT_NAME_LEVEL_5 = 39; + /** + * The sixth level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 6" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_6 = 41; + */ + const AD_UNIT_NAME_LEVEL_6 = 41; + /** + * The seventh level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 7" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_7 = 43; + */ + const AD_UNIT_NAME_LEVEL_7 = 43; + /** + * The eighth level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 8" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_8 = 45; + */ + const AD_UNIT_NAME_LEVEL_8 = 45; + /** + * The ninth level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit level 9" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_LEVEL_9 = 47; + */ + const AD_UNIT_NAME_LEVEL_9 = 47; + /** + * The top-level ad unit name of the ad unit where the ad was requested. + * Corresponds to "Ad unit (top level)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_NAME_TOP_LEVEL = 143; + */ + const AD_UNIT_NAME_TOP_LEVEL = 143; + /** + * The reward amount of the ad unit where the ad was requested. + * Corresponds to "Ad unit reward amount" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + * `REACH` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_UNIT_REWARD_AMOUNT = 63; + */ + const AD_UNIT_REWARD_AMOUNT = 63; + /** + * The reward type of the ad unit where the ad was requested. + * Corresponds to "Ad unit reward type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED`, + * `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_REWARD_TYPE = 62; + */ + const AD_UNIT_REWARD_TYPE = 62; + /** + * The status of the ad unit + * Corresponds to "Ad unit status value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum AD_UNIT_STATUS = 206; + */ + const AD_UNIT_STATUS = 206; + /** + * The name of the status of the ad unit + * Corresponds to "Ad unit status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum AD_UNIT_STATUS_NAME = 207; + */ + const AD_UNIT_STATUS_NAME = 207; + /** + * The ID of an agency at level 1 of agency hierarchy. + * Corresponds to "Agency ID (Level 1)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AGENCY_LEVEL_1_ID = 565; + */ + const AGENCY_LEVEL_1_ID = 565; + /** + * The name of an agency at level 1 of agency hierarchy. + * Corresponds to "Agency (Level 1)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AGENCY_LEVEL_1_NAME = 566; + */ + const AGENCY_LEVEL_1_NAME = 566; + /** + * The ID of an agency at level 2 of agency hierarchy. + * Corresponds to "Agency ID (Level 2)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AGENCY_LEVEL_2_ID = 567; + */ + const AGENCY_LEVEL_2_ID = 567; + /** + * The name of an agency at level 2 of agency hierarchy. + * Corresponds to "Agency (Level 2)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AGENCY_LEVEL_2_NAME = 568; + */ + const AGENCY_LEVEL_2_NAME = 568; + /** + * The ID of an agency at level 3 of agency hierarchy. + * Corresponds to "Agency ID (Level 3)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AGENCY_LEVEL_3_ID = 569; + */ + const AGENCY_LEVEL_3_ID = 569; + /** + * The name of an agency at level 3 of agency hierarchy. + * Corresponds to "Agency (Level 3)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AGENCY_LEVEL_3_NAME = 570; + */ + const AGENCY_LEVEL_3_NAME = 570; + /** + * User age bracket enum. + * Corresponds to "Age bracket value" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum AGE_BRACKET = 508; + */ + const AGE_BRACKET = 508; + /** + * Localized user age bracket returned from Google Analytics. For example, + * "18-24", "25-34", "35-44", "45-54", "55-64", "65+". + * Corresponds to "Age bracket" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AGE_BRACKET_NAME = 582; + */ + const AGE_BRACKET_NAME = 582; + /** + * Enum value for App Tracking Transparency consent status. + * Corresponds to "App Tracking Transparency consent status value" in the Ad + * Manager UI (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum APP_TRACKING_TRANSPARENCY_CONSENT_STATUS = 442; + */ + const APP_TRACKING_TRANSPARENCY_CONSENT_STATUS = 442; + /** + * Localized string value for App Tracking Transparency consent status. + * Corresponds to "App Tracking Transparency consent status" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME = 443; + */ + const APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME = 443; + /** + * The app version. + * Corresponds to "App version" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum APP_VERSION = 392; + */ + const APP_VERSION = 392; + /** + * The name of Auction Package deal + * Corresponds to "Auction package deal" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AUCTION_PACKAGE_DEAL = 579; + */ + const AUCTION_PACKAGE_DEAL = 579; + /** + * The ID of Auction Package deal + * Corresponds to "Auction package deal ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AUCTION_PACKAGE_DEAL_ID = 571; + */ + const AUCTION_PACKAGE_DEAL_ID = 571; + /** + * ID of targeted audience segment, including all first-party and + * third-party segments that matched the user on the winning line item. + * Corresponds to "Audience segment ID (targeted)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum AUDIENCE_SEGMENT_ID_TARGETED = 584; + */ + const AUDIENCE_SEGMENT_ID_TARGETED = 584; + /** + * Name of targeted audience segment, including all first-party and + * third-party segments that matched the user on the winning line item. + * Corresponds to "Audience segment (targeted)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AUDIENCE_SEGMENT_TARGETED = 585; + */ + const AUDIENCE_SEGMENT_TARGETED = 585; + /** + * Enum value of Auto refreshed traffic. + * Corresponds to "Auto refreshed traffic value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum AUTO_REFRESHED_TRAFFIC = 421; + */ + const AUTO_REFRESHED_TRAFFIC = 421; + /** + * Indicates if the traffic is from auto-refreshed ad requests. + * Corresponds to "Auto refreshed traffic" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum AUTO_REFRESHED_TRAFFIC_NAME = 422; + */ + const AUTO_REFRESHED_TRAFFIC_NAME = 422; + /** + * The encrypted version of BIDDER_ID. + * Corresponds to "Bidder encrypted ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum BIDDER_ENCRYPTED_ID = 493; + */ + const BIDDER_ENCRYPTED_ID = 493; + /** + * The name of the bidder. + * Corresponds to "Bidder" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum BIDDER_NAME = 494; + */ + const BIDDER_NAME = 494; + /** + * The cpm range within which a bid falls. + * Corresponds to "Bid Range" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `BID_RANGE` + * + * Generated from protobuf enum BID_RANGE = 679; + */ + const BID_RANGE = 679; + /** + * The reason a bid was rejected. + * Corresponds to "Bid rejection reason value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum BID_REJECTION_REASON = 599; + */ + const BID_REJECTION_REASON = 599; + /** + * The localized name of the reason a bid was rejected. + * Corresponds to "Bid rejection reason" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum BID_REJECTION_REASON_NAME = 600; + */ + const BID_REJECTION_REASON_NAME = 600; + /** + * The amount of information about the Publisher's page sent to the buyer + * who purchased the impressions. + * Corresponds to "Branding type value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum BRANDING_TYPE = 383; + */ + const BRANDING_TYPE = 383; + /** + * The localized version of branding type, the amount of information about + * the Publisher's page sent to the buyer who purchased the impressions. + * Corresponds to "Branding type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum BRANDING_TYPE_NAME = 384; + */ + const BRANDING_TYPE_NAME = 384; + /** + * Browser category. + * Corresponds to "Browser category value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `ENUM` + * + * Generated from protobuf enum BROWSER_CATEGORY = 119; + */ + const BROWSER_CATEGORY = 119; + /** + * Browser category name. + * Corresponds to "Browser category" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum BROWSER_CATEGORY_NAME = 120; + */ + const BROWSER_CATEGORY_NAME = 120; + /** + * The ID of the browser. + * Corresponds to "Browser ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum BROWSER_ID = 235; + */ + const BROWSER_ID = 235; + /** + * The name of the browser. + * Corresponds to "Browser" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum BROWSER_NAME = 236; + */ + const BROWSER_NAME = 236; + /** + * The ID of the buyer network. + * Corresponds to "Buyer network ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum BUYER_NETWORK_ID = 448; + */ + const BUYER_NETWORK_ID = 448; + /** + * The name of the buyer network. + * Corresponds to "Buyer network" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum BUYER_NETWORK_NAME = 449; + */ + const BUYER_NETWORK_NAME = 449; + /** + * The callout status category in the Ads traffic navigator report. + * Corresponds to "Callout status category value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: + * Data format: `ENUM` + * + * Generated from protobuf enum CALLOUT_STATUS_CATEGORY = 588; + */ + const CALLOUT_STATUS_CATEGORY = 588; + /** + * The callout status category name in the Ads traffic navigator report. + * Corresponds to "Callout status category" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `STRING` + * + * Generated from protobuf enum CALLOUT_STATUS_CATEGORY_NAME = 589; + */ + const CALLOUT_STATUS_CATEGORY_NAME = 589; + /** + * Mobile carrier ID. + * Corresponds to "Carrier ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CARRIER_ID = 369; + */ + const CARRIER_ID = 369; + /** + * Name of the mobile carrier. + * Corresponds to "Carrier" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CARRIER_NAME = 368; + */ + const CARRIER_NAME = 368; + /** + * Inventory segmentation by channel. + * Corresponds to "Channel" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CHANNEL = 501; + */ + const CHANNEL = 501; + /** + * Child Publisher Network Code + * Corresponds to "Child network code" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CHILD_NETWORK_CODE = 542; + */ + const CHILD_NETWORK_CODE = 542; + /** + * Child Publisher Network ID + * Corresponds to "Child network ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CHILD_NETWORK_ID = 544; + */ + const CHILD_NETWORK_ID = 544; + /** + * Child Partner Network Name + * Corresponds to "Child network" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CHILD_PARTNER_NAME = 543; + */ + const CHILD_PARTNER_NAME = 543; + /** + * The criteria ID of the city in which the ad served. + * Corresponds to "City ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CITY_ID = 459; + */ + const CITY_ID = 459; + /** + * The name of the city in which the ad served. + * Corresponds to "City" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum CITY_NAME = 452; + */ + const CITY_NAME = 452; + /** + * The ID of an advertiser, classified by Google, associated with a creative + * transacted + * Corresponds to "Advertiser ID (classified)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CLASSIFIED_ADVERTISER_ID = 133; + */ + const CLASSIFIED_ADVERTISER_ID = 133; + /** + * The name of an advertiser, classified by Google, associated with a + * creative transacted + * Corresponds to "Advertiser (classified)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum CLASSIFIED_ADVERTISER_NAME = 134; + */ + const CLASSIFIED_ADVERTISER_NAME = 134; + /** + * ID of the brand, as classified by Google, + * Corresponds to "Brand ID (classified)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CLASSIFIED_BRAND_ID = 243; + */ + const CLASSIFIED_BRAND_ID = 243; + /** + * Name of the brand, as classified by Google, + * Corresponds to "Brand (classified)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum CLASSIFIED_BRAND_NAME = 244; + */ + const CLASSIFIED_BRAND_NAME = 244; + /** + * The display name of the CMS content. + * Corresponds to "Content source name" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CONTENT_CMS_NAME = 643; + */ + const CONTENT_CMS_NAME = 643; + /** + * The CMS content ID of the video content. + * Corresponds to "ID of the video in the content source" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CONTENT_CMS_VIDEO_ID = 644; + */ + const CONTENT_CMS_VIDEO_ID = 644; + /** + * ID of the video content served. + * Corresponds to "Content ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CONTENT_ID = 246; + */ + const CONTENT_ID = 246; + /** + * Content mapping presence ENUM value + * Corresponds to "Content mapping presence value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum CONTENT_MAPPING_PRESENCE = 731; + */ + const CONTENT_MAPPING_PRESENCE = 731; + /** + * Content mapping presence name + * Corresponds to "Content mapping presence" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CONTENT_MAPPING_PRESENCE_NAME = 732; + */ + const CONTENT_MAPPING_PRESENCE_NAME = 732; + /** + * Name of the video content served. + * Corresponds to "Content" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CONTENT_NAME = 247; + */ + const CONTENT_NAME = 247; + /** + * The continent in which the ad served (derived from country). + * Corresponds to "Continent value" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum CONTINENT = 469; + */ + const CONTINENT = 469; + /** + * The name of the continent in which the ad served (derived from country). + * Corresponds to "Continent" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CONTINENT_NAME = 470; + */ + const CONTINENT_NAME = 470; + /** + * The ISO code of the country in which the ad served. + * Corresponds to "Country code" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `PRIVACY_AND_MESSAGING`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum COUNTRY_CODE = 466; + */ + const COUNTRY_CODE = 466; + /** + * The criteria ID of the country in which the ad served. + * Corresponds to "Country ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `PRIVACY_AND_MESSAGING`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum COUNTRY_ID = 11; + */ + const COUNTRY_ID = 11; + /** + * The name of the country in which the ad served. + * Corresponds to "Country" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `PRIVACY_AND_MESSAGING`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum COUNTRY_NAME = 12; + */ + const COUNTRY_NAME = 12; + /** + * Enum value of creative billing type + * Corresponds to "Creative billing type value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum CREATIVE_BILLING_TYPE = 366; + */ + const CREATIVE_BILLING_TYPE = 366; + /** + * Localized string value of creative billing type + * Corresponds to "Creative billing type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_BILLING_TYPE_NAME = 367; + */ + const CREATIVE_BILLING_TYPE_NAME = 367; + /** + * Represents the click-through URL of a creative + * Corresponds to "Creative click through url" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_CLICK_THROUGH_URL = 174; + */ + const CREATIVE_CLICK_THROUGH_URL = 174; + /** + * The ID of a creative + * Corresponds to "Creative ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CREATIVE_ID = 138; + */ + const CREATIVE_ID = 138; + /** + * Creative name + * Corresponds to "Creative" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_NAME = 139; + */ + const CREATIVE_NAME = 139; + /** + * Creative Policies filtering. + * Corresponds to "Creative policies filtering value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum CREATIVE_POLICIES_FILTERING = 711; + */ + const CREATIVE_POLICIES_FILTERING = 711; + /** + * Localized name of the Creative Policies filtering. + * Corresponds to "Creative policies filtering" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_POLICIES_FILTERING_NAME = 712; + */ + const CREATIVE_POLICIES_FILTERING_NAME = 712; + /** + * Creative Protections filtering (Publisher Blocks Enforcement). + * Corresponds to "Creative protections filtering value" in the Ad Manager + * UI (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum CREATIVE_PROTECTIONS_FILTERING = 704; + */ + const CREATIVE_PROTECTIONS_FILTERING = 704; + /** + * Localized name of the Creative Protections filtering. + * Corresponds to "Creative protections filtering" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_PROTECTIONS_FILTERING_NAME = 705; + */ + const CREATIVE_PROTECTIONS_FILTERING_NAME = 705; + /** + * ENUM describing whether the creative is part of a creative set and if so, + * what its role in the creative set is. + * Corresponds to "Creative set role type value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum CREATIVE_SET_ROLE_TYPE = 686; + */ + const CREATIVE_SET_ROLE_TYPE = 686; + /** + * Localized name describing whether the creative is part of a creative set + * and if so, what its role in the creative set is. + * Corresponds to "Creative set role type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_SET_ROLE_TYPE_NAME = 687; + */ + const CREATIVE_SET_ROLE_TYPE_NAME = 687; + /** + * Creative technology ENUM + * Corresponds to "Creative technology value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum CREATIVE_TECHNOLOGY = 148; + */ + const CREATIVE_TECHNOLOGY = 148; + /** + * Creative technology locallized name + * Corresponds to "Creative technology" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_TECHNOLOGY_NAME = 149; + */ + const CREATIVE_TECHNOLOGY_NAME = 149; + /** + * Third party vendor name of a creative + * Corresponds to "Creative third party vendor" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_THIRD_PARTY_VENDOR = 361; + */ + const CREATIVE_THIRD_PARTY_VENDOR = 361; + /** + * Enum value of creative type + * Corresponds to "Creative type value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum CREATIVE_TYPE = 344; + */ + const CREATIVE_TYPE = 344; + /** + * Localized string name of creative type + * Corresponds to "Creative type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_TYPE_NAME = 345; + */ + const CREATIVE_TYPE_NAME = 345; + /** + * Creative vendor ID. + * Corresponds to "Creative vendor ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CREATIVE_VENDOR_ID = 706; + */ + const CREATIVE_VENDOR_ID = 706; + /** + * Name of the Creative vendor. + * Corresponds to "Creative vendor" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_VENDOR_NAME = 707; + */ + const CREATIVE_VENDOR_NAME = 707; + /** + * The third party where Google Ad Manager was redirected for the creative, + * based on the domain. + * Corresponds to "Creative video redirect third party" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CREATIVE_VIDEO_REDIRECT_THIRD_PARTY = 562; + */ + const CREATIVE_VIDEO_REDIRECT_THIRD_PARTY = 562; + /** + * The ID of a Curation partner + * Corresponds to "Curation partner ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CURATOR_ID = 572; + */ + const CURATOR_ID = 572; + /** + * The name of a Curation partner + * Corresponds to "Curation partner" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CURATOR_NAME = 573; + */ + const CURATOR_NAME = 573; + /** + * Custom event ID + * Corresponds to "Custom event id" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CUSTOM_EVENT_ID = 737; + */ + const CUSTOM_EVENT_ID = 737; + /** + * Custom event name + * Corresponds to "Custom event" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CUSTOM_EVENT_NAME = 735; + */ + const CUSTOM_EVENT_NAME = 735; + /** + * Custom event type + * Corresponds to "Custom event type value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum CUSTOM_EVENT_TYPE = 736; + */ + const CUSTOM_EVENT_TYPE = 736; + /** + * Localized name of the custom event type + * Corresponds to "Custom event type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CUSTOM_EVENT_TYPE_NAME = 738; + */ + const CUSTOM_EVENT_TYPE_NAME = 738; + /** + * The ID of an ad spot. An ad spot can be added to an ad break template, as + * well as directly targeted by a video line item. + * Corresponds to "Custom spot ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum CUSTOM_SPOT_ID = 423; + */ + const CUSTOM_SPOT_ID = 423; + /** + * The name of an ad spot. An ad spot can be added to an ad break + * template, as well as directly targeted by a video line item. + * Corresponds to "Custom spot" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum CUSTOM_SPOT_NAME = 424; + */ + const CUSTOM_SPOT_NAME = 424; + /** + * Breaks down reporting data by date. + * Corresponds to "Date" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `PRIVACY_AND_MESSAGING`, `AD_SPEED` + * Data format: `DATE` + * + * Generated from protobuf enum DATE = 3; + */ + const DATE = 3; + /** + * Breaks down reporting data by day of the week. Monday is 1 and 7 is + * Sunday. + * Corresponds to "Day of week" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum DAY_OF_WEEK = 4; + */ + const DAY_OF_WEEK = 4; + /** + * The ID of the buyer of a deal. + * Corresponds to "Deal buyer ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum DEAL_BUYER_ID = 240; + */ + const DEAL_BUYER_ID = 240; + /** + * The name of the buyer of a deal. + * Corresponds to "Deal buyer" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum DEAL_BUYER_NAME = 241; + */ + const DEAL_BUYER_NAME = 241; + /** + * Deal ID + * Corresponds to "Deal ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum DEAL_ID = 436; + */ + const DEAL_ID = 436; + /** + * Deal name + * Corresponds to "Deal" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum DEAL_NAME = 437; + */ + const DEAL_NAME = 437; + /** + * The ID of the secure signals that were sent to the bidder who won the + * impression. + * Corresponds to "Secure signal ID (delivered)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum DELIVERED_SECURE_SIGNAL_ID = 309; + */ + const DELIVERED_SECURE_SIGNAL_ID = 309; + /** + * The name of the secure signals that were sent to the bidder who won the + * impression. + * Corresponds to "Secure signal name (delivered)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum DELIVERED_SECURE_SIGNAL_NAME = 310; + */ + const DELIVERED_SECURE_SIGNAL_NAME = 310; + /** + * Demand channel. + * Corresponds to "Demand channel value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum DEMAND_CHANNEL = 9; + */ + const DEMAND_CHANNEL = 9; + /** + * Demand channel name. + * Corresponds to "Demand channel" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum DEMAND_CHANNEL_NAME = 10; + */ + const DEMAND_CHANNEL_NAME = 10; + /** + * Demand source. + * Corresponds to "Demand source value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: + * Data format: `ENUM` + * + * Generated from protobuf enum DEMAND_SOURCE = 592; + */ + const DEMAND_SOURCE = 592; + /** + * Demand source name. + * Corresponds to "Demand source" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `STRING` + * + * Generated from protobuf enum DEMAND_SOURCE_NAME = 593; + */ + const DEMAND_SOURCE_NAME = 593; + /** + * Demand subchannel. + * Corresponds to "Demand subchannel value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum DEMAND_SUBCHANNEL = 22; + */ + const DEMAND_SUBCHANNEL = 22; + /** + * Demand subchannel name. + * Corresponds to "Demand subchannel" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum DEMAND_SUBCHANNEL_NAME = 23; + */ + const DEMAND_SUBCHANNEL_NAME = 23; + /** + * The device on which an ad was served. + * Corresponds to "Device value" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum DEVICE = 226; + */ + const DEVICE = 226; + /** + * The device category to which an ad is being targeted. + * Corresponds to "Device category value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL`, + * `PRIVACY_AND_MESSAGING`, `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum DEVICE_CATEGORY = 15; + */ + const DEVICE_CATEGORY = 15; + /** + * The name of the category of device (smartphone, feature phone, tablet, or + * desktop) to which an ad is being targeted. + * Corresponds to "Device category" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, + * `PRIVACY_AND_MESSAGING`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum DEVICE_CATEGORY_NAME = 16; + */ + const DEVICE_CATEGORY_NAME = 16; + /** + * Device manufacturer ID + * Corresponds to "Device manufacturer ID" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum DEVICE_MANUFACTURER_ID = 525; + */ + const DEVICE_MANUFACTURER_ID = 525; + /** + * Device manufacturer name + * Corresponds to "Device manufacturer" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum DEVICE_MANUFACTURER_NAME = 526; + */ + const DEVICE_MANUFACTURER_NAME = 526; + /** + * Device model ID + * Corresponds to "Device model ID" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum DEVICE_MODEL_ID = 527; + */ + const DEVICE_MODEL_ID = 527; + /** + * Device model name + * Corresponds to "Device model" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum DEVICE_MODEL_NAME = 528; + */ + const DEVICE_MODEL_NAME = 528; + /** + * The localized name of the device on which an ad was served. + * Corresponds to "Device" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum DEVICE_NAME = 225; + */ + const DEVICE_NAME = 225; + /** + * The ID of DSP Seat + * Corresponds to "DSP seat ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum DSP_SEAT_ID = 564; + */ + const DSP_SEAT_ID = 564; + /** + * Categorization of inventory sources based on AdX dynamic allocation + * backfill type. + * Corresponds to "Dynamic allocation value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum DYNAMIC_ALLOCATION_TYPE = 502; + */ + const DYNAMIC_ALLOCATION_TYPE = 502; + /** + * Localized name of the dynamic allocation type. + * Corresponds to "Dynamic allocation" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum DYNAMIC_ALLOCATION_TYPE_NAME = 503; + */ + const DYNAMIC_ALLOCATION_TYPE_NAME = 503; + /** + * Status of Encrypted Signals for Publishers delivery. + * Corresponds to "Secure signal delivery value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum ESP_DELIVERY = 623; + */ + const ESP_DELIVERY = 623; + /** + * Localized name of the ESP delivery status. + * Corresponds to "Secure signal delivery" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum ESP_DELIVERY_NAME = 624; + */ + const ESP_DELIVERY_NAME = 624; + /** + * Whether Encrypted Signals for Publishers are present on the ad request. + * Corresponds to "Secure signal presence value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum ESP_PRESENCE = 625; + */ + const ESP_PRESENCE = 625; + /** + * Localized name of the ESP presence status. + * Corresponds to "Secure signal presence" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum ESP_PRESENCE_NAME = 626; + */ + const ESP_PRESENCE_NAME = 626; + /** + * Exchange bidding deal ID. + * Corresponds to "Exchange bidding deal id" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum EXCHANGE_BIDDING_DEAL_ID = 715; + */ + const EXCHANGE_BIDDING_DEAL_ID = 715; + /** + * Exchange bidding deal type. + * Corresponds to "Exchange bidding deal type value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum EXCHANGE_BIDDING_DEAL_TYPE = 714; + */ + const EXCHANGE_BIDDING_DEAL_TYPE = 714; + /** + * Localized name of the exchange bidding deal type. + * Corresponds to "Exchange bidding deal type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum EXCHANGE_BIDDING_DEAL_TYPE_NAME = 723; + */ + const EXCHANGE_BIDDING_DEAL_TYPE_NAME = 723; + /** + * ID of the yield partner as classified by Google + * Corresponds to "Yield partner ID (classified)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum EXCHANGE_THIRD_PARTY_COMPANY_ID = 185; + */ + const EXCHANGE_THIRD_PARTY_COMPANY_ID = 185; + /** + * Name of the yield partner as classified by Google + * Corresponds to "Yield partner (classified)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum EXCHANGE_THIRD_PARTY_COMPANY_NAME = 186; + */ + const EXCHANGE_THIRD_PARTY_COMPANY_NAME = 186; + /** + * The ID of the first look pricing rule. + * Corresponds to "First look pricing rule ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum FIRST_LOOK_PRICING_RULE_ID = 248; + */ + const FIRST_LOOK_PRICING_RULE_ID = 248; + /** + * The name of the first look pricing rule. + * Corresponds to "First look pricing rule" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum FIRST_LOOK_PRICING_RULE_NAME = 249; + */ + const FIRST_LOOK_PRICING_RULE_NAME = 249; + /** + * Whether a first-party user identifier was present on a given + * ad-request. + * Corresponds to "First-party ID status value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum FIRST_PARTY_ID_STATUS = 404; + */ + const FIRST_PARTY_ID_STATUS = 404; + /** + * The localized name of whether a first-party user identifier was present + * on a given ad-request. + * Corresponds to "First-party ID status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum FIRST_PARTY_ID_STATUS_NAME = 405; + */ + const FIRST_PARTY_ID_STATUS_NAME = 405; + /** + * User gender enum value returned from Google Analytics. + * Corresponds to "Gender value" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum GENDER = 509; + */ + const GENDER = 509; + /** + * Localized user gender returned from Google Analytics. For example, + * "male", "female". + * Corresponds to "Gender" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum GENDER_NAME = 583; + */ + const GENDER_NAME = 583; + /** + * The ID of a Google Analytics stream. For example, web site or mobile app + * Corresponds to "Google Analytics stream ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum GOOGLE_ANALYTICS_STREAM_ID = 519; + */ + const GOOGLE_ANALYTICS_STREAM_ID = 519; + /** + * The name of a Google Analytics stream. For example, + * web site or mobile app. + * Corresponds to "Google Analytics stream" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum GOOGLE_ANALYTICS_STREAM_NAME = 520; + */ + const GOOGLE_ANALYTICS_STREAM_NAME = 520; + /** + * The ID of the header bidding trafficking yield partner. + * Corresponds to "Yield partner ID (header bidding trafficking)" in the Ad + * Manager UI (when showing API fields). + * Compatible with the following report types: + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum HBT_YIELD_PARTNER_ID = 659; + */ + const HBT_YIELD_PARTNER_ID = 659; + /** + * The name of the header bidding trafficking yield partner. + * Corresponds to "Yield partner (header bidding trafficking)" in the Ad + * Manager UI. + * Compatible with the following report types: + * Data format: `STRING` + * + * Generated from protobuf enum HBT_YIELD_PARTNER_NAME = 660; + */ + const HBT_YIELD_PARTNER_NAME = 660; + /** + * Header Bidder integration type. + * Corresponds to "Header bidder integration type value" in the Ad Manager + * UI (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum HEADER_BIDDER_INTEGRATION_TYPE = 718; + */ + const HEADER_BIDDER_INTEGRATION_TYPE = 718; + /** + * Localized name of the Header Bidder integration type. + * Corresponds to "Header bidder integration type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum HEADER_BIDDER_INTEGRATION_TYPE_NAME = 719; + */ + const HEADER_BIDDER_INTEGRATION_TYPE_NAME = 719; + /** + * Breaks down reporting data by hour in one day. + * Corresponds to "Hour" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum HOUR = 100; + */ + const HOUR = 100; + /** + * Impression Counting Method ENUM. + * Corresponds to "Impression counting method value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum IMPRESSION_COUNTING_METHOD = 577; + */ + const IMPRESSION_COUNTING_METHOD = 577; + /** + * Localized impression counting method name. + * Corresponds to "Impression counting method" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum IMPRESSION_COUNTING_METHOD_NAME = 578; + */ + const IMPRESSION_COUNTING_METHOD_NAME = 578; + /** + * The interaction type of an ad. + * Corresponds to "Interaction type value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum INTERACTION_TYPE = 223; + */ + const INTERACTION_TYPE = 223; + /** + * The localized name of the interaction type of an ad. + * Corresponds to "Interaction type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum INTERACTION_TYPE_NAME = 224; + */ + const INTERACTION_TYPE_NAME = 224; + /** + * User interest returned from Google Analytics. + * Corresponds to "Interests" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum INTEREST = 510; + */ + const INTEREST = 510; + /** + * Inventory format. + * The format of the ad unit (e.g, banner) where the ad was requested. + * Corresponds to "Inventory format value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum INVENTORY_FORMAT = 17; + */ + const INVENTORY_FORMAT = 17; + /** + * Inventory format name. + * The format of the ad unit (e.g, banner) where the ad was requested. + * Corresponds to "Inventory format" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum INVENTORY_FORMAT_NAME = 18; + */ + const INVENTORY_FORMAT_NAME = 18; + /** + * The ID of the inventory share assignment. + * Corresponds to "Inventory share assignment ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum INVENTORY_SHARE_ASSIGNMENT_ID = 648; + */ + const INVENTORY_SHARE_ASSIGNMENT_ID = 648; + /** + * The name of the inventory share assignment. + * Corresponds to "Inventory share assignment" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum INVENTORY_SHARE_ASSIGNMENT_NAME = 649; + */ + const INVENTORY_SHARE_ASSIGNMENT_NAME = 649; + /** + * The result of an inventory share. + * Corresponds to "Inventory share outcome value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum INVENTORY_SHARE_OUTCOME = 603; + */ + const INVENTORY_SHARE_OUTCOME = 603; + /** + * The localized name of the result of an inventory share. + * Corresponds to "Inventory share outcome" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum INVENTORY_SHARE_OUTCOME_NAME = 604; + */ + const INVENTORY_SHARE_OUTCOME_NAME = 604; + /** + * The partner ad server of the inventory share. + * Corresponds to "Inventory share partner ad server value" in the Ad + * Manager UI (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum INVENTORY_SHARE_PARTNER_AD_SERVER = 652; + */ + const INVENTORY_SHARE_PARTNER_AD_SERVER = 652; + /** + * The localized name of the partner ad server. + * Corresponds to "Inventory share partner ad server" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum INVENTORY_SHARE_PARTNER_AD_SERVER_NAME = 653; + */ + const INVENTORY_SHARE_PARTNER_AD_SERVER_NAME = 653; + /** + * The target share percent of the inventory share assignment + * Corresponds to "Partner target share percent" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum INVENTORY_SHARE_TARGET_SHARE_PERCENT = 654; + */ + const INVENTORY_SHARE_TARGET_SHARE_PERCENT = 654; + /** + * The type of the inventory share. + * Corresponds to "Inventory share type value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum INVENTORY_SHARE_TYPE = 650; + */ + const INVENTORY_SHARE_TYPE = 650; + /** + * The localized name of the inventory share type. + * Corresponds to "Inventory share type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum INVENTORY_SHARE_TYPE_NAME = 651; + */ + const INVENTORY_SHARE_TYPE_NAME = 651; + /** + * Inventory type. + * The kind of web page or device where the ad was requested. + * Corresponds to "Inventory type (expanded) value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum INVENTORY_TYPE = 19; + */ + const INVENTORY_TYPE = 19; + /** + * Inventory type name. + * The kind of web page or device where the ad was requested. + * Corresponds to "Inventory type (expanded)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum INVENTORY_TYPE_NAME = 20; + */ + const INVENTORY_TYPE_NAME = 20; + /** + * Whether traffic is Adx Direct. + * Corresponds to "Is AdX Direct" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum IS_ADX_DIRECT = 382; + */ + const IS_ADX_DIRECT = 382; + /** + * If curation was targeted by the buyer when buying the impression + * Corresponds to "Is curation targeted" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum IS_CURATION_TARGETED = 574; + */ + const IS_CURATION_TARGETED = 574; + /** + * Whether the query was dropped. + * Corresponds to "Is Dropped" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum IS_DROPPED = 464; + */ + const IS_DROPPED = 464; + /** + * Whether traffic is First Look. + * Corresponds to "Is First Look" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum IS_FIRST_LOOK_DEAL = 401; + */ + const IS_FIRST_LOOK_DEAL = 401; + /** + * The Custom Targeting Value ID + * Corresponds to "Key-values ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum KEY_VALUES_ID = 214; + */ + const KEY_VALUES_ID = 214; + /** + * The Custom Targeting Value formatted like `{keyName}={valueName}` + * Corresponds to "Key-values" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum KEY_VALUES_NAME = 215; + */ + const KEY_VALUES_NAME = 215; + /** + * The agency of the order associated with the line item. + * Corresponds to "Line item agency" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_AGENCY = 663; + */ + const LINE_ITEM_AGENCY = 663; + /** + * Whether a Line item is archived. + * Corresponds to "Line item is archived" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum LINE_ITEM_ARCHIVED = 188; + */ + const LINE_ITEM_ARCHIVED = 188; + /** + * Line item comanion delivery option ENUM value. + * Corresponds to "Line item companion delivery option value" in the Ad + * Manager UI (when showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `ENUM` + * + * Generated from protobuf enum LINE_ITEM_COMPANION_DELIVERY_OPTION = 204; + */ + const LINE_ITEM_COMPANION_DELIVERY_OPTION = 204; + /** + * Localized line item comanion delivery option name. + * Corresponds to "Line item companion delivery option" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 205; + */ + const LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME = 205; + /** + * The computed status of the LineItem. + * Corresponds to "Line item computed status value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum LINE_ITEM_COMPUTED_STATUS = 250; + */ + const LINE_ITEM_COMPUTED_STATUS = 250; + /** + * The localized name of the computed status of the LineItem. + * Corresponds to "Line item computed status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_COMPUTED_STATUS_NAME = 251; + */ + const LINE_ITEM_COMPUTED_STATUS_NAME = 251; + /** + * The contracted units bought for the Line item. + * Corresponds to "Line item contracted quantity" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `INTEGER` + * + * Generated from protobuf enum LINE_ITEM_CONTRACTED_QUANTITY = 92; + */ + const LINE_ITEM_CONTRACTED_QUANTITY = 92; + /** + * The cost per unit of the Line item. + * Corresponds to "Line item rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `MONEY` + * + * Generated from protobuf enum LINE_ITEM_COST_PER_UNIT = 85; + */ + const LINE_ITEM_COST_PER_UNIT = 85; + /** + * Line item cost type ENUM value. + * Corresponds to "Line item cost type value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum LINE_ITEM_COST_TYPE = 212; + */ + const LINE_ITEM_COST_TYPE = 212; + /** + * Localized line item cost type name. + * Corresponds to "Line item cost type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_COST_TYPE_NAME = 213; + */ + const LINE_ITEM_COST_TYPE_NAME = 213; + /** + * Represent the end date of a creative associated with line item + * Corresponds to "Line item creative end date" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DATE` + * + * Generated from protobuf enum LINE_ITEM_CREATIVE_END_DATE = 176; + */ + const LINE_ITEM_CREATIVE_END_DATE = 176; + /** + * The creative rotation type of the LineItem. + * Corresponds to "Line item creative rotation type value" in the Ad Manager + * UI (when showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `ENUM` + * + * Generated from protobuf enum LINE_ITEM_CREATIVE_ROTATION_TYPE = 189; + */ + const LINE_ITEM_CREATIVE_ROTATION_TYPE = 189; + /** + * The localized name of the creative rotation type of the LineItem. + * Corresponds to "Line item creative rotation type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 190; + */ + const LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME = 190; + /** + * Represent the start date of a creative associated with line item + * Corresponds to "Line item creative start date" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DATE` + * + * Generated from protobuf enum LINE_ITEM_CREATIVE_START_DATE = 175; + */ + const LINE_ITEM_CREATIVE_START_DATE = 175; + /** + * The 3 letter currency code of the Line Item + * Corresponds to "Line item currency code" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_CURRENCY_CODE = 180; + */ + const LINE_ITEM_CURRENCY_CODE = 180; + /** + * The progress made for the delivery of the Line item. + * Corresponds to "Line item delivery indicator" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `PERCENT` + * + * Generated from protobuf enum LINE_ITEM_DELIVERY_INDICATOR = 87; + */ + const LINE_ITEM_DELIVERY_INDICATOR = 87; + /** + * The delivery rate type of the LineItem. + * Corresponds to "Line item delivery rate type value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum LINE_ITEM_DELIVERY_RATE_TYPE = 191; + */ + const LINE_ITEM_DELIVERY_RATE_TYPE = 191; + /** + * The localized name of the delivery rate type of the LineItem. + * Corresponds to "Line item delivery rate type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 192; + */ + const LINE_ITEM_DELIVERY_RATE_TYPE_NAME = 192; + /** + * The discount of the LineItem in whole units in the LineItem's currency + * code, or if unspecified the Network's currency code. + * Corresponds to "Line item discount (absolute)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `MONEY` + * + * Generated from protobuf enum LINE_ITEM_DISCOUNT_ABSOLUTE = 195; + */ + const LINE_ITEM_DISCOUNT_ABSOLUTE = 195; + /** + * The discount of the LineItem in percentage. + * Corresponds to "Line item discount (percentage)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `WHOLE_PERCENT` + * + * Generated from protobuf enum LINE_ITEM_DISCOUNT_PERCENTAGE = 196; + */ + const LINE_ITEM_DISCOUNT_PERCENTAGE = 196; + /** + * The end date of the Line item. + * Corresponds to "Line item end date" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `DATE` + * + * Generated from protobuf enum LINE_ITEM_END_DATE = 81; + */ + const LINE_ITEM_END_DATE = 81; + /** + * The end date and time of the Line item. + * Corresponds to "Line item end time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `TIMESTAMP` + * + * Generated from protobuf enum LINE_ITEM_END_DATE_TIME = 83; + */ + const LINE_ITEM_END_DATE_TIME = 83; + /** + * The ENUM value of the environment a LineItem is targeting. + * Corresponds to "Line item environment type value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `ENUM` + * + * Generated from protobuf enum LINE_ITEM_ENVIRONMENT_TYPE = 201; + */ + const LINE_ITEM_ENVIRONMENT_TYPE = 201; + /** + * The localized name of the environment a LineItem is targeting. + * Corresponds to "Line item environment type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_ENVIRONMENT_TYPE_NAME = 202; + */ + const LINE_ITEM_ENVIRONMENT_TYPE_NAME = 202; + /** + * The deal ID of the Line item. Set for Programmatic Direct campaigns. + * Corresponds to "Line item deal ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum LINE_ITEM_EXTERNAL_DEAL_ID = 97; + */ + const LINE_ITEM_EXTERNAL_DEAL_ID = 97; + /** + * The external ID of the Line item. + * Corresponds to "Line item external ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_EXTERNAL_ID = 86; + */ + const LINE_ITEM_EXTERNAL_ID = 86; + /** + * The frequency cap of the Line item (descriptive string). + * Corresponds to "Line item frequency cap" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_FREQUENCY_CAP = 256; + */ + const LINE_ITEM_FREQUENCY_CAP = 256; + /** + * Line item ID. + * Corresponds to "Line item ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum LINE_ITEM_ID = 1; + */ + const LINE_ITEM_ID = 1; + /** + * Line item labels. + * Corresponds to "Line item labels" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum LINE_ITEM_LABELS = 667; + */ + const LINE_ITEM_LABELS = 667; + /** + * Line item label IDs. + * Corresponds to "Line item label IDs" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER_LIST` + * + * Generated from protobuf enum LINE_ITEM_LABEL_IDS = 665; + */ + const LINE_ITEM_LABEL_IDS = 665; + /** + * The application that last modified the Line Item. + * Corresponds to "Line item last modified by app" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_LAST_MODIFIED_BY_APP = 181; + */ + const LINE_ITEM_LAST_MODIFIED_BY_APP = 181; + /** + * The total number of clicks delivered of the lifetime of the Line item. + * Corresponds to "Line item lifetime clicks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `INTEGER` + * + * Generated from protobuf enum LINE_ITEM_LIFETIME_CLICKS = 95; + */ + const LINE_ITEM_LIFETIME_CLICKS = 95; + /** + * The total number of impressions delivered over the lifetime of the + * Line item. + * Corresponds to "Line item lifetime impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `INTEGER` + * + * Generated from protobuf enum LINE_ITEM_LIFETIME_IMPRESSIONS = 94; + */ + const LINE_ITEM_LIFETIME_IMPRESSIONS = 94; + /** + * The total number of viewable impressions delivered over the lifetime of + * the Line item. + * Corresponds to "Line item lifetime viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `INTEGER` + * + * Generated from protobuf enum LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 96; + */ + const LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS = 96; + /** + * Whether or not the Line item is Makegood. Makegood refers to free + * inventory offered to buyers to compensate for mistakes or under-delivery + * in the original campaigns. + * Corresponds to "Line item is makegood" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum LINE_ITEM_MAKEGOOD = 89; + */ + const LINE_ITEM_MAKEGOOD = 89; + /** + * Line item Name. + * Corresponds to "Line item" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_NAME = 2; + */ + const LINE_ITEM_NAME = 2; + /** + * The cost of booking for the Line item (non-CPD). + * Corresponds to "Line item booked revenue (exclude CPD)" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `MONEY` + * + * Generated from protobuf enum LINE_ITEM_NON_CPD_BOOKED_REVENUE = 98; + */ + const LINE_ITEM_NON_CPD_BOOKED_REVENUE = 98; + /** + * Whether a Line item is eligible for opitimization. + * Corresponds to "Line item is optimizable" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum LINE_ITEM_OPTIMIZABLE = 90; + */ + const LINE_ITEM_OPTIMIZABLE = 90; + /** + * The PO number of the order associated with the line item. + * Corresponds to "Line item PO number" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_PO_NUMBER = 669; + */ + const LINE_ITEM_PO_NUMBER = 669; + /** + * Goal type ENUM value of the primary goal of the line item. + * Corresponds to "Line item primary goal type value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `ENUM` + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_TYPE = 210; + */ + const LINE_ITEM_PRIMARY_GOAL_TYPE = 210; + /** + * Localized goal type name of the primary goal of the line item. + * Corresponds to "Line item primary goal type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 211; + */ + const LINE_ITEM_PRIMARY_GOAL_TYPE_NAME = 211; + /** + * The total number of impressions or clicks that are reserved for a + * line item. For line items of type BULK or PRICE_PRIORITY, this + * represents the number of remaining impressions reserved. If the line + * item has an impression cap goal, this represents the number of + * impressions or conversions that the line item will stop serving at if + * reached. + * Corresponds to "Line item primary goal units (absolute)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `INTEGER` + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE = 93; + */ + const LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE = 93; + /** + * The percentage of impressions or clicks that are reserved for a + * line item. For line items of type SPONSORSHIP, this represents the + * percentage of available impressions reserved. For line items of type + * NETWORK or HOUSE, this represents the percentage of remaining + * impressions reserved. + * Corresponds to "Line item primary goal units (percentage)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `WHOLE_PERCENT` + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE = 396; + */ + const LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE = 396; + /** + * Unit type ENUM value of the primary goal of the line item. + * Corresponds to "Line item primary goal unit type value" in the Ad Manager + * UI (when showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `ENUM` + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 208; + */ + const LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE = 208; + /** + * Localized unit type name of the primary goal of the line item. + * Corresponds to "Line item primary goal unit type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 209; + */ + const LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME = 209; + /** + * The priority of this Line item as a value between 1 and 16. + * In general, a lower priority means more serving priority for the + * Line item. + * Corresponds to "Line item priority" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `INTEGER` + * + * Generated from protobuf enum LINE_ITEM_PRIORITY = 24; + */ + const LINE_ITEM_PRIORITY = 24; + /** + * ENUM value describing the state of inventory reservation for the + * LineItem. + * Corresponds to "Line item reservation status value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `ENUM` + * + * Generated from protobuf enum LINE_ITEM_RESERVATION_STATUS = 304; + */ + const LINE_ITEM_RESERVATION_STATUS = 304; + /** + * Localized string describing the state of inventory reservation for the + * LineItem. + * Corresponds to "Line item reservation status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_RESERVATION_STATUS_NAME = 305; + */ + const LINE_ITEM_RESERVATION_STATUS_NAME = 305; + /** + * The sales person of the order associated with the line item. + * Corresponds to "Line item salesperson" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_SALESPERSON = 671; + */ + const LINE_ITEM_SALESPERSON = 671; + /** + * The secondary sales people of the order associated with the line item. + * Corresponds to "Line item secondary salespeople" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum LINE_ITEM_SECONDARY_SALESPEOPLE = 673; + */ + const LINE_ITEM_SECONDARY_SALESPEOPLE = 673; + /** + * The secondary traffickers of the order associated with the line item. + * Corresponds to "Line item secondary traffickers" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum LINE_ITEM_SECONDARY_TRAFFICKERS = 675; + */ + const LINE_ITEM_SECONDARY_TRAFFICKERS = 675; + /** + * The start date of the Line item. + * Corresponds to "Line item start date" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `DATE` + * + * Generated from protobuf enum LINE_ITEM_START_DATE = 82; + */ + const LINE_ITEM_START_DATE = 82; + /** + * The start date and time of the Line item. + * Corresponds to "Line item start time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `TIMESTAMP` + * + * Generated from protobuf enum LINE_ITEM_START_DATE_TIME = 84; + */ + const LINE_ITEM_START_DATE_TIME = 84; + /** + * The trafficker of the order associated with the line item. + * Corresponds to "Line item trafficker" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_TRAFFICKER = 677; + */ + const LINE_ITEM_TRAFFICKER = 677; + /** + * Line item type ENUM value. + * Corresponds to "Line item type value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum LINE_ITEM_TYPE = 193; + */ + const LINE_ITEM_TYPE = 193; + /** + * Localized line item type name. + * Corresponds to "Line item type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_TYPE_NAME = 194; + */ + const LINE_ITEM_TYPE_NAME = 194; + /** + * Whether the Line item end time and end date is set to effectively never + * end. + * Corresponds to "Line item is unlimited end time" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum LINE_ITEM_UNLIMITED_END = 187; + */ + const LINE_ITEM_UNLIMITED_END = 187; + /** + * The artificial cost per unit used by the Ad server to help rank + * inventory. + * Corresponds to "Line item value cost per unit" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `MONEY` + * + * Generated from protobuf enum LINE_ITEM_VALUE_COST_PER_UNIT = 88; + */ + const LINE_ITEM_VALUE_COST_PER_UNIT = 88; + /** + * The web property code used for dynamic allocation Line Items. + * Corresponds to "Line item web property code" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum LINE_ITEM_WEB_PROPERTY_CODE = 179; + */ + const LINE_ITEM_WEB_PROPERTY_CODE = 179; + /** + * The ID of creative, includes regular creatives, and master and companions + * in case of creative sets + * Corresponds to "Master and Companion creative ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum MASTER_COMPANION_CREATIVE_ID = 140; + */ + const MASTER_COMPANION_CREATIVE_ID = 140; + /** + * Name of creative, includes regular creatives, and master and companions + * in case of creative sets + * Corresponds to "Master and Companion creative" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum MASTER_COMPANION_CREATIVE_NAME = 141; + */ + const MASTER_COMPANION_CREATIVE_NAME = 141; + /** + * Mediation type. + * Corresponds to "Mediation type value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum MEDIATION_TYPE = 701; + */ + const MEDIATION_TYPE = 701; + /** + * Localized mediation type name. + * Corresponds to "Mediation type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum MEDIATION_TYPE_NAME = 754; + */ + const MEDIATION_TYPE_NAME = 754; + /** + * The ID of the yield partner for Mediation. + * Corresponds to "Yield partner ID (mediation)" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum MEDIATION_YIELD_PARTNER_ID = 661; + */ + const MEDIATION_YIELD_PARTNER_ID = 661; + /** + * The name of the yield partner for Mediation. + * Corresponds to "Yield partner (mediation)" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `STRING` + * + * Generated from protobuf enum MEDIATION_YIELD_PARTNER_NAME = 662; + */ + const MEDIATION_YIELD_PARTNER_NAME = 662; + /** + * The criteria ID of the metro area in which the ad served. + * Corresponds to "Metro ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum METRO_ID = 453; + */ + const METRO_ID = 453; + /** + * The name of the metro area in which the ad served. + * Corresponds to "Metro" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum METRO_NAME = 454; + */ + const METRO_NAME = 454; + /** + * Whether the mobile app is free. + * Corresponds to "App is free" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum MOBILE_APP_FREE = 128; + */ + const MOBILE_APP_FREE = 128; + /** + * URL of app icon for the mobile app. + * Corresponds to "App icon URL" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum MOBILE_APP_ICON_URL = 129; + */ + const MOBILE_APP_ICON_URL = 129; + /** + * The ID of the Mobile App. + * Corresponds to "App ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, + * `PRIVACY_AND_MESSAGING` + * Data format: `STRING` + * + * Generated from protobuf enum MOBILE_APP_ID = 123; + */ + const MOBILE_APP_ID = 123; + /** + * The name of the mobile app. + * Corresponds to "App" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, + * `PRIVACY_AND_MESSAGING` + * Data format: `STRING` + * + * Generated from protobuf enum MOBILE_APP_NAME = 127; + */ + const MOBILE_APP_NAME = 127; + /** + * Ownership status of the mobile app. + * Corresponds to "App ownership status value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum MOBILE_APP_OWNERSHIP_STATUS = 311; + */ + const MOBILE_APP_OWNERSHIP_STATUS = 311; + /** + * Ownership status of the mobile app. + * Corresponds to "App ownership status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum MOBILE_APP_OWNERSHIP_STATUS_NAME = 312; + */ + const MOBILE_APP_OWNERSHIP_STATUS_NAME = 312; + /** + * The App Store of the mobile app. + * Corresponds to "App store value" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum MOBILE_APP_STORE = 125; + */ + const MOBILE_APP_STORE = 125; + /** + * The localized name of the mobile app store. + * Corresponds to "App store" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum MOBILE_APP_STORE_NAME = 245; + */ + const MOBILE_APP_STORE_NAME = 245; + /** + * Mobile inventory type. + * Identifies whether a mobile ad came from a regular web page, an AMP web + * page, or a mobile app. + * Values match the Inventory type dimension available in the Overview Home + * dashboard. Note: Video takes precedence over any other value, for + * example, if there is an in-stream video impression on a desktop device, + * it will be attributed to in-stream video and not desktop web. + * Corresponds to "Inventory type value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL`, + * `PRIVACY_AND_MESSAGING`, `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum MOBILE_INVENTORY_TYPE = 99; + */ + const MOBILE_INVENTORY_TYPE = 99; + /** + * Mobile inventory type name. + * Identifies whether a mobile ad came from a regular web page, an AMP web + * page, or a mobile app. + * Corresponds to "Inventory type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, + * `PRIVACY_AND_MESSAGING`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum MOBILE_INVENTORY_TYPE_NAME = 21; + */ + const MOBILE_INVENTORY_TYPE_NAME = 21; + /** + * Mobile rendering SDK. + * Corresponds to "Rendering SDK value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum MOBILE_RENDERING_SDK = 646; + */ + const MOBILE_RENDERING_SDK = 646; + /** + * Localized name of the Mobile rendering SDK. + * Corresponds to "Rendering SDK" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum MOBILE_RENDERING_SDK_NAME = 647; + */ + const MOBILE_RENDERING_SDK_NAME = 647; + /** + * The major version of the mobile SDK. + * Corresponds to "App SDK major version" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum MOBILE_SDK_MAJOR_VERSION = 692; + */ + const MOBILE_SDK_MAJOR_VERSION = 692; + /** + * The minor version of the mobile SDK. + * Corresponds to "App SDK minor version" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum MOBILE_SDK_MINOR_VERSION = 693; + */ + const MOBILE_SDK_MINOR_VERSION = 693; + /** + * SDK version of the mobile device. + * Corresponds to "App SDK version" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum MOBILE_SDK_VERSION_NAME = 130; + */ + const MOBILE_SDK_VERSION_NAME = 130; + /** + * Breaks down reporting data by month and year. + * Corresponds to "Month and year" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum MONTH_YEAR = 6; + */ + const MONTH_YEAR = 6; + /** + * Native ad format ID. + * Corresponds to "Native ad format ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum NATIVE_AD_FORMAT_ID = 255; + */ + const NATIVE_AD_FORMAT_ID = 255; + /** + * Native ad format name. + * Corresponds to "Native ad format" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum NATIVE_AD_FORMAT_NAME = 254; + */ + const NATIVE_AD_FORMAT_NAME = 254; + /** + * Native style ID. + * Corresponds to "Native style ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum NATIVE_STYLE_ID = 253; + */ + const NATIVE_STYLE_ID = 253; + /** + * Native style name. + * Corresponds to "Native style" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum NATIVE_STYLE_NAME = 252; + */ + const NATIVE_STYLE_NAME = 252; + /** + * No fill reason category in the Ads traffic navigator report. + * Corresponds to "No fill reason category value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: + * Data format: `ENUM` + * + * Generated from protobuf enum NO_FILL_REASON_CATEGORY = 586; + */ + const NO_FILL_REASON_CATEGORY = 586; + /** + * No fill reason category name in the Ads traffic navigator report. + * Corresponds to "No fill reason category" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `STRING` + * + * Generated from protobuf enum NO_FILL_REASON_CATEGORY_NAME = 587; + */ + const NO_FILL_REASON_CATEGORY_NAME = 587; + /** + * Operating system category. + * Corresponds to "Operating system category value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `ENUM` + * + * Generated from protobuf enum OPERATING_SYSTEM_CATEGORY = 117; + */ + const OPERATING_SYSTEM_CATEGORY = 117; + /** + * Operating system category name. + * Corresponds to "Operating system category" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum OPERATING_SYSTEM_CATEGORY_NAME = 118; + */ + const OPERATING_SYSTEM_CATEGORY_NAME = 118; + /** + * ID of the operating system version. + * Corresponds to "Operating system ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum OPERATING_SYSTEM_VERSION_ID = 238; + */ + const OPERATING_SYSTEM_VERSION_ID = 238; + /** + * Details of the operating system, including version. + * Corresponds to "Operating system" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum OPERATING_SYSTEM_VERSION_NAME = 237; + */ + const OPERATING_SYSTEM_VERSION_NAME = 237; + /** + * Enum value of the optimization type. + * Corresponds to "Optimization type value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum OPTIMIZATION_TYPE = 639; + */ + const OPTIMIZATION_TYPE = 639; + /** + * Localized name of the optimization type. + * Corresponds to "Optimization type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum OPTIMIZATION_TYPE_NAME = 640; + */ + const OPTIMIZATION_TYPE_NAME = 640; + /** + * Order agency. + * Corresponds to "Order agency" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum ORDER_AGENCY = 150; + */ + const ORDER_AGENCY = 150; + /** + * Order agency ID. + * Corresponds to "Order agency ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum ORDER_AGENCY_ID = 151; + */ + const ORDER_AGENCY_ID = 151; + /** + * Order booked CPC. + * Corresponds to "Order booked CPC" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `INTEGER` + * + * Generated from protobuf enum ORDER_BOOKED_CPC = 152; + */ + const ORDER_BOOKED_CPC = 152; + /** + * Order booked CPM. + * Corresponds to "Order booked CPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `INTEGER` + * + * Generated from protobuf enum ORDER_BOOKED_CPM = 153; + */ + const ORDER_BOOKED_CPM = 153; + /** + * Order delivery status ENUM value. + * Corresponds to "Order delivery status value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum ORDER_DELIVERY_STATUS = 231; + */ + const ORDER_DELIVERY_STATUS = 231; + /** + * Order delivery status localized name. + * Corresponds to "Order delivery status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum ORDER_DELIVERY_STATUS_NAME = 239; + */ + const ORDER_DELIVERY_STATUS_NAME = 239; + /** + * Order end date. + * Corresponds to "Order end date" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `DATE` + * + * Generated from protobuf enum ORDER_END_DATE = 154; + */ + const ORDER_END_DATE = 154; + /** + * Order end date and time. + * Corresponds to "Order end time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `TIMESTAMP` + * + * Generated from protobuf enum ORDER_END_DATE_TIME = 155; + */ + const ORDER_END_DATE_TIME = 155; + /** + * Order external ID. + * Corresponds to "Order external ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum ORDER_EXTERNAL_ID = 156; + */ + const ORDER_EXTERNAL_ID = 156; + /** + * Order ID. + * Corresponds to "Order ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum ORDER_ID = 7; + */ + const ORDER_ID = 7; + /** + * Order labels. + * Corresponds to "Order labels" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum ORDER_LABELS = 170; + */ + const ORDER_LABELS = 170; + /** + * Order labels IDs. + * Corresponds to "Order label IDs" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER_LIST` + * + * Generated from protobuf enum ORDER_LABEL_IDS = 171; + */ + const ORDER_LABEL_IDS = 171; + /** + * Order lifetime clicks. + * Corresponds to "Order lifetime clicks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `INTEGER` + * + * Generated from protobuf enum ORDER_LIFETIME_CLICKS = 158; + */ + const ORDER_LIFETIME_CLICKS = 158; + /** + * Order lifetime impressions. + * Corresponds to "Order lifetime impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `INTEGER` + * + * Generated from protobuf enum ORDER_LIFETIME_IMPRESSIONS = 159; + */ + const ORDER_LIFETIME_IMPRESSIONS = 159; + /** + * Order name. + * Corresponds to "Order" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum ORDER_NAME = 8; + */ + const ORDER_NAME = 8; + /** + * Order PO number. + * Corresponds to "Order PO number" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum ORDER_PO_NUMBER = 160; + */ + const ORDER_PO_NUMBER = 160; + /** + * Whether the Order is programmatic. + * Corresponds to "Order is programmatic" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum ORDER_PROGRAMMATIC = 157; + */ + const ORDER_PROGRAMMATIC = 157; + /** + * Order sales person. + * Corresponds to "Order salesperson" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum ORDER_SALESPERSON = 161; + */ + const ORDER_SALESPERSON = 161; + /** + * Order sales person ID. + * Corresponds to "Order salesperson ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum ORDER_SALESPERSON_ID = 629; + */ + const ORDER_SALESPERSON_ID = 629; + /** + * Order secondary sales people. + * Corresponds to "Order secondary salespeople" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum ORDER_SECONDARY_SALESPEOPLE = 164; + */ + const ORDER_SECONDARY_SALESPEOPLE = 164; + /** + * Order secondary sales people ID. + * Corresponds to "Order secondary salespeople ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER_LIST` + * + * Generated from protobuf enum ORDER_SECONDARY_SALESPEOPLE_ID = 165; + */ + const ORDER_SECONDARY_SALESPEOPLE_ID = 165; + /** + * Order secondary traffickers. + * Corresponds to "Order secondary traffickers" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum ORDER_SECONDARY_TRAFFICKERS = 166; + */ + const ORDER_SECONDARY_TRAFFICKERS = 166; + /** + * Order secondary traffickers ID. + * Corresponds to "Order secondary trafficker IDs" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER_LIST` + * + * Generated from protobuf enum ORDER_SECONDARY_TRAFFICKERS_ID = 167; + */ + const ORDER_SECONDARY_TRAFFICKERS_ID = 167; + /** + * Order start date. + * Corresponds to "Order start date" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `DATE` + * + * Generated from protobuf enum ORDER_START_DATE = 168; + */ + const ORDER_START_DATE = 168; + /** + * Order start date and time. + * Corresponds to "Order start time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `AD_SPEED` + * Data format: `TIMESTAMP` + * + * Generated from protobuf enum ORDER_START_DATE_TIME = 169; + */ + const ORDER_START_DATE_TIME = 169; + /** + * Order trafficker. + * Corresponds to "Order trafficker" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum ORDER_TRAFFICKER = 162; + */ + const ORDER_TRAFFICKER = 162; + /** + * Order trafficker ID. + * Corresponds to "Order trafficker ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum ORDER_TRAFFICKER_ID = 163; + */ + const ORDER_TRAFFICKER_ID = 163; + /** + * Whether the Order end time and end date is set to effectively never + * end. + * Corresponds to "Order is unlimited end time" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum ORDER_UNLIMITED_END = 203; + */ + const ORDER_UNLIMITED_END = 203; + /** + * Page path is the part of a page URL that comes after the domain but + * before the query strings from Google Analytics. + * Corresponds to "Page path" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PAGE_PATH = 511; + */ + const PAGE_PATH = 511; + /** + * Page title (web) and screen class (mobile) returned from Google + * Analytics. + * Corresponds to "Page title and screen class" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PAGE_TITLE_AND_SCREEN_CLASS = 512; + */ + const PAGE_TITLE_AND_SCREEN_CLASS = 512; + /** + * Page title (web) and screen name (mobile) returned from Google Analytics. + * Corresponds to "Page title and screen name" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PAGE_TITLE_AND_SCREEN_NAME = 513; + */ + const PAGE_TITLE_AND_SCREEN_NAME = 513; + /** + * Placement ID + * Corresponds to "Placement ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum PLACEMENT_ID = 113; + */ + const PLACEMENT_ID = 113; + /** + * The full list of placement IDs associated with the ad unit. + * Corresponds to "Placement ID (all)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `IDENTIFIER_LIST` + * + * Generated from protobuf enum PLACEMENT_ID_ALL = 144; + */ + const PLACEMENT_ID_ALL = 144; + /** + * Placement name + * Corresponds to "Placement" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum PLACEMENT_NAME = 114; + */ + const PLACEMENT_NAME = 114; + /** + * The full list of placement names associated with the ad unit. + * Corresponds to "Placement (all)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum PLACEMENT_NAME_ALL = 145; + */ + const PLACEMENT_NAME_ALL = 145; + /** + * Placement status ENUM value + * Corresponds to "Placement status value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum PLACEMENT_STATUS = 362; + */ + const PLACEMENT_STATUS = 362; + /** + * Localized placement status name. + * Corresponds to "Placement status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PLACEMENT_STATUS_NAME = 364; + */ + const PLACEMENT_STATUS_NAME = 364; + /** + * The full list of localized placement status names associated with the ad + * unit. + * Corresponds to "Placement status (all)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum PLACEMENT_STATUS_NAME_ALL = 365; + */ + const PLACEMENT_STATUS_NAME_ALL = 365; + /** + * The criteria ID of the postal code in which the ad served. + * Corresponds to "Postal code ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum POSTAL_CODE_ID = 455; + */ + const POSTAL_CODE_ID = 455; + /** + * The name of the postal code in which the ad served. + * Corresponds to "Postal code" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum POSTAL_CODE_NAME = 456; + */ + const POSTAL_CODE_NAME = 456; + /** + * Indicates the valid PPID (Publisher provided identifier) status on a + * given ad request. + * Corresponds to "PPID status value" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum PPID_STATUS = 406; + */ + const PPID_STATUS = 406; + /** + * The localized name of that indicates the valid PPID (Publisher provided + * identifier) status on a given ad request. + * Corresponds to "PPID status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PPID_STATUS_NAME = 407; + */ + const PPID_STATUS_NAME = 407; + /** + * Predicted viewability score bucket. + * Corresponds to "Predicted viewability bucket value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum PREDICTED_VIEWABILITY_BUCKET = 633; + */ + const PREDICTED_VIEWABILITY_BUCKET = 633; + /** + * The localized name of the predicted viewability score bucket. + * Corresponds to "Predicted viewability bucket" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PREDICTED_VIEWABILITY_BUCKET_NAME = 634; + */ + const PREDICTED_VIEWABILITY_BUCKET_NAME = 634; + /** + * The ID of the secure signals sent in the ad request. + * Corresponds to "Secure signal ID (presented)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum PRESENTED_SECURE_SIGNAL_ID = 495; + */ + const PRESENTED_SECURE_SIGNAL_ID = 495; + /** + * The name of the secure signals sent in the ad request. + * Corresponds to "Secure signal name (presented)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PRESENTED_SECURE_SIGNAL_NAME = 496; + */ + const PRESENTED_SECURE_SIGNAL_NAME = 496; + /** + * The ID type selected for personalization. + * Corresponds to "Primary personalization ID type value" in the Ad Manager + * UI (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum PRIMARY_PERSONALIZATION_ID_TYPE = 408; + */ + const PRIMARY_PERSONALIZATION_ID_TYPE = 408; + /** + * The localized name of the ID type selected for personalization. + * Corresponds to "Primary personalization ID type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PRIMARY_PERSONALIZATION_ID_TYPE_NAME = 409; + */ + const PRIMARY_PERSONALIZATION_ID_TYPE_NAME = 409; + /** + * Deprecated. Dimension has been renamed to `DEAL_BUYER_ID`. + * The server will normalize any requests using this value to + * `DEAL_BUYER_ID`. + * This value will be removed on or after October 10, 2025. + * + * Generated from protobuf enum PROGRAMMATIC_BUYER_ID = 240 [deprecated = true]; + */ + const PROGRAMMATIC_BUYER_ID = 240; + /** + * Deprecated. Dimension has been renamed to `DEAL_BUYER_NAME`. + * The server will normalize any requests using this value to + * `DEAL_BUYER_NAME`. + * This value will be removed on or after October 10, 2025. + * + * Generated from protobuf enum PROGRAMMATIC_BUYER_NAME = 241 [deprecated = true]; + */ + const PROGRAMMATIC_BUYER_NAME = 241; + /** + * Programmatic channel. + * The type of transaction that occurred in Ad Exchange. + * Corresponds to "Programmatic channel value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum PROGRAMMATIC_CHANNEL = 13; + */ + const PROGRAMMATIC_CHANNEL = 13; + /** + * Programmatic channel name. + * The type of transaction that occurred in Ad Exchange. + * Corresponds to "Programmatic channel" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH` + * Data format: `STRING` + * + * Generated from protobuf enum PROGRAMMATIC_CHANNEL_NAME = 14; + */ + const PROGRAMMATIC_CHANNEL_NAME = 14; + /** + * External code ID of a publisher provided signal (all levels). + * Corresponds to "Publisher provided signals external code (all levels)" in + * the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE = 410; + */ + const PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE = 410; + /** + * The ancestor chain of IDs of a publisher provided signal (all levels). + * Corresponds to "Publisher provided signals ID (all levels)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER_LIST` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS = 546; + */ + const PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS = 546; + /** + * The ancestor chain of names of a publisher provided signal (all levels). + * Corresponds to "Publisher provided signals (all levels)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME = 412; + */ + const PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME = 412; + /** + * Tier of a publisher provided signal (all levels). + * Corresponds to "Publisher provided signals tier (all levels)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER = 413; + */ + const PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER = 413; + /** + * Type of a publisher provided signal (all levels). + * Corresponds to "Publisher provided signals type (all levels)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE = 414; + */ + const PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE = 414; + /** + * External code ID of a publisher provided signal (delivered). + * Corresponds to "Publisher provided signals external code (delivered)" in + * the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE = 425; + */ + const PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE = 425; + /** + * The ancestor chain of IDs of a publisher provided signal (delivered). + * Corresponds to "Publisher provided signals ID (delivered)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER_LIST` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS = 545; + */ + const PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS = 545; + /** + * The ancestor chain of names of a publisher provided signal (delivered). + * Corresponds to "Publisher provided signals (delivered)" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME = 427; + */ + const PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME = 427; + /** + * Tier of a publisher provided signal (delivered). + * Corresponds to "Publisher provided signals tier (delivered)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER = 428; + */ + const PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER = 428; + /** + * Type of a publisher provided signal (delivered). + * Corresponds to "Publisher provided signals type (delivered)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE = 429; + */ + const PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE = 429; + /** + * External code ID of a publisher provided signal (top level). + * Corresponds to "Publisher provided signals external code (top level)" in + * the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE = 415; + */ + const PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE = 415; + /** + * ID of a publisher provided signal (top level). + * Corresponds to "Publisher provided signals ID (top level)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID = 416; + */ + const PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID = 416; + /** + * Name of a publisher provided signal (top level). + * Corresponds to "Publisher provided signals (top level)" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING_LIST` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME = 417; + */ + const PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME = 417; + /** + * Tier of a publisher provided signal (top level). + * Corresponds to "Publisher provided signals tier (top level)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER = 418; + */ + const PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER = 418; + /** + * Type of a publisher provided signal (top level). + * Corresponds to "Publisher provided signals type (top level)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE = 419; + */ + const PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE = 419; + /** + * Data provider ID associated with a publisher provided signal. + * Corresponds to "Publisher provided signals (data provider ID)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID = 136; + */ + const PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID = 136; + /** + * Data provider name associated with a publisher provided signal. + * Corresponds to "Publisher provided signals (data provider)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME = 137; + */ + const PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME = 137; + /** + * The criteria ID of the region (for example, US state) in which the ad + * served. + * Corresponds to "Region ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, + * `PRIVACY_AND_MESSAGING`, `AD_SPEED` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum REGION_ID = 457; + */ + const REGION_ID = 457; + /** + * The name of the region (for example, US state) in which the ad + * served. + * Corresponds to "Region" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, + * `PRIVACY_AND_MESSAGING`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum REGION_NAME = 458; + */ + const REGION_NAME = 458; + /** + * The rejection class category in the Ads traffic navigator report. + * Corresponds to "Rejection class category value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: + * Data format: `ENUM` + * + * Generated from protobuf enum REJECTION_CLASS_CATEGORY = 590; + */ + const REJECTION_CLASS_CATEGORY = 590; + /** + * The rejection class category name in the Ads traffic navigator report. + * Corresponds to "Rejection class category" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `STRING` + * + * Generated from protobuf enum REJECTION_CLASS_CATEGORY_NAME = 591; + */ + const REJECTION_CLASS_CATEGORY_NAME = 591; + /** + * The size of a rendered creative, It can differ with the creative's size + * if a creative is shown in an ad slot of a different size. + * Corresponds to "Rendered creative size" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum RENDERED_CREATIVE_SIZE = 343; + */ + const RENDERED_CREATIVE_SIZE = 343; + /** + * Inventory Requested Ad Sizes dimension + * Corresponds to "Requested ad sizes" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum REQUESTED_AD_SIZES = 352; + */ + const REQUESTED_AD_SIZES = 352; + /** + * Request type ENUM + * Corresponds to "Request type value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `ENUM` + * + * Generated from protobuf enum REQUEST_TYPE = 146; + */ + const REQUEST_TYPE = 146; + /** + * Request type locallized name + * Corresponds to "Request type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `AD_SPEED` + * Data format: `STRING` + * + * Generated from protobuf enum REQUEST_TYPE_NAME = 147; + */ + const REQUEST_TYPE_NAME = 147; + /** + * Indicates if a request was eligible for server-side unwrapping. + * Corresponds to "Server-side unwrapping eligible" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `BOOLEAN` + * + * Generated from protobuf enum SERVER_SIDE_UNWRAPPING_ELIGIBLE = 597; + */ + const SERVER_SIDE_UNWRAPPING_ELIGIBLE = 597; + /** + * The serving restriction mode for privacy. + * Corresponds to "Serving restriction value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum SERVING_RESTRICTION = 631; + */ + const SERVING_RESTRICTION = 631; + /** + * The localized name of the serving restriction mode for privacy. + * Corresponds to "Serving restriction" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum SERVING_RESTRICTION_NAME = 632; + */ + const SERVING_RESTRICTION_NAME = 632; + /** + * Information about domain or subdomains. + * Corresponds to "Site" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, + * `PRIVACY_AND_MESSAGING` + * Data format: `STRING` + * + * Generated from protobuf enum SITE = 387; + */ + const SITE = 387; + /** + * The ID of the browser, device or other environment into which a line item + * or creative was served. + * Corresponds to "Targeting ID" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum TARGETING_ID = 232; + */ + const TARGETING_ID = 232; + /** + * Information about the browser, device and other environments into which + * a line item or creative was served. + * Corresponds to "Targeting" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum TARGETING_NAME = 233; + */ + const TARGETING_NAME = 233; + /** + * The way in which advertisers targeted their ads. + * Corresponds to "Targeting type value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum TARGETING_TYPE = 385; + */ + const TARGETING_TYPE = 385; + /** + * The localized name of the way in which advertisers targeted their ads. + * Corresponds to "Targeting type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum TARGETING_TYPE_NAME = 386; + */ + const TARGETING_TYPE_NAME = 386; + /** + * Whether a third-party cookie or device ID was present on a given ad + * request. + * Corresponds to "Third-party ID status value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum THIRD_PARTY_ID_STATUS = 402; + */ + const THIRD_PARTY_ID_STATUS = 402; + /** + * The localized name of whether a third-party cookie or device ID was + * present on a given ad request. + * Corresponds to "Third-party ID status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum THIRD_PARTY_ID_STATUS_NAME = 403; + */ + const THIRD_PARTY_ID_STATUS_NAME = 403; + /** + * Reports the status of Topics in the ad request. + * Corresponds to "Topics status value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum TOPICS_STATUS = 504; + */ + const TOPICS_STATUS = 504; + /** + * The localized name of the status of Topics in the ad request. + * Corresponds to "Topics status" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum TOPICS_STATUS_NAME = 505; + */ + const TOPICS_STATUS_NAME = 505; + /** + * Inventory top private domain dimension + * Corresponds to "Domain" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, + * `PRIVACY_AND_MESSAGING` + * Data format: `STRING` + * + * Generated from protobuf enum TOP_PRIVATE_DOMAIN = 444; + */ + const TOP_PRIVATE_DOMAIN = 444; + /** + * Inventory Traffic source dimension + * Corresponds to "Traffic source value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum TRAFFIC_SOURCE = 388; + */ + const TRAFFIC_SOURCE = 388; + /** + * Inventory Traffic source dimension name + * Corresponds to "Traffic source" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum TRAFFIC_SOURCE_NAME = 389; + */ + const TRAFFIC_SOURCE_NAME = 389; + /** + * Unified pricing rule ID dimension + * Corresponds to "Unified pricing rule ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum UNIFIED_PRICING_RULE_ID = 393; + */ + const UNIFIED_PRICING_RULE_ID = 393; + /** + * Unified pricing rule name dimension + * Corresponds to "Unified pricing rule" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum UNIFIED_PRICING_RULE_NAME = 394; + */ + const UNIFIED_PRICING_RULE_NAME = 394; + /** + * A URL defined under a publisher's inventory. + * Corresponds to "URL" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum URL = 506; + */ + const URL = 506; + /** + * A URL defined under a publisher's inventory. + * Corresponds to "URL ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum URL_ID = 507; + */ + const URL_ID = 507; + /** + * Enum value for the entitlement source. + * Corresponds to "Entitlement source value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `ENUM` + * + * Generated from protobuf enum USER_MESSAGES_ENTITLEMENT_SOURCE = 635; + */ + const USER_MESSAGES_ENTITLEMENT_SOURCE = 635; + /** + * The localized name of the entitlement source. + * Corresponds to "Entitlement source" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `STRING` + * + * Generated from protobuf enum USER_MESSAGES_ENTITLEMENT_SOURCE_NAME = 636; + */ + const USER_MESSAGES_ENTITLEMENT_SOURCE_NAME = 636; + /** + * Targeting criteria ID for the operating system group. Used for User + * Messages reports. + * Corresponds to "Operating system group ID" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID = 637; + */ + const USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID = 637; + /** + * The name of the operating system group. Used for User Messages reports. + * Corresponds to "Operating system group" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `STRING` + * + * Generated from protobuf enum USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME = 638; + */ + const USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME = 638; + /** + * The VAST version of the creative that is returned for an ad request. + * Corresponds to "Vast version value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum VAST_VERSION = 554; + */ + const VAST_VERSION = 554; + /** + * The localized name of the VAST version of the creative that is returned + * for an ad request. + * Corresponds to "Vast version" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VAST_VERSION_NAME = 555; + */ + const VAST_VERSION_NAME = 555; + /** + * The break type of a video ad request. + * Corresponds to "Video ad break type value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum VIDEO_AD_BREAK_TYPE = 556; + */ + const VIDEO_AD_BREAK_TYPE = 556; + /** + * The localized name of the break type of a video ad request. + * Corresponds to "Video ad break type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_AD_BREAK_TYPE_NAME = 557; + */ + const VIDEO_AD_BREAK_TYPE_NAME = 557; + /** + * Video ad duration + * Corresponds to "Video ad duration" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_AD_DURATION = 450; + */ + const VIDEO_AD_DURATION = 450; + /** + * The name of the video ad formats rule used to control the ad formats + * eligible for your inventory. + * Corresponds to "Video ad formats rule" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_AD_FORMATS_RULE = 561; + */ + const VIDEO_AD_FORMATS_RULE = 561; + /** + * The ID of the video ad formats rule used to control the ad formats + * eligible for your inventory. + * Corresponds to "Video ad formats rule ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum VIDEO_AD_FORMATS_RULE_ID = 560; + */ + const VIDEO_AD_FORMATS_RULE_ID = 560; + /** + * The duration of a video ad request. + * Corresponds to "Video ad request duration value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum VIDEO_AD_REQUEST_DURATION = 558; + */ + const VIDEO_AD_REQUEST_DURATION = 558; + /** + * The localized name of the midpoint of the duration of a video ad request. + * Corresponds to "Video ad request duration midpoint" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME = 751; + */ + const VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME = 751; + /** + * The localized name of the duration of a video ad request. + * Corresponds to "Video ad request duration" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_AD_REQUEST_DURATION_NAME = 559; + */ + const VIDEO_AD_REQUEST_DURATION_NAME = 559; + /** + * The video ad request source enum. + * Corresponds to "Ad request source value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum VIDEO_AD_REQUEST_SOURCE = 438; + */ + const VIDEO_AD_REQUEST_SOURCE = 438; + /** + * The localized name of the video ad request source. + * Corresponds to "Ad request source" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_AD_REQUEST_SOURCE_NAME = 439; + */ + const VIDEO_AD_REQUEST_SOURCE_NAME = 439; + /** + * Video ad type + * Corresponds to "Video ad type value" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum VIDEO_AD_TYPE = 432; + */ + const VIDEO_AD_TYPE = 432; + /** + * Video ad type localized name + * Corresponds to "Video ad type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_AD_TYPE_NAME = 433; + */ + const VIDEO_AD_TYPE_NAME = 433; + /** + * The continuous play type of the video ad impression. + * Corresponds to "Video continuous play type value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum VIDEO_CONTINUOUS_PLAY_TYPE = 721; + */ + const VIDEO_CONTINUOUS_PLAY_TYPE = 721; + /** + * Video continuous play type localized name. + * Corresponds to "Video continuous play type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_CONTINUOUS_PLAY_TYPE_NAME = 722; + */ + const VIDEO_CONTINUOUS_PLAY_TYPE_NAME = 722; + /** + * Fallback position of the video ad. + * Corresponds to "Fallback position" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_FALLBACK_POSITION = 530; + */ + const VIDEO_FALLBACK_POSITION = 530; + /** + * The performance of the video ad inventory broken out by source. + * Corresponds to "Video measurement source value" in the Ad Manager UI + * (when showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum VIDEO_MEASUREMENT_SOURCE = 601; + */ + const VIDEO_MEASUREMENT_SOURCE = 601; + /** + * Video measurement source localized name. + * Corresponds to "Video measurement source" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_MEASUREMENT_SOURCE_NAME = 602; + */ + const VIDEO_MEASUREMENT_SOURCE_NAME = 602; + /** + * The video placement enum as defined by ADCOM 1.0-202303. + * Corresponds to "Video placement value (new)" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum VIDEO_PLCMT = 172; + */ + const VIDEO_PLCMT = 172; + /** + * The localized name of the video placement as defined by ADCOM 1.0-202303. + * Corresponds to "Video placement (new)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_PLCMT_NAME = 173; + */ + const VIDEO_PLCMT_NAME = 173; + /** + * The position in the video pod. For example 0, 1, 2, etc. + * Corresponds to "Position in pod" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_POSITION_IN_POD = 538; + */ + const VIDEO_POSITION_IN_POD = 538; + /** + * The position of the pod in the video stream. For example pre-roll, + * mid-roll, post-roll. + * Corresponds to "Position of pod" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_POSITION_OF_POD = 539; + */ + const VIDEO_POSITION_OF_POD = 539; + /** + * The video SDK version enum. + * Corresponds to "Video SDK version value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum VIDEO_SDK_VERSION = 440; + */ + const VIDEO_SDK_VERSION = 440; + /** + * The localized name of the video SDK version. + * Corresponds to "Video SDK version" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_SDK_VERSION_NAME = 441; + */ + const VIDEO_SDK_VERSION_NAME = 441; + /** + * Video stitcher type. + * Corresponds to "Video stitcher type value" in the Ad Manager UI (when + * showing API fields). + * Compatible with the following report types: `HISTORICAL` + * Data format: `ENUM` + * + * Generated from protobuf enum VIDEO_STITCHER_TYPE = 752; + */ + const VIDEO_STITCHER_TYPE = 752; + /** + * Localized name of the video stitcher type. + * Corresponds to "Video stitcher type" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum VIDEO_STITCHER_TYPE_NAME = 753; + */ + const VIDEO_STITCHER_TYPE_NAME = 753; + /** + * Breaks down reporting data by week of the year. + * Corresponds to "Week" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL`, `REACH`, + * `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum WEEK = 5; + */ + const WEEK = 5; + /** + * Name of the company within a yield group + * Corresponds to "Yield partner" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum YIELD_GROUP_BUYER_NAME = 184; + */ + const YIELD_GROUP_BUYER_NAME = 184; + /** + * Tag of the company within a yield group. + * Corresponds to "Yield group buyer tag" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum YIELD_GROUP_BUYER_TAG_NAME = 627; + */ + const YIELD_GROUP_BUYER_TAG_NAME = 627; + /** + * ID of the group of ad networks or exchanges used for Mediation and Open + * Bidding + * Corresponds to "Yield group ID" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `IDENTIFIER` + * + * Generated from protobuf enum YIELD_GROUP_ID = 182; + */ + const YIELD_GROUP_ID = 182; + /** + * Name of the group of ad networks or exchanges used for Mediation and Open + * Bidding + * Corresponds to "Yield group" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `STRING` + * + * Generated from protobuf enum YIELD_GROUP_NAME = 183; + */ + const YIELD_GROUP_NAME = 183; + /** + * YouTube instream ad duration bucket. + * Corresponds to "Ad duration value" in the Ad Manager UI (when showing API + * fields). + * Compatible with the following report types: + * Data format: `ENUM` + * + * Generated from protobuf enum YOUTUBE_AD_DURATION_BUCKET = 430; + */ + const YOUTUBE_AD_DURATION_BUCKET = 430; + /** + * YouTube instream ad duration bucket name. + * Corresponds to "Ad duration" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `STRING` + * + * Generated from protobuf enum YOUTUBE_AD_DURATION_BUCKET_NAME = 431; + */ + const YOUTUBE_AD_DURATION_BUCKET_NAME = 431; + /** + * YouTube instream Ad Type. + * Corresponds to "YouTube ad type ID" in the Ad Manager UI (when showing + * API fields). + * Compatible with the following report types: + * Data format: `ENUM` + * + * Generated from protobuf enum YOUTUBE_AD_TYPE = 399; + */ + const YOUTUBE_AD_TYPE = 399; + /** + * YouTube instream Ad Type locallized name. + * Corresponds to "YouTube ad type" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `STRING` + * + * Generated from protobuf enum YOUTUBE_AD_TYPE_NAME = 400; + */ + const YOUTUBE_AD_TYPE_NAME = 400; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 0 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 10000; + */ + const LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 10000; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 1 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 10001; + */ + const LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 10001; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 2 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 10002; + */ + const LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 10002; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 3 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 10003; + */ + const LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 10003; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 4 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 10004; + */ + const LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 10004; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 5 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 10005; + */ + const LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 10005; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 6 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 10006; + */ + const LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 10006; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 7 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 10007; + */ + const LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 10007; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 8 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 10008; + */ + const LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 10008; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 9 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 10009; + */ + const LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 10009; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 10 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 10010; + */ + const LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 10010; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 11 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 10011; + */ + const LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 10011; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 12 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 10012; + */ + const LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 10012; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 13 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 10013; + */ + const LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 10013; + /** + * Custom field option ID for Line Item with custom field ID equal to the ID + * in index 14 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 10014; + */ + const LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 10014; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 0 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 0 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_0_VALUE = 11000; + */ + const LINE_ITEM_CUSTOM_FIELD_0_VALUE = 11000; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 1 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 1 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_1_VALUE = 11001; + */ + const LINE_ITEM_CUSTOM_FIELD_1_VALUE = 11001; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 2 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 2 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_2_VALUE = 11002; + */ + const LINE_ITEM_CUSTOM_FIELD_2_VALUE = 11002; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 3 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 3 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_3_VALUE = 11003; + */ + const LINE_ITEM_CUSTOM_FIELD_3_VALUE = 11003; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 4 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 4 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_4_VALUE = 11004; + */ + const LINE_ITEM_CUSTOM_FIELD_4_VALUE = 11004; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 5 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 5 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_5_VALUE = 11005; + */ + const LINE_ITEM_CUSTOM_FIELD_5_VALUE = 11005; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 6 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 6 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_6_VALUE = 11006; + */ + const LINE_ITEM_CUSTOM_FIELD_6_VALUE = 11006; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 7 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 7 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_7_VALUE = 11007; + */ + const LINE_ITEM_CUSTOM_FIELD_7_VALUE = 11007; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 8 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 8 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_8_VALUE = 11008; + */ + const LINE_ITEM_CUSTOM_FIELD_8_VALUE = 11008; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 9 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 9 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_9_VALUE = 11009; + */ + const LINE_ITEM_CUSTOM_FIELD_9_VALUE = 11009; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 10 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 10 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_10_VALUE = 11010; + */ + const LINE_ITEM_CUSTOM_FIELD_10_VALUE = 11010; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 11 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 11 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_11_VALUE = 11011; + */ + const LINE_ITEM_CUSTOM_FIELD_11_VALUE = 11011; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 12 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 12 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_12_VALUE = 11012; + */ + const LINE_ITEM_CUSTOM_FIELD_12_VALUE = 11012; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 13 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 13 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_13_VALUE = 11013; + */ + const LINE_ITEM_CUSTOM_FIELD_13_VALUE = 11013; + /** + * Custom field value for Line Item with custom field ID equal to the ID + * in index 14 of `ReportDefinition.line_item_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 14 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum LINE_ITEM_CUSTOM_FIELD_14_VALUE = 11014; + */ + const LINE_ITEM_CUSTOM_FIELD_14_VALUE = 11014; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 0 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_0_OPTION_ID = 12000; + */ + const ORDER_CUSTOM_FIELD_0_OPTION_ID = 12000; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 1 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_1_OPTION_ID = 12001; + */ + const ORDER_CUSTOM_FIELD_1_OPTION_ID = 12001; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 2 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_2_OPTION_ID = 12002; + */ + const ORDER_CUSTOM_FIELD_2_OPTION_ID = 12002; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 3 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_3_OPTION_ID = 12003; + */ + const ORDER_CUSTOM_FIELD_3_OPTION_ID = 12003; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 4 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_4_OPTION_ID = 12004; + */ + const ORDER_CUSTOM_FIELD_4_OPTION_ID = 12004; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 5 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_5_OPTION_ID = 12005; + */ + const ORDER_CUSTOM_FIELD_5_OPTION_ID = 12005; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 6 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_6_OPTION_ID = 12006; + */ + const ORDER_CUSTOM_FIELD_6_OPTION_ID = 12006; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 7 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_7_OPTION_ID = 12007; + */ + const ORDER_CUSTOM_FIELD_7_OPTION_ID = 12007; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 8 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_8_OPTION_ID = 12008; + */ + const ORDER_CUSTOM_FIELD_8_OPTION_ID = 12008; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 9 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_9_OPTION_ID = 12009; + */ + const ORDER_CUSTOM_FIELD_9_OPTION_ID = 12009; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 10 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_10_OPTION_ID = 12010; + */ + const ORDER_CUSTOM_FIELD_10_OPTION_ID = 12010; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 11 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_11_OPTION_ID = 12011; + */ + const ORDER_CUSTOM_FIELD_11_OPTION_ID = 12011; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 12 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_12_OPTION_ID = 12012; + */ + const ORDER_CUSTOM_FIELD_12_OPTION_ID = 12012; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 13 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_13_OPTION_ID = 12013; + */ + const ORDER_CUSTOM_FIELD_13_OPTION_ID = 12013; + /** + * Custom field option ID for Order with custom field ID equal to the ID + * in index 14 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_14_OPTION_ID = 12014; + */ + const ORDER_CUSTOM_FIELD_14_OPTION_ID = 12014; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 0 of `ReportDefinition.order_custom_field_ids`. Treats the value + * as a string. Can only be used if the custom field at index 0 is of type + * STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_0_VALUE = 13000; + */ + const ORDER_CUSTOM_FIELD_0_VALUE = 13000; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 1 of `ReportDefinition.order_custom_field_ids`. Treats the value + * as a string. Can only be used if the custom field at index 1 is of type + * STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_1_VALUE = 13001; + */ + const ORDER_CUSTOM_FIELD_1_VALUE = 13001; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 2 of `ReportDefinition.order_custom_field_ids`. Treats the value + * as a string. Can only be used if the custom field at index 2 is of type + * STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_2_VALUE = 13002; + */ + const ORDER_CUSTOM_FIELD_2_VALUE = 13002; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 3 of `ReportDefinition.order_custom_field_ids`. Treats the value + * as a string. Can only be used if the custom field at index 3 is of type + * STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_3_VALUE = 13003; + */ + const ORDER_CUSTOM_FIELD_3_VALUE = 13003; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 4 of `ReportDefinition.order_custom_field_ids`. Treats the value + * as a string. Can only be used if the custom field at index 4 is of type + * STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_4_VALUE = 13004; + */ + const ORDER_CUSTOM_FIELD_4_VALUE = 13004; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 5 of `ReportDefinition.order_custom_field_ids`. Treats the value + * as a string. Can only be used if the custom field at index 5 is of type + * STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_5_VALUE = 13005; + */ + const ORDER_CUSTOM_FIELD_5_VALUE = 13005; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 6 of `ReportDefinition.order_custom_field_ids`. Treats the value + * as a string. Can only be used if the custom field at index 6 is of type + * STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_6_VALUE = 13006; + */ + const ORDER_CUSTOM_FIELD_6_VALUE = 13006; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 7 of `ReportDefinition.order_custom_field_ids`. Treats the value + * as a string. Can only be used if the custom field at index 7 is of type + * STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_7_VALUE = 13007; + */ + const ORDER_CUSTOM_FIELD_7_VALUE = 13007; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 8 of `ReportDefinition.order_custom_field_ids`. Treats the value + * as a string. Can only be used if the custom field at index 8 is of type + * STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_8_VALUE = 13008; + */ + const ORDER_CUSTOM_FIELD_8_VALUE = 13008; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 9 of `ReportDefinition.order_custom_field_ids`. Treats the value + * as a string. Can only be used if the custom field at index 9 is of type + * STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_9_VALUE = 13009; + */ + const ORDER_CUSTOM_FIELD_9_VALUE = 13009; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 10 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 10 is of + * type STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_10_VALUE = 13010; + */ + const ORDER_CUSTOM_FIELD_10_VALUE = 13010; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 11 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 11 is of + * type STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_11_VALUE = 13011; + */ + const ORDER_CUSTOM_FIELD_11_VALUE = 13011; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 12 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 12 is of + * type STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_12_VALUE = 13012; + */ + const ORDER_CUSTOM_FIELD_12_VALUE = 13012; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 13 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 13 is of + * type STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_13_VALUE = 13013; + */ + const ORDER_CUSTOM_FIELD_13_VALUE = 13013; + /** + * Custom field value for Order with custom field ID equal to the ID + * in index 14 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 14 is of + * type STRING. + * + * Generated from protobuf enum ORDER_CUSTOM_FIELD_14_VALUE = 13014; + */ + const ORDER_CUSTOM_FIELD_14_VALUE = 13014; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 0 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 14000; + */ + const CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 14000; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 1 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 14001; + */ + const CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 14001; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 2 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 14002; + */ + const CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 14002; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 3 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 14003; + */ + const CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 14003; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 4 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 14004; + */ + const CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 14004; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 5 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 14005; + */ + const CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 14005; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 6 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 14006; + */ + const CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 14006; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 7 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 14007; + */ + const CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 14007; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 8 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 14008; + */ + const CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 14008; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 9 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 14009; + */ + const CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 14009; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 10 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 14010; + */ + const CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 14010; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 11 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 14011; + */ + const CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 14011; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 12 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 14012; + */ + const CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 14012; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 13 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 14013; + */ + const CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 14013; + /** + * Custom field option ID for Creative with custom field ID equal to the ID + * in index 14 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 14014; + */ + const CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 14014; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 0 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 0 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_0_VALUE = 15000; + */ + const CREATIVE_CUSTOM_FIELD_0_VALUE = 15000; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 1 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 1 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_1_VALUE = 15001; + */ + const CREATIVE_CUSTOM_FIELD_1_VALUE = 15001; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 2 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 2 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_2_VALUE = 15002; + */ + const CREATIVE_CUSTOM_FIELD_2_VALUE = 15002; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 3 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 3 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_3_VALUE = 15003; + */ + const CREATIVE_CUSTOM_FIELD_3_VALUE = 15003; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 4 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 4 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_4_VALUE = 15004; + */ + const CREATIVE_CUSTOM_FIELD_4_VALUE = 15004; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 5 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 5 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_5_VALUE = 15005; + */ + const CREATIVE_CUSTOM_FIELD_5_VALUE = 15005; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 6 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 6 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_6_VALUE = 15006; + */ + const CREATIVE_CUSTOM_FIELD_6_VALUE = 15006; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 7 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 7 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_7_VALUE = 15007; + */ + const CREATIVE_CUSTOM_FIELD_7_VALUE = 15007; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 8 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 8 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_8_VALUE = 15008; + */ + const CREATIVE_CUSTOM_FIELD_8_VALUE = 15008; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 9 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 9 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_9_VALUE = 15009; + */ + const CREATIVE_CUSTOM_FIELD_9_VALUE = 15009; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 10 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 10 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_10_VALUE = 15010; + */ + const CREATIVE_CUSTOM_FIELD_10_VALUE = 15010; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 11 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 11 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_11_VALUE = 15011; + */ + const CREATIVE_CUSTOM_FIELD_11_VALUE = 15011; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 12 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 12 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_12_VALUE = 15012; + */ + const CREATIVE_CUSTOM_FIELD_12_VALUE = 15012; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 13 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 13 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_13_VALUE = 15013; + */ + const CREATIVE_CUSTOM_FIELD_13_VALUE = 15013; + /** + * Custom field value for Creative with custom field ID equal to the ID + * in index 14 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 14 is of + * type STRING. + * + * Generated from protobuf enum CREATIVE_CUSTOM_FIELD_14_VALUE = 15014; + */ + const CREATIVE_CUSTOM_FIELD_14_VALUE = 15014; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 16000; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID = 16000; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 16001; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID = 16001; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 16002; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID = 16002; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 16003; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID = 16003; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 16004; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID = 16004; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 16005; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID = 16005; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 16006; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID = 16006; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 16007; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID = 16007; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 16008; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID = 16008; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 16009; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID = 16009; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 16010; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID = 16010; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 16011; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID = 16011; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 16012; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID = 16012; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 16013; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID = 16013; + /** + * Custom field option ID for Backfill line item with custom field ID equal + * to the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 16014; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID = 16014; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 0 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 0 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE = 17000; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE = 17000; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 1 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 1 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE = 17001; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE = 17001; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 2 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 2 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE = 17002; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE = 17002; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 3 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 3 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE = 17003; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE = 17003; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 4 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 4 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE = 17004; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE = 17004; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 5 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 5 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE = 17005; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE = 17005; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 6 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 6 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE = 17006; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE = 17006; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 7 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 7 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE = 17007; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE = 17007; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 8 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 8 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE = 17008; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE = 17008; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 9 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 9 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE = 17009; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE = 17009; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 10 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 10 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE = 17010; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE = 17010; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 11 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 11 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE = 17011; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE = 17011; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 12 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 12 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE = 17012; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE = 17012; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 13 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 13 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE = 17013; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE = 17013; + /** + * Custom field value for Backfill line item with custom field ID equal to + * the ID in index 14 of `ReportDefinition.line_item_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 14 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE = 17014; + */ + const BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE = 17014; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 0 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID = 18000; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID = 18000; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 1 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID = 18001; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID = 18001; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 2 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID = 18002; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID = 18002; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 3 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID = 18003; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID = 18003; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 4 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID = 18004; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID = 18004; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 5 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID = 18005; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID = 18005; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 6 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID = 18006; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID = 18006; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 7 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID = 18007; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID = 18007; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 8 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID = 18008; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID = 18008; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 9 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID = 18009; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID = 18009; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 10 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID = 18010; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID = 18010; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 11 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID = 18011; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID = 18011; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 12 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID = 18012; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID = 18012; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 13 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID = 18013; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID = 18013; + /** + * Custom field option ID for Backfill order with custom field ID equal to + * the ID in index 14 of `ReportDefinition.order_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID = 18014; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID = 18014; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID + * in index 0 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 0 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE = 19000; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE = 19000; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 1 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 1 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE = 19001; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE = 19001; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 2 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 2 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE = 19002; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE = 19002; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 3 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 3 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE = 19003; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE = 19003; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 4 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 4 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE = 19004; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE = 19004; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 5 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 5 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE = 19005; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE = 19005; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 6 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 6 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE = 19006; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE = 19006; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 7 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 7 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE = 19007; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE = 19007; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 8 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 8 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE = 19008; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE = 19008; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 9 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 9 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE = 19009; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE = 19009; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 10 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 10 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE = 19010; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE = 19010; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 11 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 11 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE = 19011; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE = 19011; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 12 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 12 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE = 19012; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE = 19012; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 13 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 13 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE = 19013; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE = 19013; + /** + * Custom field value for Backfill order with custom field ID equal to the + * ID in index 14 of `ReportDefinition.order_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 14 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE = 19014; + */ + const BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE = 19014; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 0 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 20000; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID = 20000; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 20001; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID = 20001; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 20002; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID = 20002; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 20003; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID = 20003; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 20004; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID = 20004; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 20005; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID = 20005; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 20006; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID = 20006; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 20007; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID = 20007; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 20008; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID = 20008; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 20009; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID = 20009; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 20010; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID = 20010; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 20011; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID = 20011; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 20012; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID = 20012; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 20013; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID = 20013; + /** + * Custom field option ID for Backfill creative with custom field ID equal + * to the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 20014; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID = 20014; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID + * in index 0 of `ReportDefinition.creative_custom_field_ids`. Treats the + * value as a string. Can only be used if the custom field at index 0 is of + * type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE = 21000; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE = 21000; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 1 of `ReportDefinition.creative_custom_field_ids`. Treats + * the value as a string. Can only be used if the custom field at index 1 is + * of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE = 21001; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE = 21001; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 2 of `ReportDefinition.creative_custom_field_ids`. Treats + * the value as a string. Can only be used if the custom field at index 2 is + * of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE = 21002; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE = 21002; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 3 of `ReportDefinition.creative_custom_field_ids`. Treats + * the value as a string. Can only be used if the custom field at index 3 is + * of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE = 21003; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE = 21003; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 4 of `ReportDefinition.creative_custom_field_ids`. Treats + * the value as a string. Can only be used if the custom field at index 4 is + * of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE = 21004; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE = 21004; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 5 of `ReportDefinition.creative_custom_field_ids`. Treats + * the value as a string. Can only be used if the custom field at index 5 is + * of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE = 21005; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE = 21005; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 6 of `ReportDefinition.creative_custom_field_ids`. Treats + * the value as a string. Can only be used if the custom field at index 6 is + * of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE = 21006; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE = 21006; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 7 of `ReportDefinition.creative_custom_field_ids`. Treats + * the value as a string. Can only be used if the custom field at index 7 is + * of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE = 21007; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE = 21007; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 8 of `ReportDefinition.creative_custom_field_ids`. Treats + * the value as a string. Can only be used if the custom field at index 8 is + * of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE = 21008; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE = 21008; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 9 of `ReportDefinition.creative_custom_field_ids`. Treats + * the value as a string. Can only be used if the custom field at index 9 is + * of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE = 21009; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE = 21009; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 10 of `ReportDefinition.creative_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 10 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE = 21010; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE = 21010; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 11 of `ReportDefinition.creative_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 11 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE = 21011; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE = 21011; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 12 of `ReportDefinition.creative_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 12 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE = 21012; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE = 21012; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 13 of `ReportDefinition.creative_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 13 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE = 21013; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE = 21013; + /** + * Custom field value for Backfill creative with custom field ID equal to + * the ID in index 14 of `ReportDefinition.creative_custom_field_ids`. + * Treats the value as a string. Can only be used if the custom field at + * index 14 is of type `STRING` or `DROPDOWN`. + * + * Generated from protobuf enum BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE = 21014; + */ + const BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE = 21014; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 0 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_0_VALUE_ID = 100000; + */ + const CUSTOM_DIMENSION_0_VALUE_ID = 100000; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 1 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_1_VALUE_ID = 100001; + */ + const CUSTOM_DIMENSION_1_VALUE_ID = 100001; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 2 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_2_VALUE_ID = 100002; + */ + const CUSTOM_DIMENSION_2_VALUE_ID = 100002; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 3 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_3_VALUE_ID = 100003; + */ + const CUSTOM_DIMENSION_3_VALUE_ID = 100003; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 4 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_4_VALUE_ID = 100004; + */ + const CUSTOM_DIMENSION_4_VALUE_ID = 100004; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 5 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_5_VALUE_ID = 100005; + */ + const CUSTOM_DIMENSION_5_VALUE_ID = 100005; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 6 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_6_VALUE_ID = 100006; + */ + const CUSTOM_DIMENSION_6_VALUE_ID = 100006; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 9 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_7_VALUE_ID = 100007; + */ + const CUSTOM_DIMENSION_7_VALUE_ID = 100007; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 8 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_8_VALUE_ID = 100008; + */ + const CUSTOM_DIMENSION_8_VALUE_ID = 100008; + /** + * Custom Dimension Value ID for Custom Dimension with key equal to the key + * in index 9 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_9_VALUE_ID = 100009; + */ + const CUSTOM_DIMENSION_9_VALUE_ID = 100009; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * ID in index 0 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_0_VALUE = 101000; + */ + const CUSTOM_DIMENSION_0_VALUE = 101000; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * ID in index 1 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_1_VALUE = 101001; + */ + const CUSTOM_DIMENSION_1_VALUE = 101001; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * ID in index 2 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_2_VALUE = 101002; + */ + const CUSTOM_DIMENSION_2_VALUE = 101002; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * ID in index 3 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_3_VALUE = 101003; + */ + const CUSTOM_DIMENSION_3_VALUE = 101003; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * ID in index 4 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_4_VALUE = 101004; + */ + const CUSTOM_DIMENSION_4_VALUE = 101004; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * ID in index 5 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_5_VALUE = 101005; + */ + const CUSTOM_DIMENSION_5_VALUE = 101005; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * ID in index 6 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_6_VALUE = 101006; + */ + const CUSTOM_DIMENSION_6_VALUE = 101006; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * ID in index 7 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_7_VALUE = 101007; + */ + const CUSTOM_DIMENSION_7_VALUE = 101007; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * ID in index 8 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_8_VALUE = 101008; + */ + const CUSTOM_DIMENSION_8_VALUE = 101008; + /** + * Custom Dimension Value name for Custom Dimension with key equal to the + * ID in index 9 of `ReportDefinition.custom_dimension_key_ids`. + * + * Generated from protobuf enum CUSTOM_DIMENSION_9_VALUE = 101009; + */ + const CUSTOM_DIMENSION_9_VALUE = 101009; + + private static $valueToName = [ + self::DIMENSION_UNSPECIFIED => 'DIMENSION_UNSPECIFIED', + self::ACTIVE_VIEW_MEASUREMENT_SOURCE => 'ACTIVE_VIEW_MEASUREMENT_SOURCE', + self::ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME => 'ACTIVE_VIEW_MEASUREMENT_SOURCE_NAME', + self::ADVERTISER_CREDIT_STATUS => 'ADVERTISER_CREDIT_STATUS', + self::ADVERTISER_CREDIT_STATUS_NAME => 'ADVERTISER_CREDIT_STATUS_NAME', + self::ADVERTISER_DOMAIN_NAME => 'ADVERTISER_DOMAIN_NAME', + self::ADVERTISER_EXTERNAL_ID => 'ADVERTISER_EXTERNAL_ID', + self::ADVERTISER_ID => 'ADVERTISER_ID', + self::ADVERTISER_LABELS => 'ADVERTISER_LABELS', + self::ADVERTISER_LABEL_IDS => 'ADVERTISER_LABEL_IDS', + self::ADVERTISER_NAME => 'ADVERTISER_NAME', + self::ADVERTISER_PRIMARY_CONTACT => 'ADVERTISER_PRIMARY_CONTACT', + self::ADVERTISER_STATUS => 'ADVERTISER_STATUS', + self::ADVERTISER_STATUS_NAME => 'ADVERTISER_STATUS_NAME', + self::ADVERTISER_TYPE => 'ADVERTISER_TYPE', + self::ADVERTISER_TYPE_NAME => 'ADVERTISER_TYPE_NAME', + self::ADVERTISER_VERTICAL => 'ADVERTISER_VERTICAL', + self::ADX_PRODUCT => 'ADX_PRODUCT', + self::ADX_PRODUCT_NAME => 'ADX_PRODUCT_NAME', + self::AD_EXPERIENCES_TYPE => 'AD_EXPERIENCES_TYPE', + self::AD_EXPERIENCES_TYPE_NAME => 'AD_EXPERIENCES_TYPE_NAME', + self::AD_LOCATION => 'AD_LOCATION', + self::AD_LOCATION_NAME => 'AD_LOCATION_NAME', + self::AD_TECHNOLOGY_PROVIDER_DOMAIN => 'AD_TECHNOLOGY_PROVIDER_DOMAIN', + self::AD_TECHNOLOGY_PROVIDER_ID => 'AD_TECHNOLOGY_PROVIDER_ID', + self::AD_TECHNOLOGY_PROVIDER_NAME => 'AD_TECHNOLOGY_PROVIDER_NAME', + self::AD_TYPE => 'AD_TYPE', + self::AD_TYPE_NAME => 'AD_TYPE_NAME', + self::AD_UNIT_CODE => 'AD_UNIT_CODE', + self::AD_UNIT_CODE_LEVEL_1 => 'AD_UNIT_CODE_LEVEL_1', + self::AD_UNIT_CODE_LEVEL_10 => 'AD_UNIT_CODE_LEVEL_10', + self::AD_UNIT_CODE_LEVEL_11 => 'AD_UNIT_CODE_LEVEL_11', + self::AD_UNIT_CODE_LEVEL_12 => 'AD_UNIT_CODE_LEVEL_12', + self::AD_UNIT_CODE_LEVEL_13 => 'AD_UNIT_CODE_LEVEL_13', + self::AD_UNIT_CODE_LEVEL_14 => 'AD_UNIT_CODE_LEVEL_14', + self::AD_UNIT_CODE_LEVEL_15 => 'AD_UNIT_CODE_LEVEL_15', + self::AD_UNIT_CODE_LEVEL_16 => 'AD_UNIT_CODE_LEVEL_16', + self::AD_UNIT_CODE_LEVEL_2 => 'AD_UNIT_CODE_LEVEL_2', + self::AD_UNIT_CODE_LEVEL_3 => 'AD_UNIT_CODE_LEVEL_3', + self::AD_UNIT_CODE_LEVEL_4 => 'AD_UNIT_CODE_LEVEL_4', + self::AD_UNIT_CODE_LEVEL_5 => 'AD_UNIT_CODE_LEVEL_5', + self::AD_UNIT_CODE_LEVEL_6 => 'AD_UNIT_CODE_LEVEL_6', + self::AD_UNIT_CODE_LEVEL_7 => 'AD_UNIT_CODE_LEVEL_7', + self::AD_UNIT_CODE_LEVEL_8 => 'AD_UNIT_CODE_LEVEL_8', + self::AD_UNIT_CODE_LEVEL_9 => 'AD_UNIT_CODE_LEVEL_9', + self::AD_UNIT_ID => 'AD_UNIT_ID', + self::AD_UNIT_ID_ALL_LEVEL => 'AD_UNIT_ID_ALL_LEVEL', + self::AD_UNIT_ID_LEVEL_1 => 'AD_UNIT_ID_LEVEL_1', + self::AD_UNIT_ID_LEVEL_10 => 'AD_UNIT_ID_LEVEL_10', + self::AD_UNIT_ID_LEVEL_11 => 'AD_UNIT_ID_LEVEL_11', + self::AD_UNIT_ID_LEVEL_12 => 'AD_UNIT_ID_LEVEL_12', + self::AD_UNIT_ID_LEVEL_13 => 'AD_UNIT_ID_LEVEL_13', + self::AD_UNIT_ID_LEVEL_14 => 'AD_UNIT_ID_LEVEL_14', + self::AD_UNIT_ID_LEVEL_15 => 'AD_UNIT_ID_LEVEL_15', + self::AD_UNIT_ID_LEVEL_16 => 'AD_UNIT_ID_LEVEL_16', + self::AD_UNIT_ID_LEVEL_2 => 'AD_UNIT_ID_LEVEL_2', + self::AD_UNIT_ID_LEVEL_3 => 'AD_UNIT_ID_LEVEL_3', + self::AD_UNIT_ID_LEVEL_4 => 'AD_UNIT_ID_LEVEL_4', + self::AD_UNIT_ID_LEVEL_5 => 'AD_UNIT_ID_LEVEL_5', + self::AD_UNIT_ID_LEVEL_6 => 'AD_UNIT_ID_LEVEL_6', + self::AD_UNIT_ID_LEVEL_7 => 'AD_UNIT_ID_LEVEL_7', + self::AD_UNIT_ID_LEVEL_8 => 'AD_UNIT_ID_LEVEL_8', + self::AD_UNIT_ID_LEVEL_9 => 'AD_UNIT_ID_LEVEL_9', + self::AD_UNIT_ID_TOP_LEVEL => 'AD_UNIT_ID_TOP_LEVEL', + self::AD_UNIT_NAME => 'AD_UNIT_NAME', + self::AD_UNIT_NAME_ALL_LEVEL => 'AD_UNIT_NAME_ALL_LEVEL', + self::AD_UNIT_NAME_LEVEL_1 => 'AD_UNIT_NAME_LEVEL_1', + self::AD_UNIT_NAME_LEVEL_10 => 'AD_UNIT_NAME_LEVEL_10', + self::AD_UNIT_NAME_LEVEL_11 => 'AD_UNIT_NAME_LEVEL_11', + self::AD_UNIT_NAME_LEVEL_12 => 'AD_UNIT_NAME_LEVEL_12', + self::AD_UNIT_NAME_LEVEL_13 => 'AD_UNIT_NAME_LEVEL_13', + self::AD_UNIT_NAME_LEVEL_14 => 'AD_UNIT_NAME_LEVEL_14', + self::AD_UNIT_NAME_LEVEL_15 => 'AD_UNIT_NAME_LEVEL_15', + self::AD_UNIT_NAME_LEVEL_16 => 'AD_UNIT_NAME_LEVEL_16', + self::AD_UNIT_NAME_LEVEL_2 => 'AD_UNIT_NAME_LEVEL_2', + self::AD_UNIT_NAME_LEVEL_3 => 'AD_UNIT_NAME_LEVEL_3', + self::AD_UNIT_NAME_LEVEL_4 => 'AD_UNIT_NAME_LEVEL_4', + self::AD_UNIT_NAME_LEVEL_5 => 'AD_UNIT_NAME_LEVEL_5', + self::AD_UNIT_NAME_LEVEL_6 => 'AD_UNIT_NAME_LEVEL_6', + self::AD_UNIT_NAME_LEVEL_7 => 'AD_UNIT_NAME_LEVEL_7', + self::AD_UNIT_NAME_LEVEL_8 => 'AD_UNIT_NAME_LEVEL_8', + self::AD_UNIT_NAME_LEVEL_9 => 'AD_UNIT_NAME_LEVEL_9', + self::AD_UNIT_NAME_TOP_LEVEL => 'AD_UNIT_NAME_TOP_LEVEL', + self::AD_UNIT_REWARD_AMOUNT => 'AD_UNIT_REWARD_AMOUNT', + self::AD_UNIT_REWARD_TYPE => 'AD_UNIT_REWARD_TYPE', + self::AD_UNIT_STATUS => 'AD_UNIT_STATUS', + self::AD_UNIT_STATUS_NAME => 'AD_UNIT_STATUS_NAME', + self::AGENCY_LEVEL_1_ID => 'AGENCY_LEVEL_1_ID', + self::AGENCY_LEVEL_1_NAME => 'AGENCY_LEVEL_1_NAME', + self::AGENCY_LEVEL_2_ID => 'AGENCY_LEVEL_2_ID', + self::AGENCY_LEVEL_2_NAME => 'AGENCY_LEVEL_2_NAME', + self::AGENCY_LEVEL_3_ID => 'AGENCY_LEVEL_3_ID', + self::AGENCY_LEVEL_3_NAME => 'AGENCY_LEVEL_3_NAME', + self::AGE_BRACKET => 'AGE_BRACKET', + self::AGE_BRACKET_NAME => 'AGE_BRACKET_NAME', + self::APP_TRACKING_TRANSPARENCY_CONSENT_STATUS => 'APP_TRACKING_TRANSPARENCY_CONSENT_STATUS', + self::APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME => 'APP_TRACKING_TRANSPARENCY_CONSENT_STATUS_NAME', + self::APP_VERSION => 'APP_VERSION', + self::AUCTION_PACKAGE_DEAL => 'AUCTION_PACKAGE_DEAL', + self::AUCTION_PACKAGE_DEAL_ID => 'AUCTION_PACKAGE_DEAL_ID', + self::AUDIENCE_SEGMENT_ID_TARGETED => 'AUDIENCE_SEGMENT_ID_TARGETED', + self::AUDIENCE_SEGMENT_TARGETED => 'AUDIENCE_SEGMENT_TARGETED', + self::AUTO_REFRESHED_TRAFFIC => 'AUTO_REFRESHED_TRAFFIC', + self::AUTO_REFRESHED_TRAFFIC_NAME => 'AUTO_REFRESHED_TRAFFIC_NAME', + self::BIDDER_ENCRYPTED_ID => 'BIDDER_ENCRYPTED_ID', + self::BIDDER_NAME => 'BIDDER_NAME', + self::BID_RANGE => 'BID_RANGE', + self::BID_REJECTION_REASON => 'BID_REJECTION_REASON', + self::BID_REJECTION_REASON_NAME => 'BID_REJECTION_REASON_NAME', + self::BRANDING_TYPE => 'BRANDING_TYPE', + self::BRANDING_TYPE_NAME => 'BRANDING_TYPE_NAME', + self::BROWSER_CATEGORY => 'BROWSER_CATEGORY', + self::BROWSER_CATEGORY_NAME => 'BROWSER_CATEGORY_NAME', + self::BROWSER_ID => 'BROWSER_ID', + self::BROWSER_NAME => 'BROWSER_NAME', + self::BUYER_NETWORK_ID => 'BUYER_NETWORK_ID', + self::BUYER_NETWORK_NAME => 'BUYER_NETWORK_NAME', + self::CALLOUT_STATUS_CATEGORY => 'CALLOUT_STATUS_CATEGORY', + self::CALLOUT_STATUS_CATEGORY_NAME => 'CALLOUT_STATUS_CATEGORY_NAME', + self::CARRIER_ID => 'CARRIER_ID', + self::CARRIER_NAME => 'CARRIER_NAME', + self::CHANNEL => 'CHANNEL', + self::CHILD_NETWORK_CODE => 'CHILD_NETWORK_CODE', + self::CHILD_NETWORK_ID => 'CHILD_NETWORK_ID', + self::CHILD_PARTNER_NAME => 'CHILD_PARTNER_NAME', + self::CITY_ID => 'CITY_ID', + self::CITY_NAME => 'CITY_NAME', + self::CLASSIFIED_ADVERTISER_ID => 'CLASSIFIED_ADVERTISER_ID', + self::CLASSIFIED_ADVERTISER_NAME => 'CLASSIFIED_ADVERTISER_NAME', + self::CLASSIFIED_BRAND_ID => 'CLASSIFIED_BRAND_ID', + self::CLASSIFIED_BRAND_NAME => 'CLASSIFIED_BRAND_NAME', + self::CONTENT_CMS_NAME => 'CONTENT_CMS_NAME', + self::CONTENT_CMS_VIDEO_ID => 'CONTENT_CMS_VIDEO_ID', + self::CONTENT_ID => 'CONTENT_ID', + self::CONTENT_MAPPING_PRESENCE => 'CONTENT_MAPPING_PRESENCE', + self::CONTENT_MAPPING_PRESENCE_NAME => 'CONTENT_MAPPING_PRESENCE_NAME', + self::CONTENT_NAME => 'CONTENT_NAME', + self::CONTINENT => 'CONTINENT', + self::CONTINENT_NAME => 'CONTINENT_NAME', + self::COUNTRY_CODE => 'COUNTRY_CODE', + self::COUNTRY_ID => 'COUNTRY_ID', + self::COUNTRY_NAME => 'COUNTRY_NAME', + self::CREATIVE_BILLING_TYPE => 'CREATIVE_BILLING_TYPE', + self::CREATIVE_BILLING_TYPE_NAME => 'CREATIVE_BILLING_TYPE_NAME', + self::CREATIVE_CLICK_THROUGH_URL => 'CREATIVE_CLICK_THROUGH_URL', + self::CREATIVE_ID => 'CREATIVE_ID', + self::CREATIVE_NAME => 'CREATIVE_NAME', + self::CREATIVE_POLICIES_FILTERING => 'CREATIVE_POLICIES_FILTERING', + self::CREATIVE_POLICIES_FILTERING_NAME => 'CREATIVE_POLICIES_FILTERING_NAME', + self::CREATIVE_PROTECTIONS_FILTERING => 'CREATIVE_PROTECTIONS_FILTERING', + self::CREATIVE_PROTECTIONS_FILTERING_NAME => 'CREATIVE_PROTECTIONS_FILTERING_NAME', + self::CREATIVE_SET_ROLE_TYPE => 'CREATIVE_SET_ROLE_TYPE', + self::CREATIVE_SET_ROLE_TYPE_NAME => 'CREATIVE_SET_ROLE_TYPE_NAME', + self::CREATIVE_TECHNOLOGY => 'CREATIVE_TECHNOLOGY', + self::CREATIVE_TECHNOLOGY_NAME => 'CREATIVE_TECHNOLOGY_NAME', + self::CREATIVE_THIRD_PARTY_VENDOR => 'CREATIVE_THIRD_PARTY_VENDOR', + self::CREATIVE_TYPE => 'CREATIVE_TYPE', + self::CREATIVE_TYPE_NAME => 'CREATIVE_TYPE_NAME', + self::CREATIVE_VENDOR_ID => 'CREATIVE_VENDOR_ID', + self::CREATIVE_VENDOR_NAME => 'CREATIVE_VENDOR_NAME', + self::CREATIVE_VIDEO_REDIRECT_THIRD_PARTY => 'CREATIVE_VIDEO_REDIRECT_THIRD_PARTY', + self::CURATOR_ID => 'CURATOR_ID', + self::CURATOR_NAME => 'CURATOR_NAME', + self::CUSTOM_EVENT_ID => 'CUSTOM_EVENT_ID', + self::CUSTOM_EVENT_NAME => 'CUSTOM_EVENT_NAME', + self::CUSTOM_EVENT_TYPE => 'CUSTOM_EVENT_TYPE', + self::CUSTOM_EVENT_TYPE_NAME => 'CUSTOM_EVENT_TYPE_NAME', + self::CUSTOM_SPOT_ID => 'CUSTOM_SPOT_ID', + self::CUSTOM_SPOT_NAME => 'CUSTOM_SPOT_NAME', + self::DATE => 'DATE', + self::DAY_OF_WEEK => 'DAY_OF_WEEK', + self::DEAL_BUYER_ID => 'DEAL_BUYER_ID', + self::DEAL_BUYER_NAME => 'DEAL_BUYER_NAME', + self::DEAL_ID => 'DEAL_ID', + self::DEAL_NAME => 'DEAL_NAME', + self::DELIVERED_SECURE_SIGNAL_ID => 'DELIVERED_SECURE_SIGNAL_ID', + self::DELIVERED_SECURE_SIGNAL_NAME => 'DELIVERED_SECURE_SIGNAL_NAME', + self::DEMAND_CHANNEL => 'DEMAND_CHANNEL', + self::DEMAND_CHANNEL_NAME => 'DEMAND_CHANNEL_NAME', + self::DEMAND_SOURCE => 'DEMAND_SOURCE', + self::DEMAND_SOURCE_NAME => 'DEMAND_SOURCE_NAME', + self::DEMAND_SUBCHANNEL => 'DEMAND_SUBCHANNEL', + self::DEMAND_SUBCHANNEL_NAME => 'DEMAND_SUBCHANNEL_NAME', + self::DEVICE => 'DEVICE', + self::DEVICE_CATEGORY => 'DEVICE_CATEGORY', + self::DEVICE_CATEGORY_NAME => 'DEVICE_CATEGORY_NAME', + self::DEVICE_MANUFACTURER_ID => 'DEVICE_MANUFACTURER_ID', + self::DEVICE_MANUFACTURER_NAME => 'DEVICE_MANUFACTURER_NAME', + self::DEVICE_MODEL_ID => 'DEVICE_MODEL_ID', + self::DEVICE_MODEL_NAME => 'DEVICE_MODEL_NAME', + self::DEVICE_NAME => 'DEVICE_NAME', + self::DSP_SEAT_ID => 'DSP_SEAT_ID', + self::DYNAMIC_ALLOCATION_TYPE => 'DYNAMIC_ALLOCATION_TYPE', + self::DYNAMIC_ALLOCATION_TYPE_NAME => 'DYNAMIC_ALLOCATION_TYPE_NAME', + self::ESP_DELIVERY => 'ESP_DELIVERY', + self::ESP_DELIVERY_NAME => 'ESP_DELIVERY_NAME', + self::ESP_PRESENCE => 'ESP_PRESENCE', + self::ESP_PRESENCE_NAME => 'ESP_PRESENCE_NAME', + self::EXCHANGE_BIDDING_DEAL_ID => 'EXCHANGE_BIDDING_DEAL_ID', + self::EXCHANGE_BIDDING_DEAL_TYPE => 'EXCHANGE_BIDDING_DEAL_TYPE', + self::EXCHANGE_BIDDING_DEAL_TYPE_NAME => 'EXCHANGE_BIDDING_DEAL_TYPE_NAME', + self::EXCHANGE_THIRD_PARTY_COMPANY_ID => 'EXCHANGE_THIRD_PARTY_COMPANY_ID', + self::EXCHANGE_THIRD_PARTY_COMPANY_NAME => 'EXCHANGE_THIRD_PARTY_COMPANY_NAME', + self::FIRST_LOOK_PRICING_RULE_ID => 'FIRST_LOOK_PRICING_RULE_ID', + self::FIRST_LOOK_PRICING_RULE_NAME => 'FIRST_LOOK_PRICING_RULE_NAME', + self::FIRST_PARTY_ID_STATUS => 'FIRST_PARTY_ID_STATUS', + self::FIRST_PARTY_ID_STATUS_NAME => 'FIRST_PARTY_ID_STATUS_NAME', + self::GENDER => 'GENDER', + self::GENDER_NAME => 'GENDER_NAME', + self::GOOGLE_ANALYTICS_STREAM_ID => 'GOOGLE_ANALYTICS_STREAM_ID', + self::GOOGLE_ANALYTICS_STREAM_NAME => 'GOOGLE_ANALYTICS_STREAM_NAME', + self::HBT_YIELD_PARTNER_ID => 'HBT_YIELD_PARTNER_ID', + self::HBT_YIELD_PARTNER_NAME => 'HBT_YIELD_PARTNER_NAME', + self::HEADER_BIDDER_INTEGRATION_TYPE => 'HEADER_BIDDER_INTEGRATION_TYPE', + self::HEADER_BIDDER_INTEGRATION_TYPE_NAME => 'HEADER_BIDDER_INTEGRATION_TYPE_NAME', + self::HOUR => 'HOUR', + self::IMPRESSION_COUNTING_METHOD => 'IMPRESSION_COUNTING_METHOD', + self::IMPRESSION_COUNTING_METHOD_NAME => 'IMPRESSION_COUNTING_METHOD_NAME', + self::INTERACTION_TYPE => 'INTERACTION_TYPE', + self::INTERACTION_TYPE_NAME => 'INTERACTION_TYPE_NAME', + self::INTEREST => 'INTEREST', + self::INVENTORY_FORMAT => 'INVENTORY_FORMAT', + self::INVENTORY_FORMAT_NAME => 'INVENTORY_FORMAT_NAME', + self::INVENTORY_SHARE_ASSIGNMENT_ID => 'INVENTORY_SHARE_ASSIGNMENT_ID', + self::INVENTORY_SHARE_ASSIGNMENT_NAME => 'INVENTORY_SHARE_ASSIGNMENT_NAME', + self::INVENTORY_SHARE_OUTCOME => 'INVENTORY_SHARE_OUTCOME', + self::INVENTORY_SHARE_OUTCOME_NAME => 'INVENTORY_SHARE_OUTCOME_NAME', + self::INVENTORY_SHARE_PARTNER_AD_SERVER => 'INVENTORY_SHARE_PARTNER_AD_SERVER', + self::INVENTORY_SHARE_PARTNER_AD_SERVER_NAME => 'INVENTORY_SHARE_PARTNER_AD_SERVER_NAME', + self::INVENTORY_SHARE_TARGET_SHARE_PERCENT => 'INVENTORY_SHARE_TARGET_SHARE_PERCENT', + self::INVENTORY_SHARE_TYPE => 'INVENTORY_SHARE_TYPE', + self::INVENTORY_SHARE_TYPE_NAME => 'INVENTORY_SHARE_TYPE_NAME', + self::INVENTORY_TYPE => 'INVENTORY_TYPE', + self::INVENTORY_TYPE_NAME => 'INVENTORY_TYPE_NAME', + self::IS_ADX_DIRECT => 'IS_ADX_DIRECT', + self::IS_CURATION_TARGETED => 'IS_CURATION_TARGETED', + self::IS_DROPPED => 'IS_DROPPED', + self::IS_FIRST_LOOK_DEAL => 'IS_FIRST_LOOK_DEAL', + self::KEY_VALUES_ID => 'KEY_VALUES_ID', + self::KEY_VALUES_NAME => 'KEY_VALUES_NAME', + self::LINE_ITEM_AGENCY => 'LINE_ITEM_AGENCY', + self::LINE_ITEM_ARCHIVED => 'LINE_ITEM_ARCHIVED', + self::LINE_ITEM_COMPANION_DELIVERY_OPTION => 'LINE_ITEM_COMPANION_DELIVERY_OPTION', + self::LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME => 'LINE_ITEM_COMPANION_DELIVERY_OPTION_NAME', + self::LINE_ITEM_COMPUTED_STATUS => 'LINE_ITEM_COMPUTED_STATUS', + self::LINE_ITEM_COMPUTED_STATUS_NAME => 'LINE_ITEM_COMPUTED_STATUS_NAME', + self::LINE_ITEM_CONTRACTED_QUANTITY => 'LINE_ITEM_CONTRACTED_QUANTITY', + self::LINE_ITEM_COST_PER_UNIT => 'LINE_ITEM_COST_PER_UNIT', + self::LINE_ITEM_COST_TYPE => 'LINE_ITEM_COST_TYPE', + self::LINE_ITEM_COST_TYPE_NAME => 'LINE_ITEM_COST_TYPE_NAME', + self::LINE_ITEM_CREATIVE_END_DATE => 'LINE_ITEM_CREATIVE_END_DATE', + self::LINE_ITEM_CREATIVE_ROTATION_TYPE => 'LINE_ITEM_CREATIVE_ROTATION_TYPE', + self::LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME => 'LINE_ITEM_CREATIVE_ROTATION_TYPE_NAME', + self::LINE_ITEM_CREATIVE_START_DATE => 'LINE_ITEM_CREATIVE_START_DATE', + self::LINE_ITEM_CURRENCY_CODE => 'LINE_ITEM_CURRENCY_CODE', + self::LINE_ITEM_DELIVERY_INDICATOR => 'LINE_ITEM_DELIVERY_INDICATOR', + self::LINE_ITEM_DELIVERY_RATE_TYPE => 'LINE_ITEM_DELIVERY_RATE_TYPE', + self::LINE_ITEM_DELIVERY_RATE_TYPE_NAME => 'LINE_ITEM_DELIVERY_RATE_TYPE_NAME', + self::LINE_ITEM_DISCOUNT_ABSOLUTE => 'LINE_ITEM_DISCOUNT_ABSOLUTE', + self::LINE_ITEM_DISCOUNT_PERCENTAGE => 'LINE_ITEM_DISCOUNT_PERCENTAGE', + self::LINE_ITEM_END_DATE => 'LINE_ITEM_END_DATE', + self::LINE_ITEM_END_DATE_TIME => 'LINE_ITEM_END_DATE_TIME', + self::LINE_ITEM_ENVIRONMENT_TYPE => 'LINE_ITEM_ENVIRONMENT_TYPE', + self::LINE_ITEM_ENVIRONMENT_TYPE_NAME => 'LINE_ITEM_ENVIRONMENT_TYPE_NAME', + self::LINE_ITEM_EXTERNAL_DEAL_ID => 'LINE_ITEM_EXTERNAL_DEAL_ID', + self::LINE_ITEM_EXTERNAL_ID => 'LINE_ITEM_EXTERNAL_ID', + self::LINE_ITEM_FREQUENCY_CAP => 'LINE_ITEM_FREQUENCY_CAP', + self::LINE_ITEM_ID => 'LINE_ITEM_ID', + self::LINE_ITEM_LABELS => 'LINE_ITEM_LABELS', + self::LINE_ITEM_LABEL_IDS => 'LINE_ITEM_LABEL_IDS', + self::LINE_ITEM_LAST_MODIFIED_BY_APP => 'LINE_ITEM_LAST_MODIFIED_BY_APP', + self::LINE_ITEM_LIFETIME_CLICKS => 'LINE_ITEM_LIFETIME_CLICKS', + self::LINE_ITEM_LIFETIME_IMPRESSIONS => 'LINE_ITEM_LIFETIME_IMPRESSIONS', + self::LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS => 'LINE_ITEM_LIFETIME_VIEWABLE_IMPRESSIONS', + self::LINE_ITEM_MAKEGOOD => 'LINE_ITEM_MAKEGOOD', + self::LINE_ITEM_NAME => 'LINE_ITEM_NAME', + self::LINE_ITEM_NON_CPD_BOOKED_REVENUE => 'LINE_ITEM_NON_CPD_BOOKED_REVENUE', + self::LINE_ITEM_OPTIMIZABLE => 'LINE_ITEM_OPTIMIZABLE', + self::LINE_ITEM_PO_NUMBER => 'LINE_ITEM_PO_NUMBER', + self::LINE_ITEM_PRIMARY_GOAL_TYPE => 'LINE_ITEM_PRIMARY_GOAL_TYPE', + self::LINE_ITEM_PRIMARY_GOAL_TYPE_NAME => 'LINE_ITEM_PRIMARY_GOAL_TYPE_NAME', + self::LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE => 'LINE_ITEM_PRIMARY_GOAL_UNITS_ABSOLUTE', + self::LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE => 'LINE_ITEM_PRIMARY_GOAL_UNITS_PERCENTAGE', + self::LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE => 'LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE', + self::LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME => 'LINE_ITEM_PRIMARY_GOAL_UNIT_TYPE_NAME', + self::LINE_ITEM_PRIORITY => 'LINE_ITEM_PRIORITY', + self::LINE_ITEM_RESERVATION_STATUS => 'LINE_ITEM_RESERVATION_STATUS', + self::LINE_ITEM_RESERVATION_STATUS_NAME => 'LINE_ITEM_RESERVATION_STATUS_NAME', + self::LINE_ITEM_SALESPERSON => 'LINE_ITEM_SALESPERSON', + self::LINE_ITEM_SECONDARY_SALESPEOPLE => 'LINE_ITEM_SECONDARY_SALESPEOPLE', + self::LINE_ITEM_SECONDARY_TRAFFICKERS => 'LINE_ITEM_SECONDARY_TRAFFICKERS', + self::LINE_ITEM_START_DATE => 'LINE_ITEM_START_DATE', + self::LINE_ITEM_START_DATE_TIME => 'LINE_ITEM_START_DATE_TIME', + self::LINE_ITEM_TRAFFICKER => 'LINE_ITEM_TRAFFICKER', + self::LINE_ITEM_TYPE => 'LINE_ITEM_TYPE', + self::LINE_ITEM_TYPE_NAME => 'LINE_ITEM_TYPE_NAME', + self::LINE_ITEM_UNLIMITED_END => 'LINE_ITEM_UNLIMITED_END', + self::LINE_ITEM_VALUE_COST_PER_UNIT => 'LINE_ITEM_VALUE_COST_PER_UNIT', + self::LINE_ITEM_WEB_PROPERTY_CODE => 'LINE_ITEM_WEB_PROPERTY_CODE', + self::MASTER_COMPANION_CREATIVE_ID => 'MASTER_COMPANION_CREATIVE_ID', + self::MASTER_COMPANION_CREATIVE_NAME => 'MASTER_COMPANION_CREATIVE_NAME', + self::MEDIATION_TYPE => 'MEDIATION_TYPE', + self::MEDIATION_TYPE_NAME => 'MEDIATION_TYPE_NAME', + self::MEDIATION_YIELD_PARTNER_ID => 'MEDIATION_YIELD_PARTNER_ID', + self::MEDIATION_YIELD_PARTNER_NAME => 'MEDIATION_YIELD_PARTNER_NAME', + self::METRO_ID => 'METRO_ID', + self::METRO_NAME => 'METRO_NAME', + self::MOBILE_APP_FREE => 'MOBILE_APP_FREE', + self::MOBILE_APP_ICON_URL => 'MOBILE_APP_ICON_URL', + self::MOBILE_APP_ID => 'MOBILE_APP_ID', + self::MOBILE_APP_NAME => 'MOBILE_APP_NAME', + self::MOBILE_APP_OWNERSHIP_STATUS => 'MOBILE_APP_OWNERSHIP_STATUS', + self::MOBILE_APP_OWNERSHIP_STATUS_NAME => 'MOBILE_APP_OWNERSHIP_STATUS_NAME', + self::MOBILE_APP_STORE => 'MOBILE_APP_STORE', + self::MOBILE_APP_STORE_NAME => 'MOBILE_APP_STORE_NAME', + self::MOBILE_INVENTORY_TYPE => 'MOBILE_INVENTORY_TYPE', + self::MOBILE_INVENTORY_TYPE_NAME => 'MOBILE_INVENTORY_TYPE_NAME', + self::MOBILE_RENDERING_SDK => 'MOBILE_RENDERING_SDK', + self::MOBILE_RENDERING_SDK_NAME => 'MOBILE_RENDERING_SDK_NAME', + self::MOBILE_SDK_MAJOR_VERSION => 'MOBILE_SDK_MAJOR_VERSION', + self::MOBILE_SDK_MINOR_VERSION => 'MOBILE_SDK_MINOR_VERSION', + self::MOBILE_SDK_VERSION_NAME => 'MOBILE_SDK_VERSION_NAME', + self::MONTH_YEAR => 'MONTH_YEAR', + self::NATIVE_AD_FORMAT_ID => 'NATIVE_AD_FORMAT_ID', + self::NATIVE_AD_FORMAT_NAME => 'NATIVE_AD_FORMAT_NAME', + self::NATIVE_STYLE_ID => 'NATIVE_STYLE_ID', + self::NATIVE_STYLE_NAME => 'NATIVE_STYLE_NAME', + self::NO_FILL_REASON_CATEGORY => 'NO_FILL_REASON_CATEGORY', + self::NO_FILL_REASON_CATEGORY_NAME => 'NO_FILL_REASON_CATEGORY_NAME', + self::OPERATING_SYSTEM_CATEGORY => 'OPERATING_SYSTEM_CATEGORY', + self::OPERATING_SYSTEM_CATEGORY_NAME => 'OPERATING_SYSTEM_CATEGORY_NAME', + self::OPERATING_SYSTEM_VERSION_ID => 'OPERATING_SYSTEM_VERSION_ID', + self::OPERATING_SYSTEM_VERSION_NAME => 'OPERATING_SYSTEM_VERSION_NAME', + self::OPTIMIZATION_TYPE => 'OPTIMIZATION_TYPE', + self::OPTIMIZATION_TYPE_NAME => 'OPTIMIZATION_TYPE_NAME', + self::ORDER_AGENCY => 'ORDER_AGENCY', + self::ORDER_AGENCY_ID => 'ORDER_AGENCY_ID', + self::ORDER_BOOKED_CPC => 'ORDER_BOOKED_CPC', + self::ORDER_BOOKED_CPM => 'ORDER_BOOKED_CPM', + self::ORDER_DELIVERY_STATUS => 'ORDER_DELIVERY_STATUS', + self::ORDER_DELIVERY_STATUS_NAME => 'ORDER_DELIVERY_STATUS_NAME', + self::ORDER_END_DATE => 'ORDER_END_DATE', + self::ORDER_END_DATE_TIME => 'ORDER_END_DATE_TIME', + self::ORDER_EXTERNAL_ID => 'ORDER_EXTERNAL_ID', + self::ORDER_ID => 'ORDER_ID', + self::ORDER_LABELS => 'ORDER_LABELS', + self::ORDER_LABEL_IDS => 'ORDER_LABEL_IDS', + self::ORDER_LIFETIME_CLICKS => 'ORDER_LIFETIME_CLICKS', + self::ORDER_LIFETIME_IMPRESSIONS => 'ORDER_LIFETIME_IMPRESSIONS', + self::ORDER_NAME => 'ORDER_NAME', + self::ORDER_PO_NUMBER => 'ORDER_PO_NUMBER', + self::ORDER_PROGRAMMATIC => 'ORDER_PROGRAMMATIC', + self::ORDER_SALESPERSON => 'ORDER_SALESPERSON', + self::ORDER_SALESPERSON_ID => 'ORDER_SALESPERSON_ID', + self::ORDER_SECONDARY_SALESPEOPLE => 'ORDER_SECONDARY_SALESPEOPLE', + self::ORDER_SECONDARY_SALESPEOPLE_ID => 'ORDER_SECONDARY_SALESPEOPLE_ID', + self::ORDER_SECONDARY_TRAFFICKERS => 'ORDER_SECONDARY_TRAFFICKERS', + self::ORDER_SECONDARY_TRAFFICKERS_ID => 'ORDER_SECONDARY_TRAFFICKERS_ID', + self::ORDER_START_DATE => 'ORDER_START_DATE', + self::ORDER_START_DATE_TIME => 'ORDER_START_DATE_TIME', + self::ORDER_TRAFFICKER => 'ORDER_TRAFFICKER', + self::ORDER_TRAFFICKER_ID => 'ORDER_TRAFFICKER_ID', + self::ORDER_UNLIMITED_END => 'ORDER_UNLIMITED_END', + self::PAGE_PATH => 'PAGE_PATH', + self::PAGE_TITLE_AND_SCREEN_CLASS => 'PAGE_TITLE_AND_SCREEN_CLASS', + self::PAGE_TITLE_AND_SCREEN_NAME => 'PAGE_TITLE_AND_SCREEN_NAME', + self::PLACEMENT_ID => 'PLACEMENT_ID', + self::PLACEMENT_ID_ALL => 'PLACEMENT_ID_ALL', + self::PLACEMENT_NAME => 'PLACEMENT_NAME', + self::PLACEMENT_NAME_ALL => 'PLACEMENT_NAME_ALL', + self::PLACEMENT_STATUS => 'PLACEMENT_STATUS', + self::PLACEMENT_STATUS_NAME => 'PLACEMENT_STATUS_NAME', + self::PLACEMENT_STATUS_NAME_ALL => 'PLACEMENT_STATUS_NAME_ALL', + self::POSTAL_CODE_ID => 'POSTAL_CODE_ID', + self::POSTAL_CODE_NAME => 'POSTAL_CODE_NAME', + self::PPID_STATUS => 'PPID_STATUS', + self::PPID_STATUS_NAME => 'PPID_STATUS_NAME', + self::PREDICTED_VIEWABILITY_BUCKET => 'PREDICTED_VIEWABILITY_BUCKET', + self::PREDICTED_VIEWABILITY_BUCKET_NAME => 'PREDICTED_VIEWABILITY_BUCKET_NAME', + self::PRESENTED_SECURE_SIGNAL_ID => 'PRESENTED_SECURE_SIGNAL_ID', + self::PRESENTED_SECURE_SIGNAL_NAME => 'PRESENTED_SECURE_SIGNAL_NAME', + self::PRIMARY_PERSONALIZATION_ID_TYPE => 'PRIMARY_PERSONALIZATION_ID_TYPE', + self::PRIMARY_PERSONALIZATION_ID_TYPE_NAME => 'PRIMARY_PERSONALIZATION_ID_TYPE_NAME', + self::PROGRAMMATIC_BUYER_ID => 'PROGRAMMATIC_BUYER_ID', + self::PROGRAMMATIC_BUYER_NAME => 'PROGRAMMATIC_BUYER_NAME', + self::PROGRAMMATIC_CHANNEL => 'PROGRAMMATIC_CHANNEL', + self::PROGRAMMATIC_CHANNEL_NAME => 'PROGRAMMATIC_CHANNEL_NAME', + self::PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE => 'PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_EXTERNAL_CODE', + self::PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS => 'PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_IDS', + self::PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME => 'PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_NAME', + self::PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER => 'PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TIER', + self::PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE => 'PUBLISHER_PROVIDED_SIGNALS_ALL_LEVELS_TYPE', + self::PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE => 'PUBLISHER_PROVIDED_SIGNALS_DELIVERED_EXTERNAL_CODE', + self::PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS => 'PUBLISHER_PROVIDED_SIGNALS_DELIVERED_IDS', + self::PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME => 'PUBLISHER_PROVIDED_SIGNALS_DELIVERED_NAME', + self::PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER => 'PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TIER', + self::PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE => 'PUBLISHER_PROVIDED_SIGNALS_DELIVERED_TYPE', + self::PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE => 'PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_EXTERNAL_CODE', + self::PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID => 'PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_ID', + self::PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME => 'PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_NAME', + self::PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER => 'PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TIER', + self::PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE => 'PUBLISHER_PROVIDED_SIGNALS_TOP_LEVEL_TYPE', + self::PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID => 'PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_ID', + self::PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME => 'PUBLISHER_PROVIDED_SIGNAL_DATA_PROVIDER_NAME', + self::REGION_ID => 'REGION_ID', + self::REGION_NAME => 'REGION_NAME', + self::REJECTION_CLASS_CATEGORY => 'REJECTION_CLASS_CATEGORY', + self::REJECTION_CLASS_CATEGORY_NAME => 'REJECTION_CLASS_CATEGORY_NAME', + self::RENDERED_CREATIVE_SIZE => 'RENDERED_CREATIVE_SIZE', + self::REQUESTED_AD_SIZES => 'REQUESTED_AD_SIZES', + self::REQUEST_TYPE => 'REQUEST_TYPE', + self::REQUEST_TYPE_NAME => 'REQUEST_TYPE_NAME', + self::SERVER_SIDE_UNWRAPPING_ELIGIBLE => 'SERVER_SIDE_UNWRAPPING_ELIGIBLE', + self::SERVING_RESTRICTION => 'SERVING_RESTRICTION', + self::SERVING_RESTRICTION_NAME => 'SERVING_RESTRICTION_NAME', + self::SITE => 'SITE', + self::TARGETING_ID => 'TARGETING_ID', + self::TARGETING_NAME => 'TARGETING_NAME', + self::TARGETING_TYPE => 'TARGETING_TYPE', + self::TARGETING_TYPE_NAME => 'TARGETING_TYPE_NAME', + self::THIRD_PARTY_ID_STATUS => 'THIRD_PARTY_ID_STATUS', + self::THIRD_PARTY_ID_STATUS_NAME => 'THIRD_PARTY_ID_STATUS_NAME', + self::TOPICS_STATUS => 'TOPICS_STATUS', + self::TOPICS_STATUS_NAME => 'TOPICS_STATUS_NAME', + self::TOP_PRIVATE_DOMAIN => 'TOP_PRIVATE_DOMAIN', + self::TRAFFIC_SOURCE => 'TRAFFIC_SOURCE', + self::TRAFFIC_SOURCE_NAME => 'TRAFFIC_SOURCE_NAME', + self::UNIFIED_PRICING_RULE_ID => 'UNIFIED_PRICING_RULE_ID', + self::UNIFIED_PRICING_RULE_NAME => 'UNIFIED_PRICING_RULE_NAME', + self::URL => 'URL', + self::URL_ID => 'URL_ID', + self::USER_MESSAGES_ENTITLEMENT_SOURCE => 'USER_MESSAGES_ENTITLEMENT_SOURCE', + self::USER_MESSAGES_ENTITLEMENT_SOURCE_NAME => 'USER_MESSAGES_ENTITLEMENT_SOURCE_NAME', + self::USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID => 'USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_ID', + self::USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME => 'USER_MESSAGES_OPERATING_SYSTEM_CRITERIA_NAME', + self::VAST_VERSION => 'VAST_VERSION', + self::VAST_VERSION_NAME => 'VAST_VERSION_NAME', + self::VIDEO_AD_BREAK_TYPE => 'VIDEO_AD_BREAK_TYPE', + self::VIDEO_AD_BREAK_TYPE_NAME => 'VIDEO_AD_BREAK_TYPE_NAME', + self::VIDEO_AD_DURATION => 'VIDEO_AD_DURATION', + self::VIDEO_AD_FORMATS_RULE => 'VIDEO_AD_FORMATS_RULE', + self::VIDEO_AD_FORMATS_RULE_ID => 'VIDEO_AD_FORMATS_RULE_ID', + self::VIDEO_AD_REQUEST_DURATION => 'VIDEO_AD_REQUEST_DURATION', + self::VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME => 'VIDEO_AD_REQUEST_DURATION_MIDPOINT_NAME', + self::VIDEO_AD_REQUEST_DURATION_NAME => 'VIDEO_AD_REQUEST_DURATION_NAME', + self::VIDEO_AD_REQUEST_SOURCE => 'VIDEO_AD_REQUEST_SOURCE', + self::VIDEO_AD_REQUEST_SOURCE_NAME => 'VIDEO_AD_REQUEST_SOURCE_NAME', + self::VIDEO_AD_TYPE => 'VIDEO_AD_TYPE', + self::VIDEO_AD_TYPE_NAME => 'VIDEO_AD_TYPE_NAME', + self::VIDEO_CONTINUOUS_PLAY_TYPE => 'VIDEO_CONTINUOUS_PLAY_TYPE', + self::VIDEO_CONTINUOUS_PLAY_TYPE_NAME => 'VIDEO_CONTINUOUS_PLAY_TYPE_NAME', + self::VIDEO_FALLBACK_POSITION => 'VIDEO_FALLBACK_POSITION', + self::VIDEO_MEASUREMENT_SOURCE => 'VIDEO_MEASUREMENT_SOURCE', + self::VIDEO_MEASUREMENT_SOURCE_NAME => 'VIDEO_MEASUREMENT_SOURCE_NAME', + self::VIDEO_PLCMT => 'VIDEO_PLCMT', + self::VIDEO_PLCMT_NAME => 'VIDEO_PLCMT_NAME', + self::VIDEO_POSITION_IN_POD => 'VIDEO_POSITION_IN_POD', + self::VIDEO_POSITION_OF_POD => 'VIDEO_POSITION_OF_POD', + self::VIDEO_SDK_VERSION => 'VIDEO_SDK_VERSION', + self::VIDEO_SDK_VERSION_NAME => 'VIDEO_SDK_VERSION_NAME', + self::VIDEO_STITCHER_TYPE => 'VIDEO_STITCHER_TYPE', + self::VIDEO_STITCHER_TYPE_NAME => 'VIDEO_STITCHER_TYPE_NAME', + self::WEEK => 'WEEK', + self::YIELD_GROUP_BUYER_NAME => 'YIELD_GROUP_BUYER_NAME', + self::YIELD_GROUP_BUYER_TAG_NAME => 'YIELD_GROUP_BUYER_TAG_NAME', + self::YIELD_GROUP_ID => 'YIELD_GROUP_ID', + self::YIELD_GROUP_NAME => 'YIELD_GROUP_NAME', + self::YOUTUBE_AD_DURATION_BUCKET => 'YOUTUBE_AD_DURATION_BUCKET', + self::YOUTUBE_AD_DURATION_BUCKET_NAME => 'YOUTUBE_AD_DURATION_BUCKET_NAME', + self::YOUTUBE_AD_TYPE => 'YOUTUBE_AD_TYPE', + self::YOUTUBE_AD_TYPE_NAME => 'YOUTUBE_AD_TYPE_NAME', + self::LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID => 'LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID', + self::LINE_ITEM_CUSTOM_FIELD_0_VALUE => 'LINE_ITEM_CUSTOM_FIELD_0_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_1_VALUE => 'LINE_ITEM_CUSTOM_FIELD_1_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_2_VALUE => 'LINE_ITEM_CUSTOM_FIELD_2_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_3_VALUE => 'LINE_ITEM_CUSTOM_FIELD_3_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_4_VALUE => 'LINE_ITEM_CUSTOM_FIELD_4_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_5_VALUE => 'LINE_ITEM_CUSTOM_FIELD_5_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_6_VALUE => 'LINE_ITEM_CUSTOM_FIELD_6_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_7_VALUE => 'LINE_ITEM_CUSTOM_FIELD_7_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_8_VALUE => 'LINE_ITEM_CUSTOM_FIELD_8_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_9_VALUE => 'LINE_ITEM_CUSTOM_FIELD_9_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_10_VALUE => 'LINE_ITEM_CUSTOM_FIELD_10_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_11_VALUE => 'LINE_ITEM_CUSTOM_FIELD_11_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_12_VALUE => 'LINE_ITEM_CUSTOM_FIELD_12_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_13_VALUE => 'LINE_ITEM_CUSTOM_FIELD_13_VALUE', + self::LINE_ITEM_CUSTOM_FIELD_14_VALUE => 'LINE_ITEM_CUSTOM_FIELD_14_VALUE', + self::ORDER_CUSTOM_FIELD_0_OPTION_ID => 'ORDER_CUSTOM_FIELD_0_OPTION_ID', + self::ORDER_CUSTOM_FIELD_1_OPTION_ID => 'ORDER_CUSTOM_FIELD_1_OPTION_ID', + self::ORDER_CUSTOM_FIELD_2_OPTION_ID => 'ORDER_CUSTOM_FIELD_2_OPTION_ID', + self::ORDER_CUSTOM_FIELD_3_OPTION_ID => 'ORDER_CUSTOM_FIELD_3_OPTION_ID', + self::ORDER_CUSTOM_FIELD_4_OPTION_ID => 'ORDER_CUSTOM_FIELD_4_OPTION_ID', + self::ORDER_CUSTOM_FIELD_5_OPTION_ID => 'ORDER_CUSTOM_FIELD_5_OPTION_ID', + self::ORDER_CUSTOM_FIELD_6_OPTION_ID => 'ORDER_CUSTOM_FIELD_6_OPTION_ID', + self::ORDER_CUSTOM_FIELD_7_OPTION_ID => 'ORDER_CUSTOM_FIELD_7_OPTION_ID', + self::ORDER_CUSTOM_FIELD_8_OPTION_ID => 'ORDER_CUSTOM_FIELD_8_OPTION_ID', + self::ORDER_CUSTOM_FIELD_9_OPTION_ID => 'ORDER_CUSTOM_FIELD_9_OPTION_ID', + self::ORDER_CUSTOM_FIELD_10_OPTION_ID => 'ORDER_CUSTOM_FIELD_10_OPTION_ID', + self::ORDER_CUSTOM_FIELD_11_OPTION_ID => 'ORDER_CUSTOM_FIELD_11_OPTION_ID', + self::ORDER_CUSTOM_FIELD_12_OPTION_ID => 'ORDER_CUSTOM_FIELD_12_OPTION_ID', + self::ORDER_CUSTOM_FIELD_13_OPTION_ID => 'ORDER_CUSTOM_FIELD_13_OPTION_ID', + self::ORDER_CUSTOM_FIELD_14_OPTION_ID => 'ORDER_CUSTOM_FIELD_14_OPTION_ID', + self::ORDER_CUSTOM_FIELD_0_VALUE => 'ORDER_CUSTOM_FIELD_0_VALUE', + self::ORDER_CUSTOM_FIELD_1_VALUE => 'ORDER_CUSTOM_FIELD_1_VALUE', + self::ORDER_CUSTOM_FIELD_2_VALUE => 'ORDER_CUSTOM_FIELD_2_VALUE', + self::ORDER_CUSTOM_FIELD_3_VALUE => 'ORDER_CUSTOM_FIELD_3_VALUE', + self::ORDER_CUSTOM_FIELD_4_VALUE => 'ORDER_CUSTOM_FIELD_4_VALUE', + self::ORDER_CUSTOM_FIELD_5_VALUE => 'ORDER_CUSTOM_FIELD_5_VALUE', + self::ORDER_CUSTOM_FIELD_6_VALUE => 'ORDER_CUSTOM_FIELD_6_VALUE', + self::ORDER_CUSTOM_FIELD_7_VALUE => 'ORDER_CUSTOM_FIELD_7_VALUE', + self::ORDER_CUSTOM_FIELD_8_VALUE => 'ORDER_CUSTOM_FIELD_8_VALUE', + self::ORDER_CUSTOM_FIELD_9_VALUE => 'ORDER_CUSTOM_FIELD_9_VALUE', + self::ORDER_CUSTOM_FIELD_10_VALUE => 'ORDER_CUSTOM_FIELD_10_VALUE', + self::ORDER_CUSTOM_FIELD_11_VALUE => 'ORDER_CUSTOM_FIELD_11_VALUE', + self::ORDER_CUSTOM_FIELD_12_VALUE => 'ORDER_CUSTOM_FIELD_12_VALUE', + self::ORDER_CUSTOM_FIELD_13_VALUE => 'ORDER_CUSTOM_FIELD_13_VALUE', + self::ORDER_CUSTOM_FIELD_14_VALUE => 'ORDER_CUSTOM_FIELD_14_VALUE', + self::CREATIVE_CUSTOM_FIELD_0_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_0_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_1_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_1_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_2_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_2_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_3_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_3_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_4_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_4_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_5_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_5_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_6_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_6_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_7_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_7_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_8_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_8_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_9_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_9_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_10_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_10_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_11_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_11_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_12_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_12_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_13_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_13_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_14_OPTION_ID => 'CREATIVE_CUSTOM_FIELD_14_OPTION_ID', + self::CREATIVE_CUSTOM_FIELD_0_VALUE => 'CREATIVE_CUSTOM_FIELD_0_VALUE', + self::CREATIVE_CUSTOM_FIELD_1_VALUE => 'CREATIVE_CUSTOM_FIELD_1_VALUE', + self::CREATIVE_CUSTOM_FIELD_2_VALUE => 'CREATIVE_CUSTOM_FIELD_2_VALUE', + self::CREATIVE_CUSTOM_FIELD_3_VALUE => 'CREATIVE_CUSTOM_FIELD_3_VALUE', + self::CREATIVE_CUSTOM_FIELD_4_VALUE => 'CREATIVE_CUSTOM_FIELD_4_VALUE', + self::CREATIVE_CUSTOM_FIELD_5_VALUE => 'CREATIVE_CUSTOM_FIELD_5_VALUE', + self::CREATIVE_CUSTOM_FIELD_6_VALUE => 'CREATIVE_CUSTOM_FIELD_6_VALUE', + self::CREATIVE_CUSTOM_FIELD_7_VALUE => 'CREATIVE_CUSTOM_FIELD_7_VALUE', + self::CREATIVE_CUSTOM_FIELD_8_VALUE => 'CREATIVE_CUSTOM_FIELD_8_VALUE', + self::CREATIVE_CUSTOM_FIELD_9_VALUE => 'CREATIVE_CUSTOM_FIELD_9_VALUE', + self::CREATIVE_CUSTOM_FIELD_10_VALUE => 'CREATIVE_CUSTOM_FIELD_10_VALUE', + self::CREATIVE_CUSTOM_FIELD_11_VALUE => 'CREATIVE_CUSTOM_FIELD_11_VALUE', + self::CREATIVE_CUSTOM_FIELD_12_VALUE => 'CREATIVE_CUSTOM_FIELD_12_VALUE', + self::CREATIVE_CUSTOM_FIELD_13_VALUE => 'CREATIVE_CUSTOM_FIELD_13_VALUE', + self::CREATIVE_CUSTOM_FIELD_14_VALUE => 'CREATIVE_CUSTOM_FIELD_14_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_OPTION_ID', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_0_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_1_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_2_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_3_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_4_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_5_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_6_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_7_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_8_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_9_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_10_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_11_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_12_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_13_VALUE', + self::BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE => 'BACKFILL_LINE_ITEM_CUSTOM_FIELD_14_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_0_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_1_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_2_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_3_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_4_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_5_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_6_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_7_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_8_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_9_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_10_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_11_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_12_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_13_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID => 'BACKFILL_ORDER_CUSTOM_FIELD_14_OPTION_ID', + self::BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_0_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_1_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_2_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_3_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_4_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_5_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_6_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_7_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_8_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_9_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_10_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_11_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_12_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_13_VALUE', + self::BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE => 'BACKFILL_ORDER_CUSTOM_FIELD_14_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_0_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_1_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_2_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_3_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_4_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_5_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_6_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_7_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_8_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_9_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_10_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_11_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_12_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_13_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID => 'BACKFILL_CREATIVE_CUSTOM_FIELD_14_OPTION_ID', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_0_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_1_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_2_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_3_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_4_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_5_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_6_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_7_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_8_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_9_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_10_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_11_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_12_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_13_VALUE', + self::BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE => 'BACKFILL_CREATIVE_CUSTOM_FIELD_14_VALUE', + self::CUSTOM_DIMENSION_0_VALUE_ID => 'CUSTOM_DIMENSION_0_VALUE_ID', + self::CUSTOM_DIMENSION_1_VALUE_ID => 'CUSTOM_DIMENSION_1_VALUE_ID', + self::CUSTOM_DIMENSION_2_VALUE_ID => 'CUSTOM_DIMENSION_2_VALUE_ID', + self::CUSTOM_DIMENSION_3_VALUE_ID => 'CUSTOM_DIMENSION_3_VALUE_ID', + self::CUSTOM_DIMENSION_4_VALUE_ID => 'CUSTOM_DIMENSION_4_VALUE_ID', + self::CUSTOM_DIMENSION_5_VALUE_ID => 'CUSTOM_DIMENSION_5_VALUE_ID', + self::CUSTOM_DIMENSION_6_VALUE_ID => 'CUSTOM_DIMENSION_6_VALUE_ID', + self::CUSTOM_DIMENSION_7_VALUE_ID => 'CUSTOM_DIMENSION_7_VALUE_ID', + self::CUSTOM_DIMENSION_8_VALUE_ID => 'CUSTOM_DIMENSION_8_VALUE_ID', + self::CUSTOM_DIMENSION_9_VALUE_ID => 'CUSTOM_DIMENSION_9_VALUE_ID', + self::CUSTOM_DIMENSION_0_VALUE => 'CUSTOM_DIMENSION_0_VALUE', + self::CUSTOM_DIMENSION_1_VALUE => 'CUSTOM_DIMENSION_1_VALUE', + self::CUSTOM_DIMENSION_2_VALUE => 'CUSTOM_DIMENSION_2_VALUE', + self::CUSTOM_DIMENSION_3_VALUE => 'CUSTOM_DIMENSION_3_VALUE', + self::CUSTOM_DIMENSION_4_VALUE => 'CUSTOM_DIMENSION_4_VALUE', + self::CUSTOM_DIMENSION_5_VALUE => 'CUSTOM_DIMENSION_5_VALUE', + self::CUSTOM_DIMENSION_6_VALUE => 'CUSTOM_DIMENSION_6_VALUE', + self::CUSTOM_DIMENSION_7_VALUE => 'CUSTOM_DIMENSION_7_VALUE', + self::CUSTOM_DIMENSION_8_VALUE => 'CUSTOM_DIMENSION_8_VALUE', + self::CUSTOM_DIMENSION_9_VALUE => 'CUSTOM_DIMENSION_9_VALUE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/Field.php b/AdsAdManager/src/V1/ReportDefinition/Field.php new file mode 100644 index 000000000000..eed45a84ef22 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/Field.php @@ -0,0 +1,109 @@ +google.ads.admanager.v1.ReportDefinition.Field + */ +class Field extends \Google\Protobuf\Internal\Message +{ + protected $field; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $dimension + * The dimension this field represents. + * @type int $metric + * The metric this field represents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); + parent::__construct($data); + } + + /** + * The dimension this field represents. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Dimension dimension = 1; + * @return int + */ + public function getDimension() + { + return $this->readOneof(1); + } + + public function hasDimension() + { + return $this->hasOneof(1); + } + + /** + * The dimension this field represents. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Dimension dimension = 1; + * @param int $var + * @return $this + */ + public function setDimension($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReportDefinition\Dimension::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The metric this field represents. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Metric metric = 2; + * @return int + */ + public function getMetric() + { + return $this->readOneof(2); + } + + public function hasMetric() + { + return $this->hasOneof(2); + } + + /** + * The metric this field represents. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Metric metric = 2; + * @param int $var + * @return $this + */ + public function setMetric($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReportDefinition\Metric::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getField() + { + return $this->whichOneof("field"); + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/Filter.php b/AdsAdManager/src/V1/ReportDefinition/Filter.php new file mode 100644 index 000000000000..91351b9116eb --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/Filter.php @@ -0,0 +1,175 @@ +google.ads.admanager.v1.ReportDefinition.Filter + */ +class Filter extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\ReportDefinition\Filter\FieldFilter $field_filter + * A filter on a single field. + * @type \Google\Ads\AdManager\V1\ReportDefinition\Filter $not_filter + * A filter whose result is negated. + * @type \Google\Ads\AdManager\V1\ReportDefinition\Filter\FilterList $and_filter + * A list of filters whose results are AND-ed. + * @type \Google\Ads\AdManager\V1\ReportDefinition\Filter\FilterList $or_filter + * A list of filters whose results are OR-ed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); + parent::__construct($data); + } + + /** + * A filter on a single field. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter field_filter = 1; + * @return \Google\Ads\AdManager\V1\ReportDefinition\Filter\FieldFilter|null + */ + public function getFieldFilter() + { + return $this->readOneof(1); + } + + public function hasFieldFilter() + { + return $this->hasOneof(1); + } + + /** + * A filter on a single field. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter field_filter = 1; + * @param \Google\Ads\AdManager\V1\ReportDefinition\Filter\FieldFilter $var + * @return $this + */ + public function setFieldFilter($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\Filter\FieldFilter::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A filter whose result is negated. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter not_filter = 2; + * @return \Google\Ads\AdManager\V1\ReportDefinition\Filter|null + */ + public function getNotFilter() + { + return $this->readOneof(2); + } + + public function hasNotFilter() + { + return $this->hasOneof(2); + } + + /** + * A filter whose result is negated. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter not_filter = 2; + * @param \Google\Ads\AdManager\V1\ReportDefinition\Filter $var + * @return $this + */ + public function setNotFilter($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\Filter::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A list of filters whose results are AND-ed. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter.FilterList and_filter = 3; + * @return \Google\Ads\AdManager\V1\ReportDefinition\Filter\FilterList|null + */ + public function getAndFilter() + { + return $this->readOneof(3); + } + + public function hasAndFilter() + { + return $this->hasOneof(3); + } + + /** + * A list of filters whose results are AND-ed. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter.FilterList and_filter = 3; + * @param \Google\Ads\AdManager\V1\ReportDefinition\Filter\FilterList $var + * @return $this + */ + public function setAndFilter($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\Filter\FilterList::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A list of filters whose results are OR-ed. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter.FilterList or_filter = 4; + * @return \Google\Ads\AdManager\V1\ReportDefinition\Filter\FilterList|null + */ + public function getOrFilter() + { + return $this->readOneof(4); + } + + public function hasOrFilter() + { + return $this->hasOneof(4); + } + + /** + * A list of filters whose results are OR-ed. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter.FilterList or_filter = 4; + * @param \Google\Ads\AdManager\V1\ReportDefinition\Filter\FilterList $var + * @return $this + */ + public function setOrFilter($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\Filter\FilterList::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/Filter/FieldFilter.php b/AdsAdManager/src/V1/ReportDefinition/Filter/FieldFilter.php new file mode 100644 index 000000000000..a0fe0ba70072 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/Filter/FieldFilter.php @@ -0,0 +1,286 @@ +google.ads.admanager.v1.ReportDefinition.Filter.FieldFilter + */ +class FieldFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field to filter on. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $field = null; + /** + * Required. The operation of this filter. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter.Operation operation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $operation = 0; + /** + * Required. Values to filter to. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue values = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $values; + /** + * Optional. Use to filter on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.Slice slice = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $slice = null; + /** + * Optional. When using time period columns, use this to filter on a + * specific column. + * + * Generated from protobuf field optional int32 time_period_index = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_period_index = null; + /** + * Optional. Use to specify which metric value type to filter on. Defaults + * to PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.MetricValueType metric_value_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metric_value_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\ReportDefinition\Field $field + * Required. The field to filter on. + * @type int $operation + * Required. The operation of this filter. + * @type array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $values + * Required. Values to filter to. + * @type \Google\Ads\AdManager\V1\ReportDefinition\Slice $slice + * Optional. Use to filter on a specific slice of data. + * @type int $time_period_index + * Optional. When using time period columns, use this to filter on a + * specific column. + * @type int $metric_value_type + * Optional. Use to specify which metric value type to filter on. Defaults + * to PRIMARY. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field to filter on. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\ReportDefinition\Field|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * Required. The field to filter on. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\ReportDefinition\Field $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\Field::class); + $this->field = $var; + + return $this; + } + + /** + * Required. The operation of this filter. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter.Operation operation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Required. The operation of this filter. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Filter.Operation operation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReportDefinition\Filter\Operation::class); + $this->operation = $var; + + return $this; + } + + /** + * Required. Values to filter to. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue values = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Required. Values to filter to. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportValue values = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\ReportValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportValue::class); + $this->values = $arr; + + return $this; + } + + /** + * Optional. Use to filter on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.Slice slice = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\ReportDefinition\Slice|null + */ + public function getSlice() + { + return $this->slice; + } + + public function hasSlice() + { + return isset($this->slice); + } + + public function clearSlice() + { + unset($this->slice); + } + + /** + * Optional. Use to filter on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.Slice slice = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\ReportDefinition\Slice $var + * @return $this + */ + public function setSlice($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\Slice::class); + $this->slice = $var; + + return $this; + } + + /** + * Optional. When using time period columns, use this to filter on a + * specific column. + * + * Generated from protobuf field optional int32 time_period_index = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTimePeriodIndex() + { + return isset($this->time_period_index) ? $this->time_period_index : 0; + } + + public function hasTimePeriodIndex() + { + return isset($this->time_period_index); + } + + public function clearTimePeriodIndex() + { + unset($this->time_period_index); + } + + /** + * Optional. When using time period columns, use this to filter on a + * specific column. + * + * Generated from protobuf field optional int32 time_period_index = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTimePeriodIndex($var) + { + GPBUtil::checkInt32($var); + $this->time_period_index = $var; + + return $this; + } + + /** + * Optional. Use to specify which metric value type to filter on. Defaults + * to PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.MetricValueType metric_value_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMetricValueType() + { + return isset($this->metric_value_type) ? $this->metric_value_type : 0; + } + + public function hasMetricValueType() + { + return isset($this->metric_value_type); + } + + public function clearMetricValueType() + { + unset($this->metric_value_type); + } + + /** + * Optional. Use to specify which metric value type to filter on. Defaults + * to PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.MetricValueType metric_value_type = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMetricValueType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReportDefinition\MetricValueType::class); + $this->metric_value_type = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/Filter/FilterList.php b/AdsAdManager/src/V1/ReportDefinition/Filter/FilterList.php new file mode 100644 index 000000000000..442fad071718 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/Filter/FilterList.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.ReportDefinition.Filter.FilterList + */ +class FilterList extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of filters. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\ReportDefinition\Filter>|\Google\Protobuf\Internal\RepeatedField $filters + * Required. A list of filters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of filters. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Required. A list of filters. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\ReportDefinition\Filter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportDefinition\Filter::class); + $this->filters = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/Filter/Operation.php b/AdsAdManager/src/V1/ReportDefinition/Filter/Operation.php new file mode 100644 index 000000000000..ab5012819d03 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/Filter/Operation.php @@ -0,0 +1,133 @@ +google.ads.admanager.v1.ReportDefinition.Filter.Operation + */ +class Operation +{ + /** + * For scalar operands, checks if the operand is in the set of provided + * filter values. + * For list operands, checks if any element in the operand is in the set + * of provided filter values. + * Default value. + * + * Generated from protobuf enum IN = 0; + */ + const IN = 0; + /** + * For scalar operands, checks that the operand is not in the set of + * provided filter values. + * For list operands, checks that none of the elements in the operand + * is in the set of provided filter values. + * + * Generated from protobuf enum NOT_IN = 1; + */ + const NOT_IN = 1; + /** + * For scalar string operands, checks if the operand contains any of the + * provided filter substrings. + * For string list operands, checks if any string in the operand contains + * any of the provided filter substrings. + * + * Generated from protobuf enum CONTAINS = 2; + */ + const CONTAINS = 2; + /** + * For scalar string operands, checks that the operand contains none of + * the provided filter substrings. + * For string list operands, checks that none of the strings in the + * operand contain none of the provided filter substrings. + * + * Generated from protobuf enum NOT_CONTAINS = 3; + */ + const NOT_CONTAINS = 3; + /** + * Operand is less than the provided filter value. + * + * Generated from protobuf enum LESS_THAN = 4; + */ + const LESS_THAN = 4; + /** + * Operand is less than or equal to provided filter value. + * + * Generated from protobuf enum LESS_THAN_EQUALS = 5; + */ + const LESS_THAN_EQUALS = 5; + /** + * Operand is greater than provided filter value. + * + * Generated from protobuf enum GREATER_THAN = 6; + */ + const GREATER_THAN = 6; + /** + * Operand is greater than or equal to provided filter value. + * + * Generated from protobuf enum GREATER_THAN_EQUALS = 7; + */ + const GREATER_THAN_EQUALS = 7; + /** + * Operand is between provided filter values. + * + * Generated from protobuf enum BETWEEN = 8; + */ + const BETWEEN = 8; + /** + * Operand matches against a regular expression or set of regular + * expressions (one must match). + * + * Generated from protobuf enum MATCHES = 9; + */ + const MATCHES = 9; + /** + * Operand negative matches against a regular expression or set of regular + * expressions (none must match). + * + * Generated from protobuf enum NOT_MATCHES = 10; + */ + const NOT_MATCHES = 10; + + private static $valueToName = [ + self::IN => 'IN', + self::NOT_IN => 'NOT_IN', + self::CONTAINS => 'CONTAINS', + self::NOT_CONTAINS => 'NOT_CONTAINS', + self::LESS_THAN => 'LESS_THAN', + self::LESS_THAN_EQUALS => 'LESS_THAN_EQUALS', + self::GREATER_THAN => 'GREATER_THAN', + self::GREATER_THAN_EQUALS => 'GREATER_THAN_EQUALS', + self::BETWEEN => 'BETWEEN', + self::MATCHES => 'MATCHES', + self::NOT_MATCHES => 'NOT_MATCHES', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/Flag.php b/AdsAdManager/src/V1/ReportDefinition/Flag.php new file mode 100644 index 000000000000..2e7460ca20c7 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/Flag.php @@ -0,0 +1,118 @@ +google.ads.admanager.v1.ReportDefinition.Flag + */ +class Flag extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Filters to apply for the flag. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $filters; + /** + * Optional. Name of the flag. + * The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to + * the colored flags that appear in the UI. The UI won't display flags + * with other names, but they are available for use by API clients. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\ReportDefinition\Filter>|\Google\Protobuf\Internal\RepeatedField $filters + * Required. Filters to apply for the flag. + * @type string $name + * Optional. Name of the flag. + * The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to + * the colored flags that appear in the UI. The UI won't display flags + * with other names, but they are available for use by API clients. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); + parent::__construct($data); + } + + /** + * Required. Filters to apply for the flag. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilters() + { + return $this->filters; + } + + /** + * Required. Filters to apply for the flag. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Filter filters = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Ads\AdManager\V1\ReportDefinition\Filter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportDefinition\Filter::class); + $this->filters = $arr; + + return $this; + } + + /** + * Optional. Name of the flag. + * The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to + * the colored flags that appear in the UI. The UI won't display flags + * with other names, but they are available for use by API clients. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. Name of the flag. + * The flag names RED, YELLOW, GREEN, BLUE, PURPLE, and GREY correspond to + * the colored flags that appear in the UI. The UI won't display flags + * with other names, but they are available for use by API clients. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/Metric.php b/AdsAdManager/src/V1/ReportDefinition/Metric.php new file mode 100644 index 000000000000..4984b0649702 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/Metric.php @@ -0,0 +1,5074 @@ +google.ads.admanager.v1.ReportDefinition.Metric + */ +class Metric +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum METRIC_UNSPECIFIED = 0; + */ + const METRIC_UNSPECIFIED = 0; + /** + * The number of people who engaged with your site or app in the specified + * date range from Google Analytics. + * Corresponds to "Active users" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_USERS = 223; + */ + const ACTIVE_USERS = 223; + /** + * Number of impressions with unmuted playback at start. + * Corresponds to "Active View % audible at start" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT = 445; + */ + const ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT = 445; + /** + * Total Active View audible impressions + * Corresponds to "Total Active View audible impressions" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_VIEW_AUDIBLE_IMPRESSIONS = 659; + */ + const ACTIVE_VIEW_AUDIBLE_IMPRESSIONS = 659; + /** + * Number of impressions with unmuted playback through the entire stream. + * Corresponds to "Active View % audible through completion" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT = 446; + */ + const ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT = 446; + /** + * Number of impressions with unmuted playback through at least 25%. + * Corresponds to "Active View % audible through first quartile" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT = 447; + */ + const ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT = 447; + /** + * Number of impressions with unmuted playback through at least 50%. + * Corresponds to "Active View % audible through midpoint" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT = 448; + */ + const ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT = 448; + /** + * Number of impressions with unmuted playback through at least 75%. + * Corresponds to "Active View % audible through third quartile" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT = 449; + */ + const ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT = 449; + /** + * Total Active View audio enabled impressions + * Corresponds to "Total Active View audio eligible impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS = 660; + */ + const ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS = 660; + /** + * Total Active View audio measurable impressions + * Corresponds to "Total Active View audio measurable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS = 661; + */ + const ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS = 661; + /** + * Active View total average time in seconds that specific impressions are + * reported as being viewable. + * Corresponds to "Total Active View average viewable time (seconds)" in the + * Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 61; + */ + const ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 61; + /** + * Total number of impressions that were eligible to measure viewability. + * Corresponds to "Total Active View eligible impressions" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 58; + */ + const ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 58; + /** + * Number of impressions where the ad player is in the background at any + * point during playback with volume > 0. + * Corresponds to "Active View % ever audible while backgrounded" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT = 450; + */ + const ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT = 450; + /** + * Number of impressions where volume > 0 at any point. + * Corresponds to "Active View % ever audible" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_EVER_AUDIBLE_PERCENT = 451; + */ + const ACTIVE_VIEW_EVER_AUDIBLE_PERCENT = 451; + /** + * Number of impressions where the ad player is in the background at any + * point during playback. + * Corresponds to "Active View % ever backgrounded" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT = 452; + */ + const ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT = 452; + /** + * Number of impressions where volume = 0 at any point. + * Corresponds to "Active View % ever muted" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_EVER_MUTED_PERCENT = 453; + */ + const ACTIVE_VIEW_EVER_MUTED_PERCENT = 453; + /** + * The number of measurable impressions that were played to video + * completion, and also audible and visible at the time of completion. + * Corresponds to "Total Active View impressions audible and visible at + * completion" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION = 411; + */ + const ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION = 411; + /** + * The total number of impressions that were sampled and measured by active + * view. + * Corresponds to "Total Active View measurable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 57; + */ + const ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 57; + /** + * The percentage of total impressions that were measurable by active view + * (out of all the total impressions sampled for active view). + * Corresponds to "Total Active View % measurable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 60; + */ + const ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 60; + /** + * Total Active View non-measurable impressions + * Corresponds to "Total Active View non-measurable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 662; + */ + const ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 662; + /** + * Total Active View non-viewable impressions + * Corresponds to "Total Active View non-viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 663; + */ + const ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 663; + /** + * Total Active View non-viewable impressions distribution + * Corresponds to "Total Active View non-viewable impression distribution" + * in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 664; + */ + const ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 664; + /** + * Total Active View percent audible impressions + * Corresponds to "Total Active View % audible impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS = 665; + */ + const ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS = 665; + /** + * Number of impressions where we were able to collect Active View+ signals. + * Corresponds to "Active View+ measurable impressions" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_VIEW_PLUS_MEASURABLE_COUNT = 454; + */ + const ACTIVE_VIEW_PLUS_MEASURABLE_COUNT = 454; + /** + * Revenue generated from Active View impressions. + * Corresponds to "Total Active View revenue" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum ACTIVE_VIEW_REVENUE = 414; + */ + const ACTIVE_VIEW_REVENUE = 414; + /** + * Total Active View undetermined impressions distribution + * Corresponds to "Total Active View undetermined impression distribution" + * in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 666; + */ + const ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 666; + /** + * The total number of impressions viewed on the user's screen. + * Corresponds to "Total Active View viewable impressions" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 56; + */ + const ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 56; + /** + * Total Active View viewable impressions distribution + * Corresponds to "Total Active View viewable impression distribution" in + * the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 667; + */ + const ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 667; + /** + * The percentage of total impressions viewed on the user's screen (out of + * the total impressions measurable by active view). + * Corresponds to "Total Active View % viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 59; + */ + const ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 59; + /** + * Active View AdSense average time in seconds that specific impressions are + * reported as being viewable. + * Corresponds to "AdSense Active View average viewable time (seconds)" in + * the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 73; + */ + const ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 73; + /** + * Total number of impressions delivered by AdSense that were eligible to + * measure viewability. + * Corresponds to "AdSense Active View eligible impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 70; + */ + const ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 70; + /** + * The number of impressions delivered by AdSense that were sampled, and + * measurable by active view. + * Corresponds to "AdSense Active View measurable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 69; + */ + const ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 69; + /** + * The percentage of impressions delivered by AdSense that were measurable + * by active view (out of all AdSense impressions sampled for active view). + * Corresponds to "AdSense Active View % measurable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 72; + */ + const ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 72; + /** + * AdSense Active View non-measurable impressions + * Corresponds to "AdSense Active View non-measurable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 642; + */ + const ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 642; + /** + * AdSense Active View non-viewable impressions + * Corresponds to "AdSense Active View non-viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 643; + */ + const ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 643; + /** + * AdSense Active View non-viewable impressions distribution + * Corresponds to "AdSense Active View non-viewable impression distribution" + * in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 644; + */ + const ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 644; + /** + * AdSense Active View undetermined impressions distribution + * Corresponds to "AdSense Active View undetermined impression distribution" + * in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 645; + */ + const ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 645; + /** + * The number of impressions delivered by AdSense viewed on the user's + * screen. + * Corresponds to "AdSense Active View viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 68; + */ + const ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 68; + /** + * AdSense Active View viewable impressions distribution + * Corresponds to "AdSense Active View viewable impression distribution" in + * the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 646; + */ + const ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 646; + /** + * The percentage of impressions delivered by AdSense viewed on the user's + * screen (out of AdSense impressions measurable by active view). + * Corresponds to "AdSense Active View % viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 71; + */ + const ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 71; + /** + * The average effective cost-per-thousand-impressions earned from the ads + * delivered by AdSense through line item dynamic allocation. + * Corresponds to "AdSense average eCPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum ADSENSE_AVERAGE_ECPM = 26; + */ + const ADSENSE_AVERAGE_ECPM = 26; + /** + * Number of clicks delivered by AdSense demand channel. + * Corresponds to "AdSense clicks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ADSENSE_CLICKS = 23; + */ + const ADSENSE_CLICKS = 23; + /** + * The ratio of impressions served by AdSense that resulted in users + * clicking on an ad. The clickthrough rate (CTR) is updated nightly. The + * AdSense CTR is calculated as: (AdSense clicks / AdSense impressions). + * Corresponds to "AdSense CTR" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ADSENSE_CTR = 24; + */ + const ADSENSE_CTR = 24; + /** + * Total impressions delivered by AdSense. + * Corresponds to "AdSense impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ADSENSE_IMPRESSIONS = 22; + */ + const ADSENSE_IMPRESSIONS = 22; + /** + * Ratio of clicks delivered by AdSense through line item dynamic allocation + * in relation to the total clicks delivered. + * Corresponds to "AdSense clicks (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ADSENSE_PERCENT_CLICKS = 28; + */ + const ADSENSE_PERCENT_CLICKS = 28; + /** + * Ratio of impressions delivered by AdSense through line item dynamic + * allocation in relation to the total impressions delivered. + * Corresponds to "AdSense impressions (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ADSENSE_PERCENT_IMPRESSIONS = 27; + */ + const ADSENSE_PERCENT_IMPRESSIONS = 27; + /** + * Ratio of revenue generated by AdSense through line item dynamic + * allocation in relation to the total revenue. + * Corresponds to "AdSense revenue (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ADSENSE_PERCENT_REVENUE = 29; + */ + const ADSENSE_PERCENT_REVENUE = 29; + /** + * Ratio of revenue generated by AdSense through line item dynamic + * allocation in relation to the total revenue (excluding CPD). + * Corresponds to "AdSense revenue w/o CPD (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ADSENSE_PERCENT_REVENUE_WITHOUT_CPD = 30; + */ + const ADSENSE_PERCENT_REVENUE_WITHOUT_CPD = 30; + /** + * The total number of times that an AdSense ad is delivered. + * Corresponds to "AdSense responses served" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ADSENSE_RESPONSES_SERVED = 41; + */ + const ADSENSE_RESPONSES_SERVED = 41; + /** + * Revenue generated from AdSense through line item dynamic allocation, + * calculated in the network's currency and time zone. + * Corresponds to "AdSense revenue" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum ADSENSE_REVENUE = 25; + */ + const ADSENSE_REVENUE = 25; + /** + * Active View AdExchange average time in seconds that specific impressions + * are reported as being viewable. + * Corresponds to "Ad Exchange Active View average viewable time (seconds)" + * in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 79; + */ + const AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 79; + /** + * Total number of impressions delivered by Ad Exchange that were eligible + * to measure viewability. + * Corresponds to "Ad Exchange Active View eligible impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 76; + */ + const AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 76; + /** + * The number of impressions delivered by Ad Exchange that were sampled, and + * measurable by active view. + * Corresponds to "Ad Exchange Active View measurable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 75; + */ + const AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 75; + /** + * The percentage of impressions delivered by Ad Exchange that were + * measurable by active view (out of all Ad Exchange impressions sampled + * for active view). + * Corresponds to "Ad Exchange Active View % measurable impressions" in the + * Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 78; + */ + const AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 78; + /** + * Ad Exchange Active View non-measurable impressions + * Corresponds to "Ad Exchange Active View non-measurable impressions" in + * the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 654; + */ + const AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 654; + /** + * Ad Exchange Active View non-viewable impressions + * Corresponds to "Ad Exchange Active View non-viewable impressions" in the + * Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 655; + */ + const AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 655; + /** + * Ad Exchange Active View non-viewable impressions distribution + * Corresponds to "Ad Exchange Active View non-viewable impression + * distribution" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 656; + */ + const AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 656; + /** + * Ad Exchange Active View undetermined impressions distribution + * Corresponds to "Ad Exchange Active View undetermined impression + * distribution" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 657; + */ + const AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 657; + /** + * The number of impressions delivered by Ad Exchange viewed on the user's + * screen. + * Corresponds to "Ad Exchange Active View viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 74; + */ + const AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 74; + /** + * Ad Exchange Active View viewable impressions distribution + * Corresponds to "Ad Exchange Active View viewable impression distribution" + * in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 658; + */ + const AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 658; + /** + * The percentage of impressions delivered by Ad Exchange viewed on the + * user's screen (out of Ad Exchange impressions measurable by active + * view). + * Corresponds to "Ad Exchange Active View % viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 77; + */ + const AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 77; + /** + * The average effective cost-per-thousand-impressions earned from the ads + * delivered by Ad Exchange through line item dynamic allocation. + * Corresponds to "Ad Exchange average eCPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_EXCHANGE_AVERAGE_ECPM = 18; + */ + const AD_EXCHANGE_AVERAGE_ECPM = 18; + /** + * Number of clicks delivered by the Ad Exchange. + * Corresponds to "Ad Exchange clicks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_CLICKS = 15; + */ + const AD_EXCHANGE_CLICKS = 15; + /** + * The average effective cost-per-click earned from the ads delivered by Ad + * Exchange through line item dynamic allocation. + * Corresponds to "Ad Exchange CPC" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_EXCHANGE_CPC = 244; + */ + const AD_EXCHANGE_CPC = 244; + /** + * The ratio of impressions served by the Ad Exchange that resulted in users + * clicking on an ad. The clickthrough rate (CTR) is updated nightly. Ad + * Exchange CTR is calculated as: (Ad Exchange clicks / Ad Exchange + * impressions). + * Corresponds to "Ad Exchange CTR" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_CTR = 16; + */ + const AD_EXCHANGE_CTR = 16; + /** + * Ratio of impressions delivered by Ad Exchange through line item dynamic + * allocation to ad requests. + * Corresponds to "Ad Exchange delivery rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_DELIVERY_RATE = 245; + */ + const AD_EXCHANGE_DELIVERY_RATE = 245; + /** + * Total impressions delivered by the Ad Exchange. + * Corresponds to "Ad Exchange impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_IMPRESSIONS = 14; + */ + const AD_EXCHANGE_IMPRESSIONS = 14; + /** + * The total number of impressions based on the number of ad viewers. + * Corresponds to "Ad Exchange impressions per ad viewer" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER = 427; + */ + const AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER = 427; + /** + * The total number of impressions based on the number of sessions. + * Corresponds to "Ad Exchange impressions per session" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum AD_EXCHANGE_IMPRESSIONS_PER_SESSION = 428; + */ + const AD_EXCHANGE_IMPRESSIONS_PER_SESSION = 428; + /** + * The increase in revenue gained for won impressions over the applicable + * third party price (the minimum CPM or the best price specified during + * dynamic allocation), + * Corresponds to "Ad Exchange lift earnings" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_LIFT = 246; + */ + const AD_EXCHANGE_LIFT = 246; + /** + * The ratio of matched ad requests served by the Ad Exchange that + * resulted in users clicking on an ad. The clickthrough rate (CTR) is + * updated nightly. Ad Exchange Matched Request CTR is calculated as: + * (Ad Exchange clicks / Ad Exchange Macthed Ad Requests). + * Corresponds to "Ad Exchange matched request CTR" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_MATCHED_REQUEST_CTR = 247; + */ + const AD_EXCHANGE_MATCHED_REQUEST_CTR = 247; + /** + * The average effective cost per thousand matched ad requests earned from + * the ads delivered by Ad Exchange through line item dynamic allocation. + * Corresponds to "Ad Exchange matched request eCPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_EXCHANGE_MATCHED_REQUEST_ECPM = 248; + */ + const AD_EXCHANGE_MATCHED_REQUEST_ECPM = 248; + /** + * The number of responses served divided by the number of queries eligible + * in ad exchange. + * Corresponds to "Ad Exchange match rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_MATCH_RATE = 249; + */ + const AD_EXCHANGE_MATCH_RATE = 249; + /** + * Total opportunities from video VAST error within the waterfall for + * backfill ads. + * Corresponds to "Ad Exchange opportunities from errors" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS = 250; + */ + const AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS = 250; + /** + * Number of opportunities from impressions within the waterfall for + * backfill ads. + * Corresponds to "Ad Exchange opportunities from impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS = 251; + */ + const AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS = 251; + /** + * Ratio of clicks delivered by Ad Exchange through line item dynamic + * allocation in relation to the total clicks delivered. + * Corresponds to "Ad Exchange clicks (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_PERCENT_CLICKS = 20; + */ + const AD_EXCHANGE_PERCENT_CLICKS = 20; + /** + * Ratio of impressions delivered by Ad Exchange through line item dynamic + * allocation in relation to the total impressions delivered. + * Corresponds to "Ad Exchange impressions (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_PERCENT_IMPRESSIONS = 19; + */ + const AD_EXCHANGE_PERCENT_IMPRESSIONS = 19; + /** + * Ratio of revenue generated by Ad Exchange through line item dynamic + * allocation in relation to the total revenue. + * Corresponds to "Ad Exchange revenue (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_PERCENT_REVENUE = 21; + */ + const AD_EXCHANGE_PERCENT_REVENUE = 21; + /** + * Ratio of revenue generated by Ad Exchange through line item dynamic + * allocation in relation to the total revenue (excluding CPD). + * Corresponds to "Ad Exchange revenue w/o CPD (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD = 31; + */ + const AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD = 31; + /** + * The average effective cost-per-thousand-impressions earned from the ads + * delivered by Ad Exchange through line item dynamic allocation and yield + * group partners. + * Corresponds to "Ad Exchange plus yield group eCPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM = 252; + */ + const AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM = 252; + /** + * Total impressions delivered by the Ad Exchange and third-party networks. + * Corresponds to "Ad Exchange plus yield group impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS = 253; + */ + const AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS = 253; + /** + * Revenue generated from the Ad Exchange and Yield Group, calculated in + * your network's currency and time zone. + * Corresponds to "Ad Exchange plus yield group revenue" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE = 254; + */ + const AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE = 254; + /** + * The total number of times that an Ad Exchange ad is delivered. + * Corresponds to "Ad Exchange responses served" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_RESPONSES_SERVED = 42; + */ + const AD_EXCHANGE_RESPONSES_SERVED = 42; + /** + * Revenue generated from the Ad Exchange through line item dynamic + * allocation, calculated in your network's currency and time zone. + * Corresponds to "Ad Exchange revenue" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_EXCHANGE_REVENUE = 17; + */ + const AD_EXCHANGE_REVENUE = 17; + /** + * The Ad Exchange revenue accrued in the child network's own account but + * paid to their parent network through auto-payment. This metric is only + * relevant for a "Manage Account" child network. + * Corresponds to "Ad Exchange revenue paid through MCM auto-payment" in the + * Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 212; + */ + const AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 212; + /** + * The total amount of Ad Exchange revenue based on the + * number of ad viewers. + * Corresponds to "Ad Exchange revenue per ad viewer" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_EXCHANGE_REVENUE_PER_AD_VIEWER = 429; + */ + const AD_EXCHANGE_REVENUE_PER_AD_VIEWER = 429; + /** + * The number of programmatic eligible queries in Ad Exchange. + * Corresponds to "Ad Exchange total requests" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_EXCHANGE_TOTAL_REQUESTS = 255; + */ + const AD_EXCHANGE_TOTAL_REQUESTS = 255; + /** + * The ratio of total ad requests served by the Ad Exchange that + * resulted in users clicking on an ad. The clickthrough rate (CTR) is + * updated nightly. Ad Exchange Total Request CTR is calculated as: + * (Ad Exchange clicks / Ad Exchange Total Ad Requests). + * Corresponds to "Ad Exchange total request CTR" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_EXCHANGE_TOTAL_REQUEST_CTR = 256; + */ + const AD_EXCHANGE_TOTAL_REQUEST_CTR = 256; + /** + * The average effective cost per thousand ad requests earned from the ads + * delivered by Ad Exchange through line item dynamic allocation and yield + * group partners. + * Corresponds to "Ad Exchange total request eCPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_EXCHANGE_TOTAL_REQUEST_ECPM = 257; + */ + const AD_EXCHANGE_TOTAL_REQUEST_ECPM = 257; + /** + * Length of time in seconds that an ad is visible on the user's screen from + * Google Analytics. + * Corresponds to "Ad exposure (seconds)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum AD_EXPOSURE_SECONDS = 241; + */ + const AD_EXPOSURE_SECONDS = 241; + /** + * The total number of times that an ad request is sent to the ad server + * including dynamic allocation. + * Corresponds to "Total ad requests" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_REQUESTS = 38; + */ + const AD_REQUESTS = 38; + /** + * Active View ad server average time in seconds that specific impressions + * are reported as being viewable. + * Corresponds to "Ad server Active View average viewable time (seconds)" in + * the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 67; + */ + const AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME = 67; + /** + * Total number of impressions delivered by the ad server that were eligible + * to measure viewability. + * Corresponds to "Ad server Active View eligible impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 64; + */ + const AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS = 64; + /** + * The number of impressions delivered by the ad server that were sampled, + * and measurable by active view. + * Corresponds to "Ad server Active View measurable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 63; + */ + const AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS = 63; + /** + * The percentage of impressions delivered by the ad server that were + * measurable by active view (out of all the ad server impressions sampled + * for active view). + * Corresponds to "Ad server Active View % measurable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 66; + */ + const AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE = 66; + /** + * The number of impressions delivered by Ad Server that were not measured. + * For example, impressions where measurement was attempted but failed. + * Corresponds to "Ad server Active View non-measurable impressions" in the + * Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 332; + */ + const AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS = 332; + /** + * The number of impressions delivered by Ad Server that were measured by + * active view, but deemed not viewable. + * Corresponds to "Ad server Active View non-viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 331; + */ + const AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS = 331; + /** + * The fraction of non-viewable impressions among eligible impressions from + * Ad Server in Active View reporting." + * Corresponds to "Ad server Active View non-viewable impression + * distribution" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 334; + */ + const AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 334; + /** + * The fraction of non-eligible impressions among eligible impressions from + * Ad Server in Active View reporting." + * Corresponds to "Ad server Active View undetermined impression + * distribution" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 335; + */ + const AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION = 335; + /** + * The number of impressions delivered by the ad server viewed on the user's + * screen. + * Corresponds to "Ad server Active View viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 62; + */ + const AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS = 62; + /** + * The fraction of viewable impressions among eligible impressions from Ad + * Server in Active View reporting. + * Corresponds to "Ad server Active View viewable impression distribution" + * in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 333; + */ + const AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION = 333; + /** + * The percentage of impressions delivered by the ad server viewed on the + * user's screen (out of the ad server impressions measurable by active + * view). + * Corresponds to "Ad server Active View % viewable impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 65; + */ + const AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE = 65; + /** + * Average effective cost-per-thousand-impressions earned from the ads + * delivered by the Google Ad Manager server. + * Corresponds to "Ad server average eCPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_SERVER_AVERAGE_ECPM = 34; + */ + const AD_SERVER_AVERAGE_ECPM = 34; + /** + * Average effective cost-per-thousand-impressions earned from the ads + * delivered by the Google Ad Manager server, excluding CPD value. + * Corresponds to "Ad server average eCPM w/o CPD" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD = 10; + */ + const AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD = 10; + /** + * Total raw impressions counted when creative begins to render or the + * first frame of a video is shown. + * Corresponds to "Ad server begin to render impressions" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS = 262; + */ + const AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS = 262; + /** + * Total clicks served by the Google Ad Manager server. It usually takes + * about 30 minutes for new clicks to be recorded and added to the total + * displayed in reporting. + * Corresponds to "Ad server clicks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_CLICKS = 7; + */ + const AD_SERVER_CLICKS = 7; + /** + * The number of completed views for ad server. + * Corresponds to "Ad server completed views" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_COMPLETED_VIEWS = 431; + */ + const AD_SERVER_COMPLETED_VIEWS = 431; + /** + * Total coviewed impressions delivered by the Ad Server. + * Corresponds to "Ad server impressions (co-viewed)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_COVIEWED_IMPRESSIONS = 554; + */ + const AD_SERVER_COVIEWED_IMPRESSIONS = 554; + /** + * CPD revenue earned, calculated in your network's currency, for + * the ads delivered by the Google Ad Manager server. Sum of all booked + * revenue. + * Corresponds to "Ad server CPD revenue" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_SERVER_CPD_REVENUE = 32; + */ + const AD_SERVER_CPD_REVENUE = 32; + /** + * Ratio of impressions served by the Google Ad Manager server that resulted + * in users clicking on an ad. The clickthrough rate (CTR) is updated + * nightly. The ad server CTR is calculated as: (Ad server clicks / Ad + * server impressions). + * Corresponds to "Ad server CTR" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_SERVER_CTR = 8; + */ + const AD_SERVER_CTR = 8; + /** + * Gross revenue earned, calculated in your network's currency, for the ads + * delivered by the Google Ad Manager server. This includes pre-rev-share + * revenue for Programmatic traffic. This metric is to help with the + * transition from gross to net revenue reporting. + * Corresponds to "Ad server total revenue (gross)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_SERVER_GROSS_REVENUE = 483; + */ + const AD_SERVER_GROSS_REVENUE = 483; + /** + * Gross revenue earned, calculated in your network's currency, for the ads + * delivered by the Google Ad Manager server, excluding CPD revenue. This + * includes pre-rev-share revenue for Programmatic traffic. This metric is + * to help with the transition from gross to net revenue reporting. + * Corresponds to "Ad server CPM and CPC revenue (gross)" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_SERVER_GROSS_REVENUE_WITHOUT_CPD = 484; + */ + const AD_SERVER_GROSS_REVENUE_WITHOUT_CPD = 484; + /** + * Total impressions delivered by the Ad Server. + * Corresponds to "Ad server impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_IMPRESSIONS = 6; + */ + const AD_SERVER_IMPRESSIONS = 6; + /** + * Total impressions delivered by the Ad Server with companion impressions. + * Corresponds to "Ad server impressions with companion" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_IMPRESSIONS_WITH_COMPANION = 222; + */ + const AD_SERVER_IMPRESSIONS_WITH_COMPANION = 222; + /** + * Impressions (via begin to render methodology) delivered by the Google Ad + * Manager server considered inactive, as defined by served to a device + * receiving ad or bid requests continuously for a session of greater than + * 16 hours without a "reset" event. + * Corresponds to "Ad server inactive begin to render impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS = 338; + */ + const AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS = 338; + /** + * Ratio of clicks delivered by the Google Ad Manager server in relation to + * the total clicks delivered. + * Corresponds to "Ad server clicks (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_SERVER_PERCENT_CLICKS = 12; + */ + const AD_SERVER_PERCENT_CLICKS = 12; + /** + * Ratio of impressions delivered by the Google Ad Manager server in + * relation to the total impressions delivered. + * Corresponds to "Ad server impressions (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_SERVER_PERCENT_IMPRESSIONS = 11; + */ + const AD_SERVER_PERCENT_IMPRESSIONS = 11; + /** + * Ratio of revenue generated by the Google Ad Manager server in relation + * to the total revenue. + * Corresponds to "Ad server revenue (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_SERVER_PERCENT_REVENUE = 35; + */ + const AD_SERVER_PERCENT_REVENUE = 35; + /** + * Ratio of revenue generated by the Google Ad Manager server (excluding + * CPD) in relation to the total revenue. + * Corresponds to "Ad server revenue w/o CPD (%)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD = 13; + */ + const AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD = 13; + /** + * The total number of times that an ad is served by the ad server. + * Corresponds to "Ad server responses served" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_RESPONSES_SERVED = 40; + */ + const AD_SERVER_RESPONSES_SERVED = 40; + /** + * All CPM, CPC, and CPD revenue earned, calculated in your network's + * currency, for the ads delivered by the Google Ad Manager server. + * Sum of all booked revenue. + * Corresponds to "Ad server total revenue" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_SERVER_REVENUE = 33; + */ + const AD_SERVER_REVENUE = 33; + /** + * The Google Ad Manager server revenue accrued in the child network's own + * account but paid to their parent network through auto-payment. This + * metric is only relevant for a "Manage Account" child network. + * Corresponds to "Ad server revenue paid through MCM auto-payment" in the + * Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 213; + */ + const AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 213; + /** + * Revenue (excluding CPD) earned, calculated in your network's currency, + * for the ads delivered by the Google Ad Manager server. Sum of all booked + * revenue. + * Corresponds to "Ad server CPM and CPC revenue" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AD_SERVER_REVENUE_WITHOUT_CPD = 9; + */ + const AD_SERVER_REVENUE_WITHOUT_CPD = 9; + /** + * The number of clicks delivered by the ad server by explicit custom + * criteria targeting. + * Corresponds to "Ad server targeted clicks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_TARGETED_CLICKS = 274; + */ + const AD_SERVER_TARGETED_CLICKS = 274; + /** + * The number of impressions delivered by the ad server by explicit custom + * criteria targeting. + * Corresponds to "Ad server targeted impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_TARGETED_IMPRESSIONS = 275; + */ + const AD_SERVER_TARGETED_IMPRESSIONS = 275; + /** + * The number of tracked ads delivered by the ad server. + * Corresponds to "Ad server tracked ads" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_TRACKED_ADS = 264; + */ + const AD_SERVER_TRACKED_ADS = 264; + /** + * Total raw impressions counted when creative begins to render or the + * first frame of a video is shown, before invalid traffic filtrations by + * Ad Server. + * Corresponds to "Ad server unfiltered begin to render impressions" in the + * Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS = 261; + */ + const AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS = 261; + /** + * Total clicks delivered by the Ad Server before spam filtering. + * Corresponds to "Ad server unfiltered clicks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_UNFILTERED_CLICKS = 259; + */ + const AD_SERVER_UNFILTERED_CLICKS = 259; + /** + * Total downloaded impressions delivered by the Ad Server before spam + * filtering. + * Corresponds to "Ad server unfiltered downloaded impressions" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS = 260; + */ + const AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS = 260; + /** + * Deprecated. This metric has been renamed to + * `AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS`. + * The server will normalize any requests using this value to + * `AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS`. + * This value will be removed on or after October 1, 2025. + * + * Generated from protobuf enum AD_SERVER_UNFILTERED_IMPRESSIONS = 260 [deprecated = true]; + */ + const AD_SERVER_UNFILTERED_IMPRESSIONS = 260; + /** + * The number of tracked ads delivered by the ad server before invalid + * traffic filtrations. + * Corresponds to "Ad server unfiltered tracked ads" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_SERVER_UNFILTERED_TRACKED_ADS = 263; + */ + const AD_SERVER_UNFILTERED_TRACKED_ADS = 263; + /** + * Length of time in seconds that an ad unit is visible on the user's screen + * from Google Analytics. + * Corresponds to "Ad unit exposure (seconds)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum AD_UNIT_EXPOSURE_SECONDS = 242; + */ + const AD_UNIT_EXPOSURE_SECONDS = 242; + /** + * The number of users who viewed an ads on your site or app in the + * specified date range from Google Analytics. + * Corresponds to "Ad viewers" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum AD_VIEWERS = 425; + */ + const AD_VIEWERS = 425; + /** + * Number of ads that Ad Manager failed to render in the Ads traffic + * navigator report. + * Corresponds to "Ads failed to render" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_ADS_FAILED_TO_RENDER = 430; + */ + const ATN_ADS_FAILED_TO_RENDER = 430; + /** + * Number of line items that matched an ad request in the Ads traffic + * navigator report. + * Corresponds to "Eligible line items" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_ELIGIBLE_LINE_ITEMS = 342; + */ + const ATN_ELIGIBLE_LINE_ITEMS = 342; + /** + * Number of ad requests that contain eligible line items for the auction in + * the Ads traffic navigator report. + * Corresponds to "Ad requests with eligible line items" in the Ad Manager + * UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS = 343; + */ + const ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS = 343; + /** + * Number of ad requests that have header bidding trafficking demand in the + * Ads traffic navigator report. + * Corresponds to "Ad requests allowing header bidding trafficking" in the + * Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_HBT_ALLOWED_AD_REQUESTS = 344; + */ + const ATN_HBT_ALLOWED_AD_REQUESTS = 344; + /** + * Number of header bidding trafficking bids that are able to match an ad + * request and enter the auction in the Ads traffic navigator report. + * Corresponds to "Competing header bidding trafficking bids" in the Ad + * Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_HBT_BIDS_IN_AUCTION = 345; + */ + const ATN_HBT_BIDS_IN_AUCTION = 345; + /** + * Number of header bidding trafficking ad requests with bids in auction in + * the Ads traffic navigator report. + * Corresponds to "Ad requests with competing header bidding trafficking + * bids" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS = 346; + */ + const ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS = 346; + /** + * Number of header bidding trafficking candidate bids that match an ad + * request in the Ads traffic navigator report. + * Corresponds to "Header bidding trafficking bids" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_HBT_CANDIDATE_BIDS = 347; + */ + const ATN_HBT_CANDIDATE_BIDS = 347; + /** + * Number of invalid header bidding trafficking ad requests in the Ads + * traffic navigator report. + * Corresponds to "Invalid ad requests allowing header bidding trafficking" + * in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_HBT_INVALID_AD_REQUESTS = 348; + */ + const ATN_HBT_INVALID_AD_REQUESTS = 348; + /** + * Number of header bidding trafficking ad requests with no bids in the Ads + * traffic navigator report. + * Corresponds to "Header bidding trafficking ad requests with no bids" in + * the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_HBT_NO_BIDS_AD_REQUESTS = 472; + */ + const ATN_HBT_NO_BIDS_AD_REQUESTS = 472; + /** + * Number of header bidding trafficking bids that didn't match the ad + * request in the Ads traffic navigator report. + * Corresponds to "Rejected header bidding trafficking bids" in the Ad + * Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_HBT_REJECTED_BIDS = 349; + */ + const ATN_HBT_REJECTED_BIDS = 349; + /** + * Number of ad requests with the header bidding trafficking demand that are + * valid in the Ads traffic navigator report. + * Corresponds to "Valid header bidding trafficking ad requests" in the Ad + * Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_HBT_VALID_AD_REQUESTS = 350; + */ + const ATN_HBT_VALID_AD_REQUESTS = 350; + /** + * Number of header bidding trafficking ad requests with bids in the Ads + * traffic navigator report. + * Corresponds to "Header bidding trafficking ad requests with bids" in the + * Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_HBT_WITH_BIDS_AD_REQUESTS = 473; + */ + const ATN_HBT_WITH_BIDS_AD_REQUESTS = 473; + /** + * Ad requests that are not valid in the Ads traffic navigator report. + * Corresponds to "Invalid ad requests" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_INVALID_AD_REQUESTS = 351; + */ + const ATN_INVALID_AD_REQUESTS = 351; + /** + * Number of line items with no creative retrieved in the Ads + * traffic navigator report. + * Corresponds to "Creative not retrieved" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED = 476; + */ + const ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED = 476; + /** + * Number of line items that matched an ad request and entered in auction in + * the Ads traffic navigator report. + * Corresponds to "Competing line items" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_LINE_ITEMS_IN_AUCTION = 352; + */ + const ATN_LINE_ITEMS_IN_AUCTION = 352; + /** + * Number of line items that were ranked but did not compete in auction in + * the Ads traffic navigator report. + * Corresponds to "Non-competing line items" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_LINE_ITEMS_NOT_COMPETING = 515; + */ + const ATN_LINE_ITEMS_NOT_COMPETING = 515; + /** + * Number of line items that matched an ad request but were not selected to + * compete in the auction in the Ads traffic navigator report. + * Corresponds to "Not selected to compete" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_LINE_ITEMS_NOT_SELECTED = 353; + */ + const ATN_LINE_ITEMS_NOT_SELECTED = 353; + /** + * Number of line item ad requests in auction in the Ads traffic navigator + * report. + * Corresponds to "Ad requests with competing line items" in the Ad Manager + * UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS = 354; + */ + const ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS = 354; + /** + * Number of line item targeted ad requests in the Ads traffic navigator + * report. + * Corresponds to "Ad requests with targeted line items" in the Ad Manager + * UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_LINE_ITEM_TARGETED_AD_REQUESTS = 355; + */ + const ATN_LINE_ITEM_TARGETED_AD_REQUESTS = 355; + /** + * Number of ad requests with the mediation demand in the Ads traffic + * navigator report. + * Corresponds to "Ad requests allowing mediation" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_ALLOWED_AD_REQUESTS = 356; + */ + const ATN_MEDIATION_ALLOWED_AD_REQUESTS = 356; + /** + * Number of invalid mediation ad requests in the Ads traffic navigator + * report. + * Corresponds to "Invalid ad requests allowing mediation" in the Ad Manager + * UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_INVALID_AD_REQUESTS = 357; + */ + const ATN_MEDIATION_INVALID_AD_REQUESTS = 357; + /** + * Number of times the Yield Partner's ad was loaded in the Ads traffic + * navigator report. + * Corresponds to "Loaded ads from chains" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_LOADED_ADS_FROM_CHAINS = 358; + */ + const ATN_MEDIATION_LOADED_ADS_FROM_CHAINS = 358; + /** + * Number of ad requests with mediation demand having no partners in the Ads + * traffic navigator report. + * Corresponds to "Mediation requests with no partners" in the Ad Manager + * UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_NO_PARTNER_AD_REQUESTS = 474; + */ + const ATN_MEDIATION_NO_PARTNER_AD_REQUESTS = 474; + /** + * Number of mediation yield partners in auction in the Ads traffic + * navigator report. + * Corresponds to "Competing mediation partners" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_PARTNERS_IN_AUCTION = 359; + */ + const ATN_MEDIATION_PARTNERS_IN_AUCTION = 359; + /** + * Number of ad requests in auction that serve mediation chains in the Ads + * traffic navigator report. + * Corresponds to "Ad requests with competing mediation partners" in the Ad + * Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS = 360; + */ + const ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS = 360; + /** + * Number of mediation partners that didn't match an ad request in the Ads + * traffic navigator report. + * Corresponds to "Rejected partners" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_REJECTED_PARTNERS = 361; + */ + const ATN_MEDIATION_REJECTED_PARTNERS = 361; + /** + * Number of mediation partners that have targeted an ad request and are + * able to match it in the Ads traffic navigator report. + * Corresponds to "Targeted mediation partners" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_TARGETED_PARTNERS = 362; + */ + const ATN_MEDIATION_TARGETED_PARTNERS = 362; + /** + * Number of partners on served mediation chains in the Ads traffic + * navigator report. + * Corresponds to "Total yield partners" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_TOTAL_YIELD_PARTNERS = 442; + */ + const ATN_MEDIATION_TOTAL_YIELD_PARTNERS = 442; + /** + * Number of ads from mediation chains that Ad Manager won't serve in the + * Ads traffic navigator report. + * Corresponds to "Unloaded ads from chains" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS = 363; + */ + const ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS = 363; + /** + * Number of times the Yield Partner's mediation chain ad was not reached + * in the Ads traffic navigator report. + * Corresponds to "Unused bids or partners" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS = 364; + */ + const ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS = 364; + /** + * Number of ad requests that have mediation demand in the Ads traffic + * navigator report. + * Corresponds to "Valid mediation ad requests" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_VALID_AD_REQUESTS = 365; + */ + const ATN_MEDIATION_VALID_AD_REQUESTS = 365; + /** + * Number of ad requests with mediation demand having partners in the Ads + * traffic navigator report. + * Corresponds to "Ad requests with targeted mediation partners" in the Ad + * Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS = 475; + */ + const ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS = 475; + /** + * Number of ad requests with programmatic demand that have received a bid + * in the Ads traffic navigator report. + * Corresponds to "Ad requests with bids" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS = 366; + */ + const ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS = 366; + /** + * Number of ad requests with programmatic demand that have sent a bid to at + * least one buyer in the Ads traffic navigator report. + * Corresponds to "Ad requests with bid requests sent" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT = 367; + */ + const ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT = 367; + /** + * Number of ad requests with programmatic demand in the Ads traffic + * navigator report. + * Corresponds to "Ad requests allowing programmatic" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS = 368; + */ + const ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS = 368; + /** + * Number of ads with programmatic bids that entered the auction + * in the Ads traffic navigator report. + * Corresponds to "Competing programmatic bids" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_BIDS_IN_AUCTION = 369; + */ + const ATN_PROGRAMMATIC_BIDS_IN_AUCTION = 369; + /** + * Number of ad requests that have received eligible programmatic bids to + * compete in the auction in the Ads traffic navigator report. + * Corresponds to "Ad requests with competing programmatic bids" in the Ad + * Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS = 370; + */ + const ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS = 370; + /** + * Number of programmatic callout bid requests sent to buyers in the Ads + * traffic navigator report. + * Corresponds to "Bid requests sent" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_BID_REQUESTS_SENT = 371; + */ + const ATN_PROGRAMMATIC_BID_REQUESTS_SENT = 371; + /** + * Number of programmatic callout bid requests that resulted with a response + * in the Ads traffic navigator report. + * Corresponds to "Bid requests with response" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE = 372; + */ + const ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE = 372; + /** + * All buyers that Ad Manager could potentially send a programmatic bid + * request to in the Ads traffic navigator report. + * Corresponds to "Bid request candidates" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES = 373; + */ + const ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES = 373; + /** + * Number of programmatic callout bid requests with errors in the Ads + * traffic navigator report. + * Corresponds to "Bid request errors" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_BID_REQUEST_ERRORS = 374; + */ + const ATN_PROGRAMMATIC_BID_REQUEST_ERRORS = 374; + /** + * Number of ad requests that are ineligible for programmatic in the Ads + * traffic navigator report. + * Corresponds to "Invalid ad requests allowing programmatic" in the Ad + * Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS = 375; + */ + const ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS = 375; + /** + * Number of programmatic callout bids rejected in the Ads traffic navigator + * report. + * Corresponds to "Rejected bids" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_REJECTED_BIDS = 376; + */ + const ATN_PROGRAMMATIC_REJECTED_BIDS = 376; + /** + * Number of programmatic callout bid requests Ad Manager won't send to + * buyers in the Ads traffic navigator report. + * Corresponds to "Skipped bid requests" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS = 377; + */ + const ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS = 377; + /** + * Number of programmatic bids that Ad Manager received from buyers in the + * Ads traffic navigator report. + * Corresponds to "Total programmatic bids" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_TOTAL_BIDS = 378; + */ + const ATN_PROGRAMMATIC_TOTAL_BIDS = 378; + /** + * Number of ad requests that allow programmatic in the Ads traffic + * navigator report. + * Corresponds to "Valid ad requests allowing programmatic" in the Ad + * Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_PROGRAMMATIC_VALID_AD_REQUESTS = 379; + */ + const ATN_PROGRAMMATIC_VALID_AD_REQUESTS = 379; + /** + * Number of line items targeted that didn't match an ad request in the Ads + * traffic navigator report. + * Corresponds to "Rejected line items" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_REJECTED_LINE_ITEMS = 380; + */ + const ATN_REJECTED_LINE_ITEMS = 380; + /** + * Number of mediation chains Ad Manager serves in the Ads traffic navigator + * report. + * Corresponds to "Served mediation chains" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_SERVED_MEDIATION_CHAINS = 381; + */ + const ATN_SERVED_MEDIATION_CHAINS = 381; + /** + * Number of single ads served in the Ads traffic navigator report. + * Corresponds to "Served single ads" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_SERVED_SINGLE_ADS = 382; + */ + const ATN_SERVED_SINGLE_ADS = 382; + /** + * Number of line items with targeting that matches an ad request in the Ads + * traffic navigator report. + * Corresponds to "Targeted line items" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_TARGETED_LINE_ITEMS = 383; + */ + const ATN_TARGETED_LINE_ITEMS = 383; + /** + * Total number of ad requests which counts optimized pod request as a + * single request in the Ads traffic navigator report. + * Corresponds to "Total ad requests (ATN)" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_TOTAL_AD_REQUESTS = 384; + */ + const ATN_TOTAL_AD_REQUESTS = 384; + /** + * Number of competing ads in auction in the Ads traffic navigator report. + * Corresponds to "Total competing ads" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_TOTAL_COMPETING_ADS_IN_AUCTION = 385; + */ + const ATN_TOTAL_COMPETING_ADS_IN_AUCTION = 385; + /** + * Total number of ads loaded in the Ads traffic navigator report. + * Corresponds to "Total loaded ads" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_TOTAL_LOADED_ADS = 387; + */ + const ATN_TOTAL_LOADED_ADS = 387; + /** + * Ad requests that are valid in the Ads traffic navigator report. + * Corresponds to "Valid ad requests" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_VALID_AD_REQUESTS = 389; + */ + const ATN_VALID_AD_REQUESTS = 389; + /** + * Number of times the Yield Partner passed-back on a Mediation chain ad in + * the Ads traffic navigator report. + * Corresponds to "Yield group mediation passbacks" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum ATN_YIELD_GROUP_MEDIATION_PASSBACKS = 390; + */ + const ATN_YIELD_GROUP_MEDIATION_PASSBACKS = 390; + /** + * eCPM averaged across the Google Ad Manager server, AdSense, + * and Ad Exchange. + * Corresponds to "Total average eCPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AVERAGE_ECPM = 37; + */ + const AVERAGE_ECPM = 37; + /** + * eCPM averaged across the Google Ad Manager server (excluding CPD), + * AdSense, and Ad Exchange. + * Corresponds to "Total average eCPM w/o CPD" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AVERAGE_ECPM_WITHOUT_CPD = 5; + */ + const AVERAGE_ECPM_WITHOUT_CPD = 5; + /** + * Average user engagement seconds per session in Google Analytics. + * Corresponds to "Average engagement time per session (seconds)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION = 224; + */ + const AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION = 224; + /** + * Average user engagement seconds per user in Google Analytics. + * Corresponds to "Average engagement time per user (seconds)" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum AVERAGE_ENGAGEMENT_SECONDS_PER_USER = 225; + */ + const AVERAGE_ENGAGEMENT_SECONDS_PER_USER = 225; + /** + * The average number of unique users reached per ad impression. + * Corresponds to "Average impressions/unique visitor" in the Ad Manager UI. + * Compatible with the following report types: `REACH` + * Data format: `DOUBLE` + * + * Generated from protobuf enum AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR = 418; + */ + const AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR = 418; + /** + * Average total purchase revenue per user in Google Analytics. + * Corresponds to "ARPPU" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER = 226; + */ + const AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER = 226; + /** + * Average revenue earned from each active user in Google Analytics. + * Corresponds to "ARPU" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum AVERAGE_REVENUE_PER_USER = 227; + */ + const AVERAGE_REVENUE_PER_USER = 227; + /** + * Average length of a session in Google Analytics. + * Corresponds to "Average session duration (seconds)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum AVERAGE_SESSION_SECONDS = 228; + */ + const AVERAGE_SESSION_SECONDS = 228; + /** + * The number of bids. + * Corresponds to "Bids" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum BIDS = 443; + */ + const BIDS = 443; + /** + * The average CPM of the bids submitted by bidders. + * Corresponds to "Average bid CPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum BID_AVERAGE_CPM = 444; + */ + const BID_AVERAGE_CPM = 444; + /** + * The ratio of (sessions - engaged sessions) / sessions. + * Corresponds to "Bounce rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum BOUNCE_RATE = 433; + */ + const BOUNCE_RATE = 433; + /** + * The number of times a user clicked on an ad. + * Corresponds to "Total clicks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum CLICKS = 2; + */ + const CLICKS = 2; + /** + * The total number of times that the code for an ad is served by the ad + * server including dynamic allocation. + * Corresponds to "Total code served count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum CODE_SERVED_COUNT = 44; + */ + const CODE_SERVED_COUNT = 44; + /** + * Total amount of CPC revenue. + * Corresponds to "CPC revenue" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `MONEY` + * + * Generated from protobuf enum CPC_REVENUE = 440; + */ + const CPC_REVENUE = 440; + /** + * Total amount of CPM revenue. + * Corresponds to "CPM revenue" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `MONEY` + * + * Generated from protobuf enum CPM_REVENUE = 441; + */ + const CPM_REVENUE = 441; + /** + * Percent of creatives whose load time is between [0, 500ms). + * Corresponds to "Creative load time 0 - 500ms (%)" in the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum CREATIVE_LOAD_TIME_0_500_PERCENT = 324; + */ + const CREATIVE_LOAD_TIME_0_500_PERCENT = 324; + /** + * Percent of creatives whose load time is between [1000, 2000ms). + * Corresponds to "Creative load time 1s - 2s (%)" in the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum CREATIVE_LOAD_TIME_1000_2000_PERCENT = 326; + */ + const CREATIVE_LOAD_TIME_1000_2000_PERCENT = 326; + /** + * Percent of creatives whose load time is between [2000, 4000ms). + * Corresponds to "Creative load time 2s - 4s (%)" in the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum CREATIVE_LOAD_TIME_2000_4000_PERCENT = 327; + */ + const CREATIVE_LOAD_TIME_2000_4000_PERCENT = 327; + /** + * Percent of creatives whose load time is between [4000, 8000ms). + * Corresponds to "Creative load time 4s - 8s (%)" in the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum CREATIVE_LOAD_TIME_4000_8000_PERCENT = 328; + */ + const CREATIVE_LOAD_TIME_4000_8000_PERCENT = 328; + /** + * Percent of creatives whose load time is between [500, 1000ms). + * Corresponds to "Creative load time 500ms - 1s (%)" in the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum CREATIVE_LOAD_TIME_500_1000_PERCENT = 325; + */ + const CREATIVE_LOAD_TIME_500_1000_PERCENT = 325; + /** + * Percent of creatives load time is greater than 8000ms. + * Corresponds to "Creative load time >8s (%)" in the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum CREATIVE_LOAD_TIME_GT_8000_PERCENT = 329; + */ + const CREATIVE_LOAD_TIME_GT_8000_PERCENT = 329; + /** + * For standard ads, your ad clickthrough rate (CTR) is the number of ad + * clicks divided by the number of individual ad impressions expressed as a + * fraction. Ad CTR = Clicks / Ad impressions. + * Corresponds to "Total CTR" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum CTR = 3; + */ + const CTR = 3; + /** + * Number of bids received for a deal. + * Corresponds to "Deals bids" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum DEALS_BIDS = 542; + */ + const DEALS_BIDS = 542; + /** + * Bid rate for a deal. + * Corresponds to "Deals bid rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum DEALS_BID_RATE = 543; + */ + const DEALS_BID_RATE = 543; + /** + * Number of bid requests sent for a deal. + * Corresponds to "Deals bid requests" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum DEALS_BID_REQUESTS = 544; + */ + const DEALS_BID_REQUESTS = 544; + /** + * Number of winning bids for a deal. + * Corresponds to "Deals winning bids" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum DEALS_WINNING_BIDS = 545; + */ + const DEALS_WINNING_BIDS = 545; + /** + * Bid win rate for a deal. + * Corresponds to "Deals win rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum DEALS_WIN_RATE = 546; + */ + const DEALS_WIN_RATE = 546; + /** + * Percent of dom load time to 1st ad request in [0, 500ms) range. + * Corresponds to "Page navigation to first ad request time 0 - 500ms (%)" + * in the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT = 521; + */ + const DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT = 521; + /** + * Percent of dom load time to 1st ad request in [1000ms, 2000ms) range. + * Corresponds to "Page navigation to first ad request time 1s - 2s (%)" in + * the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT = 522; + */ + const DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT = 522; + /** + * Percent of dom load time to 1st ad request in [2000ms, 4000ms) range. + * Corresponds to "Page navigation to first ad request time 2s - 4s (%)" in + * the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT = 523; + */ + const DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT = 523; + /** + * Percent of dom load time to 1st ad request in [4000ms, 8000ms) range. + * Corresponds to "Page navigation to first ad request time 4s - 8s (%)" in + * the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT = 524; + */ + const DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT = 524; + /** + * Percent of dom load time to 1st ad request in [500ms, 1000ms) range. + * Corresponds to "Page navigation to first ad request time 500ms - 1s (%)" + * in the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT = 525; + */ + const DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT = 525; + /** + * Percent of dom load time to 1st ad request in [8000ms, +inf) range. + * Corresponds to "Page navigation to first ad request time >8s (%)" in the + * Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT = 520; + */ + const DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT = 520; + /** + * Percent of dom load time to tag load time in [0, 500ms) range. + * Corresponds to "Page navigation to tag loaded time 0 - 500ms (%)" in the + * Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT = 526; + */ + const DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT = 526; + /** + * Percent of dom load time to tag load time in [1000ms, 2000ms) range. + * Corresponds to "Page navigation to tag loaded time 1s - 2s (%)" in the Ad + * Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT = 527; + */ + const DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT = 527; + /** + * Percent of dom load time to tag load time in [2000ms, 4000ms) range. + * Corresponds to "Page navigation to tag loaded time 2s - 4s (%)" in the Ad + * Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT = 528; + */ + const DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT = 528; + /** + * Percent of dom load time to tag load time in [4000ms, 8000ms) range. + * Corresponds to "Page navigation to tag loaded time 4s - 8s (%)" in the Ad + * Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT = 529; + */ + const DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT = 529; + /** + * Percent of dom load time to tag load time in [500ms, 1000ms) range. + * Corresponds to "Page navigation to tag loaded time 500ms - 1s (%)" in the + * Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT = 531; + */ + const DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT = 531; + /** + * Percent of dom load time to tag load time in [8000ms, +inf) range. + * Corresponds to "Page navigation to tag loaded time >8s (%)" in the Ad + * Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT = 530; + */ + const DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT = 530; + /** + * Percentage of ad responses that didn't result in an impression. + * Corresponds to "Drop-off rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum DROPOFF_RATE = 415; + */ + const DROPOFF_RATE = 415; + /** + * Engaged session count from Google Analytics. + * Corresponds to "Engaged sessions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum ENGAGED_SESSIONS = 229; + */ + const ENGAGED_SESSIONS = 229; + /** + * Engaged sessions per user from Google Analytics. + * Corresponds to "Engaged sessions per user" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum ENGAGED_SESSIONS_PER_USER = 230; + */ + const ENGAGED_SESSIONS_PER_USER = 230; + /** + * The ratio of engaged sessions to sessions. + * Corresponds to "Engagement rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum ENGAGEMENT_RATE = 426; + */ + const ENGAGEMENT_RATE = 426; + /** + * Percentage of European regulations messages where the user consented to + * all of the purposes and vendors. + * Corresponds to "European regulations consent rate" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `PERCENT` + * + * Generated from protobuf enum EUROPEAN_REGULATIONS_CONSENT_RATE = 270; + */ + const EUROPEAN_REGULATIONS_CONSENT_RATE = 270; + /** + * Percentage of European regulations messages where users made a consent + * choice after selecting "Manage options". + * Corresponds to "European regulations custom consent rate" in the Ad + * Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `PERCENT` + * + * Generated from protobuf enum EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE = 271; + */ + const EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE = 271; + /** + * Number of times a European regulations message was shown to users. + * Corresponds to "European regulations messages shown" in the Ad Manager + * UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum EUROPEAN_REGULATIONS_MESSAGES_SHOWN = 272; + */ + const EUROPEAN_REGULATIONS_MESSAGES_SHOWN = 272; + /** + * Percentage of European regulations messages where the user rejected all + * purposes and vendors. + * Corresponds to "European regulations no consent rate" in the Ad Manager + * UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `PERCENT` + * + * Generated from protobuf enum EUROPEAN_REGULATIONS_NO_CONSENT_RATE = 273; + */ + const EUROPEAN_REGULATIONS_NO_CONSENT_RATE = 273; + /** + * The rate at which an ad request is filled by the ad server including + * dynamic allocation. + * Corresponds to "Total fill rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum FILL_RATE = 258; + */ + const FILL_RATE = 258; + /** + * The number of clicks joined with Google Analytics data. + * Corresponds to "Google Analytics clicks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum GOOGLE_ANALYTICS_CLICKS = 231; + */ + const GOOGLE_ANALYTICS_CLICKS = 231; + /** + * The click-through rate from Google Analytics data. + * Corresponds to "Google Analytics CTR" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum GOOGLE_ANALYTICS_CTR = 232; + */ + const GOOGLE_ANALYTICS_CTR = 232; + /** + * The eCPM revenue data from Google Analytics. + * Corresponds to "Google Analytics eCPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum GOOGLE_ANALYTICS_ECPM = 233; + */ + const GOOGLE_ANALYTICS_ECPM = 233; + /** + * The number of impressions joined with Google Analytics data. + * Corresponds to "Google Analytics impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum GOOGLE_ANALYTICS_IMPRESSIONS = 234; + */ + const GOOGLE_ANALYTICS_IMPRESSIONS = 234; + /** + * The amount of revenue joined with Google Analytics data. + * Corresponds to "Google Analytics revenue" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum GOOGLE_ANALYTICS_REVENUE = 235; + */ + const GOOGLE_ANALYTICS_REVENUE = 235; + /** + * Number of views of a web site or mobile screen from Google Analytics. + * Corresponds to "Views" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum GOOGLE_ANALYTICS_VIEWS = 236; + */ + const GOOGLE_ANALYTICS_VIEWS = 236; + /** + * Number of views per user from Google Analytics. + * Corresponds to "Views per user" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum GOOGLE_ANALYTICS_VIEWS_PER_USER = 237; + */ + const GOOGLE_ANALYTICS_VIEWS_PER_USER = 237; + /** + * The number of coviewed impressions sold by Google in partner sales. + * Corresponds to "Google-sold auction impressions (co-viewed)" in the Ad + * Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS = 129; + */ + const GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS = 129; + /** + * The number of auction impressions sold by Google in partner sales. + * Corresponds to "Google-sold auction impressions" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum GOOGLE_SOLD_AUCTION_IMPRESSIONS = 128; + */ + const GOOGLE_SOLD_AUCTION_IMPRESSIONS = 128; + /** + * The number of coviewed impressions sold by Google in partner sales. + * Corresponds to "Google-sold impressions (co-viewed)" in the Ad Manager + * UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum GOOGLE_SOLD_COVIEWED_IMPRESSIONS = 131; + */ + const GOOGLE_SOLD_COVIEWED_IMPRESSIONS = 131; + /** + * The number of impressions sold by Google in partner sales. + * Corresponds to "Google-sold impressions" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum GOOGLE_SOLD_IMPRESSIONS = 130; + */ + const GOOGLE_SOLD_IMPRESSIONS = 130; + /** + * The number of coviewed impressions sold by Google in partner sales. + * Corresponds to "Google-sold reservation impressions (co-viewed)" in the + * Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS = 127; + */ + const GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS = 127; + /** + * The number of reservation impressions sold by Google in partner sales. + * Corresponds to "Google-sold reservation impressions" in the Ad Manager + * UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum GOOGLE_SOLD_RESERVATION_IMPRESSIONS = 126; + */ + const GOOGLE_SOLD_RESERVATION_IMPRESSIONS = 126; + /** + * Total impressions from the Google Ad Manager server, AdSense, + * Ad Exchange, and yield group partners. + * Corresponds to "Total impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum IMPRESSIONS = 1; + */ + const IMPRESSIONS = 1; + /** + * The number of impressions (via begin to render methodology) considered + * inactive, as defined by served to a device receiving ad or bid requests + * continuously for a session of greater than 16 hours without a "reset" + * event. Only applied to CTV ads. + * Corresponds to "Inactive begin to render impressions" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS = 407; + */ + const INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS = 407; + /** + * The total number of inventory shares + * Corresponds to "Inventory shares" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum INVENTORY_SHARES = 547; + */ + const INVENTORY_SHARES = 547; + /** + * The total number of partner unfilled opportunities from an inventory + * share + * Corresponds to "Inventory share partner unfilled opportunities" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES = 548; + */ + const INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES = 548; + /** + * The number of invoiced impressions. + * Corresponds to "Invoiced impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum INVOICED_IMPRESSIONS = 404; + */ + const INVOICED_IMPRESSIONS = 404; + /** + * The number of invoiced unfilled impressions. + * Corresponds to "Invoiced unfilled impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum INVOICED_UNFILLED_IMPRESSIONS = 405; + */ + const INVOICED_UNFILLED_IMPRESSIONS = 405; + /** + * The number of mediation chains that were filled. + * Corresponds to "Mediation chains filled" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum MEDIATION_CHAINS_FILLED = 584; + */ + const MEDIATION_CHAINS_FILLED = 584; + /** + * The number of impressions where the user chose to mute the ad. + * Corresponds to "Total muted impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum MUTED_IMPRESSIONS = 412; + */ + const MUTED_IMPRESSIONS = 412; + /** + * The number of impressions that had the "Mute This Ad" overlay applied. + * Corresponds to "Total mute eligible impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum MUTE_ELIGIBLE_IMPRESSIONS = 409; + */ + const MUTE_ELIGIBLE_IMPRESSIONS = 409; + /** + * The total number of opportunities from impressions and errors. + * Corresponds to "Total opportunities" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum OPPORTUNITIES = 463; + */ + const OPPORTUNITIES = 463; + /** + * The number of impressions that were overdelivered. + * Corresponds to "Total overdelivered impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum OVERDELIVERED_IMPRESSIONS = 432; + */ + const OVERDELIVERED_IMPRESSIONS = 432; + /** + * The number of filled pod requests (filled by partner or Google) in + * partner sales. + * Corresponds to "Filled pod requests" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum PARTNER_SALES_FILLED_POD_REQUESTS = 135; + */ + const PARTNER_SALES_FILLED_POD_REQUESTS = 135; + /** + * The percent of filled requests to total ad requests in + * partner sales. + * Corresponds to "Fill rate" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `PERCENT` + * + * Generated from protobuf enum PARTNER_SALES_FILL_RATE = 136; + */ + const PARTNER_SALES_FILL_RATE = 136; + /** + * The percent of partner filled requests to total ad requests + * in partner sales. + * Corresponds to "Partner match rate" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `PERCENT` + * + * Generated from protobuf enum PARTNER_SALES_PARTNER_MATCH_RATE = 137; + */ + const PARTNER_SALES_PARTNER_MATCH_RATE = 137; + /** + * The number of queries eligible for partner sales. + * Corresponds to "Total partner sales ad requests" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum PARTNER_SALES_QUERIES = 132; + */ + const PARTNER_SALES_QUERIES = 132; + /** + * The number of partner unfilled impressions in partner sales. + * If a pod request is not filled by partner but filled by Google, this + * metric will still count 1. + * Corresponds to "Partner unfilled impressions" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum PARTNER_SALES_UNFILLED_IMPRESSIONS = 133; + */ + const PARTNER_SALES_UNFILLED_IMPRESSIONS = 133; + /** + * The number of partner unmatched queries in partner sales. + * If an ad request is not filled by partner but filled by Google, this + * metric will still count 1. + * Corresponds to "Partner unmatched ad requests" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum PARTNER_SALES_UNMATCHED_QUERIES = 134; + */ + const PARTNER_SALES_UNMATCHED_QUERIES = 134; + /** + * The number of code served sold by partner in partner sales. + * Corresponds to "Partner-sold code served count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum PARTNER_SOLD_CODE_SERVED = 125; + */ + const PARTNER_SOLD_CODE_SERVED = 125; + /** + * The number of coviewed impressions sold by partner in partner sales. + * Corresponds to "Partner-sold impressions (co-viewed)" in the Ad Manager + * UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum PARTNER_SOLD_COVIEWED_IMPRESSIONS = 124; + */ + const PARTNER_SOLD_COVIEWED_IMPRESSIONS = 124; + /** + * The number of impressions sold by partner in partner sales. + * Corresponds to "Partner-sold impressions" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum PARTNER_SOLD_IMPRESSIONS = 123; + */ + const PARTNER_SOLD_IMPRESSIONS = 123; + /** + * The total number of ad requests eligible for programmatic inventory, + * including Programmatic Guaranteed, Preferred Deals, backfill, and open + * auction. + * Corresponds to "Programmatic eligible ad requests" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum PROGRAMMATIC_ELIGIBLE_AD_REQUESTS = 177; + */ + const PROGRAMMATIC_ELIGIBLE_AD_REQUESTS = 177; + /** + * The number of programmatic responses served divided by the number of + * programmatic eligible ad requests. Includes Ad Exchange, Open Bidding, + * and Preferred Deals. + * Corresponds to "Programmatic match rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum PROGRAMMATIC_MATCH_RATE = 178; + */ + const PROGRAMMATIC_MATCH_RATE = 178; + /** + * Total number of ad responses served from programmatic demand sources. + * Includes Ad Exchange, Open Bidding, and Preferred Deals. + * Differs from AD_EXCHANGE_RESPONSES_SERVED, which doesn't include Open + * Bidding ad requests. + * Corresponds to "Programmatic responses served" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum PROGRAMMATIC_RESPONSES_SERVED = 176; + */ + const PROGRAMMATIC_RESPONSES_SERVED = 176; + /** + * Number of impressions for reach reports. + * Corresponds to "Total reach impressions" in the Ad Manager UI. + * Compatible with the following report types: `REACH` + * Data format: `INTEGER` + * + * Generated from protobuf enum REACH_IMPRESSIONS = 416; + */ + const REACH_IMPRESSIONS = 416; + /** + * The total number of times that an ad is served by the ad server including + * dynamic allocation. + * Corresponds to "Total responses served" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RESPONSES_SERVED = 39; + */ + const RESPONSES_SERVED = 39; + /** + * Retention of users in Google Analytics + * Corresponds to "Retention" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum RETENTION = 238; + */ + const RETENTION = 238; + /** + * Total amount of CPM, CPC, and CPD revenue based on the number of units + * served by the Google Ad Manager server, AdSense, Ad Exchange, and + * third-party Mediation networks. + * Corresponds to "Total revenue" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum REVENUE = 36; + */ + const REVENUE = 36; + /** + * The total revenue accrued in the child network's own account but paid to + * their parent network through auto-payment. This metric is only relevant + * for a "Manage Account" child network. + * Corresponds to "Total revenue paid through MCM auto-payment" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 214; + */ + const REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 214; + /** + * Total amount of revenue (excluding CPD) based on the number of units + * served by the Google Ad Manager server, AdSense, Ad Exchange, and + * third-party Mediation networks. + * Corresponds to "Total CPM and CPC revenue" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum REVENUE_WITHOUT_CPD = 4; + */ + const REVENUE_WITHOUT_CPD = 4; + /** + * The number of rewards granted to users from watching ads. + * Corresponds to "Total rewards granted" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum REWARDS_GRANTED = 413; + */ + const REWARDS_GRANTED = 413; + /** + * The average amount of time (in seconds) that each rich media ad is + * displayed to users. + * Corresponds to "Average display time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum RICH_MEDIA_AVERAGE_DISPLAY_TIME = 587; + */ + const RICH_MEDIA_AVERAGE_DISPLAY_TIME = 587; + /** + * The average amount of time (in seconds) that a user interacts with a rich + * media ad. + * Corresponds to "Average interaction time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum RICH_MEDIA_AVERAGE_INTERACTION_TIME = 588; + */ + const RICH_MEDIA_AVERAGE_INTERACTION_TIME = 588; + /** + * The total number of times a backup image is served in place of a rich + * media ad. + * Corresponds to "Backup image impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_BACKUP_IMAGES = 589; + */ + const RICH_MEDIA_BACKUP_IMAGES = 589; + /** + * The number of times a user interacts with a specific part of a rich media + * ad. + * Corresponds to "Custom event - count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_CUSTOM_EVENT_COUNT = 599; + */ + const RICH_MEDIA_CUSTOM_EVENT_COUNT = 599; + /** + * The amount of time (in seconds) that a user interacts with a specific + * part of a rich media ad. + * Corresponds to "Custom event - time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum RICH_MEDIA_CUSTOM_EVENT_TIME = 600; + */ + const RICH_MEDIA_CUSTOM_EVENT_TIME = 600; + /** + * The amount of time (in seconds) that each rich media ad is displayed to + * users. + * Corresponds to "Total display time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum RICH_MEDIA_DISPLAY_TIME = 590; + */ + const RICH_MEDIA_DISPLAY_TIME = 590; + /** + * The average amount of time (in seconds) that an expanding ad is viewed in + * an expanded state. + * Corresponds to "Average expanding time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum RICH_MEDIA_EXPANDING_TIME = 591; + */ + const RICH_MEDIA_EXPANDING_TIME = 591; + /** + * The number of times an expanding ad was expanded. + * Corresponds to "Total expansions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_EXPANSIONS = 592; + */ + const RICH_MEDIA_EXPANSIONS = 592; + /** + * The number of times a user opens a rich media ad in full screen mode. + * Corresponds to "Full-screen impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_FULL_SCREEN_IMPRESSIONS = 593; + */ + const RICH_MEDIA_FULL_SCREEN_IMPRESSIONS = 593; + /** + * The number of times that a user interacts with a rich media ad. + * Corresponds to "Total interactions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_INTERACTION_COUNT = 594; + */ + const RICH_MEDIA_INTERACTION_COUNT = 594; + /** + * The ratio of rich media ad interactions to the number of times the ad + * was displayed. + * Corresponds to "Interaction rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum RICH_MEDIA_INTERACTION_RATE = 595; + */ + const RICH_MEDIA_INTERACTION_RATE = 595; + /** + * The total amount of time (in seconds) that a user interacts with a rich + * media ad. + * Corresponds to "Interaction time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum RICH_MEDIA_INTERACTION_TIME = 596; + */ + const RICH_MEDIA_INTERACTION_TIME = 596; + /** + * The number of impressions where a user interacted with a rich media ad. + * Corresponds to "Interactive impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_INTERACTIVE_IMPRESSIONS = 597; + */ + const RICH_MEDIA_INTERACTIVE_IMPRESSIONS = 597; + /** + * The number of times that a user manually closes a rich media ad. + * Corresponds to "Manual closes" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_MANUAL_CLOSES = 598; + */ + const RICH_MEDIA_MANUAL_CLOSES = 598; + /** + * The number of times a rich media video was fully played. + * Corresponds to "Rich media video completes" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_COMPLETES = 503; + */ + const RICH_MEDIA_VIDEO_COMPLETES = 503; + /** + * The number of times a user clicked on the graphical controls of a video + * player. + * Corresponds to "Rich media total video interactions" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_INTERACTIONS = 505; + */ + const RICH_MEDIA_VIDEO_INTERACTIONS = 505; + /** + * The ratio of video interactions to video plays. Represented as a + * percentage. + * Corresponds to "Rich media video interaction rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_INTERACTION_RATE = 504; + */ + const RICH_MEDIA_VIDEO_INTERACTION_RATE = 504; + /** + * The number of times a rich media video was played up to midpoint. + * Corresponds to "Rich media video midpoints" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_MIDPOINTS = 506; + */ + const RICH_MEDIA_VIDEO_MIDPOINTS = 506; + /** + * The number of times a rich media video was muted. + * Corresponds to "Rich media video mutes" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_MUTES = 507; + */ + const RICH_MEDIA_VIDEO_MUTES = 507; + /** + * The number of times a rich media video was paused. + * Corresponds to "Rich media video pauses" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_PAUSES = 508; + */ + const RICH_MEDIA_VIDEO_PAUSES = 508; + /** + * The number of times a rich media video was played. + * Corresponds to "Rich media video plays" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_PLAYS = 509; + */ + const RICH_MEDIA_VIDEO_PLAYS = 509; + /** + * The number of times a rich media video was restarted. + * Corresponds to "Rich media video replays" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_REPLAYS = 510; + */ + const RICH_MEDIA_VIDEO_REPLAYS = 510; + /** + * The number of times a rich media video was stopped. + * Corresponds to "Rich media video stops" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_STOPS = 511; + */ + const RICH_MEDIA_VIDEO_STOPS = 511; + /** + * The number of times a rich media video was unmuted. + * Corresponds to "Rich media video unmutes" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_UNMUTES = 512; + */ + const RICH_MEDIA_VIDEO_UNMUTES = 512; + /** + * The percentage of a video watched by a user. + * Corresponds to "Rich media video view rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_VIEW_RATE = 513; + */ + const RICH_MEDIA_VIDEO_VIEW_RATE = 513; + /** + * The average amount of time(seconds) that a rich media video was viewed + * per view. + * Corresponds to "Rich media video average view time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum RICH_MEDIA_VIDEO_VIEW_TIME = 514; + */ + const RICH_MEDIA_VIDEO_VIEW_TIME = 514; + /** + * The number of forecasted impressions not reserved by any line item. + * Corresponds to "Available impressions" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum SELL_THROUGH_AVAILABLE_IMPRESSIONS = 477; + */ + const SELL_THROUGH_AVAILABLE_IMPRESSIONS = 477; + /** + * The total number of forecasted impressions. + * Corresponds to "Forecasted impressions" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum SELL_THROUGH_FORECASTED_IMPRESSIONS = 478; + */ + const SELL_THROUGH_FORECASTED_IMPRESSIONS = 478; + /** + * The number of forecasted impressions reserved by line items. + * Corresponds to "Reserved impressions" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum SELL_THROUGH_RESERVED_IMPRESSIONS = 479; + */ + const SELL_THROUGH_RESERVED_IMPRESSIONS = 479; + /** + * The fraction of forecasted impressions reserved by line items. + * Corresponds to "Sell-through rate" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `PERCENT` + * + * Generated from protobuf enum SELL_THROUGH_SELL_THROUGH_RATE = 480; + */ + const SELL_THROUGH_SELL_THROUGH_RATE = 480; + /** + * The average latency in milliseconds across all server-side unwrapping + * callout requests. There is no special handling for error or timeout + * responses. This reflects the entire chain of a parent callout request, + * which may result in multiple child callouts. This metric is not sliced + * by child callout dimensions. + * Corresponds to "Server-side unwrapping average latency (milliseconds)" in + * the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS = 434; + */ + const SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS = 434; + /** + * The total number of server-side unwrapping callout requests. + * Corresponds to "Server-side unwrapping callouts" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum SERVER_SIDE_UNWRAPPING_CALLOUTS = 435; + */ + const SERVER_SIDE_UNWRAPPING_CALLOUTS = 435; + /** + * The total number of server-side unwrapping callouts that returned an + * empty response. Timeouts are not considered empty responses. + * Corresponds to "Server-side unwrapping empty responses" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES = 436; + */ + const SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES = 436; + /** + * The total number of server-side unwrapping callouts that returned an + * error response. Timeouts and empty responses are not considered errors. + * Corresponds to "Server-side unwrapping error responses" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES = 437; + */ + const SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES = 437; + /** + * The total number of successfully unwrapped, non-empty server-side + * wrapping callouts. Successful unwrapping does not indicate that the + * resulting creative was served. + * Corresponds to "Server-side unwrapping successful responses" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES = 438; + */ + const SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES = 438; + /** + * The total number of server-side unwrapping callouts that timed out before + * returning a response. + * Corresponds to "Server-side unwrapping timeouts" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum SERVER_SIDE_UNWRAPPING_TIMEOUTS = 439; + */ + const SERVER_SIDE_UNWRAPPING_TIMEOUTS = 439; + /** + * Count of sessions from Google Analytics. + * Corresponds to "Sessions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum SESSIONS = 239; + */ + const SESSIONS = 239; + /** + * Percent of tag load time to 1st ad request in [0, 500ms) range. + * Corresponds to "Tag loaded to first ad request time 0 - 500ms (%)" in the + * Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT = 455; + */ + const TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT = 455; + /** + * Percent of tag load time to 1st ad request in [1000ms, 2000ms) range. + * Corresponds to "Tag loaded to first ad request time 1s - 2s (%)" in the + * Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT = 457; + */ + const TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT = 457; + /** + * Percent of tag load time to 1st ad request in [2000ms, 4000ms) range. + * Corresponds to "Tag loaded to first ad request time 2s - 4s (%)" in the + * Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT = 458; + */ + const TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT = 458; + /** + * Percent of tag load time to 1st ad request in [4000ms, 8000ms) range. + * Corresponds to "Tag loaded to first ad request time 4s - 8s (%)" in the + * Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT = 459; + */ + const TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT = 459; + /** + * Percent of tag load time to 1st ad request in [500ms, 1000ms) range. + * Corresponds to "Tag loaded to first ad request time 500ms - 1s (%)" in + * the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT = 456; + */ + const TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT = 456; + /** + * Percent of tag load time to 1st ad request in [8000ms, +inf) range. + * Corresponds to "Tag loaded to first ad request time >8s (%)" in the Ad + * Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT = 460; + */ + const TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT = 460; + /** + * The total number of clicks delivered including line item-level dynamic + * allocation by explicit custom criteria targeting. + * Corresponds to "Total targeted clicks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum TARGETED_CLICKS = 276; + */ + const TARGETED_CLICKS = 276; + /** + * The total number of impressions delivered including line item-level + * dynamic allocation by explicit custom criteria targeting. + * Corresponds to "Total targeted impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum TARGETED_IMPRESSIONS = 277; + */ + const TARGETED_IMPRESSIONS = 277; + /** + * The total number of missed impressions due to the ad servers' inability + * to find ads to serve including dynamic allocation. + * Corresponds to "Unfilled impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum UNFILLED_IMPRESSIONS = 45; + */ + const UNFILLED_IMPRESSIONS = 45; + /** + * The total number of unique users who viewed the ad. + * Corresponds to "Total unique visitors" in the Ad Manager UI. + * Compatible with the following report types: `REACH` + * Data format: `INTEGER` + * + * Generated from protobuf enum UNIQUE_VISITORS = 417; + */ + const UNIQUE_VISITORS = 417; + /** + * The number of impressions impacted by Chrome Ads Intervention due to CPU + * usage. + * Corresponds to "Total unloaded impressions due to CPU" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum UNLOADED_IMPRESSIONS_DUE_TO_CPU = 408; + */ + const UNLOADED_IMPRESSIONS_DUE_TO_CPU = 408; + /** + * The number of impressions impacted by Chrome Ads Intervention due to + * network usage. + * Corresponds to "Total unloaded impressions due to Network" in the Ad + * Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum UNLOADED_IMPRESSIONS_DUE_TO_NETWORK = 406; + */ + const UNLOADED_IMPRESSIONS_DUE_TO_NETWORK = 406; + /** + * The total number of times that an ad is not returned by the ad server. + * Corresponds to "Total unmatched ad requests" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum UNMATCHED_AD_REQUESTS = 43; + */ + const UNMATCHED_AD_REQUESTS = 43; + /** + * The percentage of unviewed impressions due to other reasons. + * Corresponds to "Other non-viewable impression reasons (%)" in the Ad + * Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum UNVIEWED_REASON_OTHER_PERCENT = 550; + */ + const UNVIEWED_REASON_OTHER_PERCENT = 550; + /** + * The percentage of unviewed impressions due to slot never entered + * viewport. + * Corresponds to "Slot never entered viewport (%)" in the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT = 553; + */ + const UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT = 553; + /** + * The percentage of unviewed impressions due to scrolled past before ad + * filled. + * Corresponds to "User scrolled before ad filled (%)" in the Ad Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT = 551; + */ + const UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT = 551; + /** + * The percentage of unviewed impressions due to scrolled past before ad + * loaded. + * Corresponds to "User scrolled/navigated before ad loaded (%)" in the Ad + * Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT = 552; + */ + const UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT = 552; + /** + * The percentage of unviewed impressions due to insufficient time on + * screen. + * Corresponds to "User scrolled/navigated before 1 second (%)" in the Ad + * Manager UI. + * Compatible with the following report types: `AD_SPEED` + * Data format: `PERCENT` + * + * Generated from protobuf enum UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT = 549; + */ + const UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT = 549; + /** + * Time of users interacting with web site or mobile app from Google + * Analytics in seconds. + * Corresponds to "User engagement duration (seconds)" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_ENGAGEMENT_DURATION_IN_SECONDS = 240; + */ + const USER_ENGAGEMENT_DURATION_IN_SECONDS = 240; + /** + * Fraction of page views where users had ad blocker extensions installed. + * Includes only Desktop page views. + * Corresponds to "Ad blocking extension rate" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `PERCENT` + * + * Generated from protobuf enum USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE = 486; + */ + const USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE = 486; + /** + * Number of ad-blocking messages shown in the selected date range that + * resulted in users adding the site to their allowlist to view ads + * Corresponds to "Ad blocking recovery message conversions" in the Ad + * Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT = 487; + */ + const USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT = 487; + /** + * Number of times an ad blocking recovery message was shown to users. + * Corresponds to "Ad blocking recovery messages shown" in the Ad Manager + * UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN = 488; + */ + const USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN = 488; + /** + * The number of page views generated by users with an ad blocking extension + * installed who were shown the ad blocking recovery message and later + * allowed ads. + * Corresponds to "Allow-ads page views" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_ALLOW_ADS_PAGEVIEWS = 489; + */ + const USER_MESSAGES_ALLOW_ADS_PAGEVIEWS = 489; + /** + * Number of times a US state regulations message was shown to users. + * Corresponds to "US states messages shown" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_CCPA_MESSAGES_SHOWN = 490; + */ + const USER_MESSAGES_CCPA_MESSAGES_SHOWN = 490; + /** + * Number of iOS ATT alerts that were triggered by an IDFA message (IDFA + * messages can be IDFA explainers or GDPR messages). + * Corresponds to "IDFA ATT alerts shown" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN = 491; + */ + const USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN = 491; + /** + * Number of iOS ATT alerts triggered by the IDFA message where the user + * chose to allow tracking. + * Corresponds to "IDFA ATT consent" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_IDFA_ATT_CONSENT = 492; + */ + const USER_MESSAGES_IDFA_ATT_CONSENT = 492; + /** + * Percentage of iOS ATT alerts triggered by the IDFA message where the + * outcome was to allow tracking. + * Corresponds to "IDFA ATT consent rate" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `PERCENT` + * + * Generated from protobuf enum USER_MESSAGES_IDFA_ATT_CONSENT_RATE = 493; + */ + const USER_MESSAGES_IDFA_ATT_CONSENT_RATE = 493; + /** + * Number of iOS ATT alerts triggered by the IDFA message where the user + * chose to deny tracking. + * Corresponds to "IDFA ATT decline consent" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT = 494; + */ + const USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT = 494; + /** + * Percentage of iOS ATT alerts triggered by the IDFA message where the user + * chose to deny tracking. + * Corresponds to "IDFA ATT decline rate" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `PERCENT` + * + * Generated from protobuf enum USER_MESSAGES_IDFA_ATT_DECLINE_RATE = 495; + */ + const USER_MESSAGES_IDFA_ATT_DECLINE_RATE = 495; + /** + * Number of times an IDFA explainer message was shown to users. + * Corresponds to "IDFA explainers shown" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_IDFA_EXPLAINERS_SHOWN = 496; + */ + const USER_MESSAGES_IDFA_EXPLAINERS_SHOWN = 496; + /** + * Number of times a European regulations message was shown immediately + * before the iOS ATT alert. + * Corresponds to "IDFA IAB messages shown" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN = 497; + */ + const USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN = 497; + /** + * Number of IDFA explainer messages where the user didn't choose anything. + * Corresponds to "IDFA no decision" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_IDFA_NO_DECISION = 498; + */ + const USER_MESSAGES_IDFA_NO_DECISION = 498; + /** + * Number of times an Offerwall message was shown to users. + * Corresponds to "Offerwall messages shown" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN = 121; + */ + const USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN = 121; + /** + * The number of messages where the user gained an entitlement. + * Corresponds to "Monetized Offerwall engagements" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS = 122; + */ + const USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS = 122; + /** + * The number of pages viewed by users after gaining an entitlement. Only + * counts pages included for Offerwall. + * Corresponds to "Post-offerwall page views" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS = 499; + */ + const USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS = 499; + /** + * Revenue earned through Offerwall, including Rewarded ad revenue and + * third-party integrations. + * Corresponds to "Estimated Offerwall revenue" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `MONEY` + * + * Generated from protobuf enum USER_MESSAGES_TOTAL_ESTIMATED_REVENUE = 500; + */ + const USER_MESSAGES_TOTAL_ESTIMATED_REVENUE = 500; + /** + * Number of times an ads personalization controls message was shown to + * users. + * Corresponds to "Ads personalization messages shown" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `INTEGER` + * + * Generated from protobuf enum USER_MESSAGES_UPTC_MESSAGES_SHOWN = 501; + */ + const USER_MESSAGES_UPTC_MESSAGES_SHOWN = 501; + /** + * Percentage of ads personalization controls messages where users chose the + * opt-out option. + * Corresponds to "Personalization opt-out ratio" in the Ad Manager UI. + * Compatible with the following report types: `PRIVACY_AND_MESSAGING` + * Data format: `PERCENT` + * + * Generated from protobuf enum USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO = 502; + */ + const USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO = 502; + /** + * The number of errors of type 100 in reporting. + * Corresponds to "VAST error 100 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_100_COUNT = 180; + */ + const VIDEO_ERROR_100_COUNT = 180; + /** + * The number of errors of type 101 in reporting. + * Corresponds to "VAST error 101 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_101_COUNT = 181; + */ + const VIDEO_ERROR_101_COUNT = 181; + /** + * The number of errors of type 102 in reporting. + * Corresponds to "VAST error 102 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_102_COUNT = 182; + */ + const VIDEO_ERROR_102_COUNT = 182; + /** + * The number of errors of type 200 in reporting. + * Corresponds to "VAST error 200 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_200_COUNT = 183; + */ + const VIDEO_ERROR_200_COUNT = 183; + /** + * The number of errors of type 201 in reporting. + * Corresponds to "VAST error 201 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_201_COUNT = 184; + */ + const VIDEO_ERROR_201_COUNT = 184; + /** + * The number of errors of type 202 in reporting. + * Corresponds to "VAST error 202 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_202_COUNT = 185; + */ + const VIDEO_ERROR_202_COUNT = 185; + /** + * The number of errors of type 203 in reporting. + * Corresponds to "VAST error 203 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_203_COUNT = 186; + */ + const VIDEO_ERROR_203_COUNT = 186; + /** + * The number of errors of type 300 in reporting. + * Corresponds to "VAST error 300 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_300_COUNT = 187; + */ + const VIDEO_ERROR_300_COUNT = 187; + /** + * The number of errors of type 301 in reporting. + * Corresponds to "VAST error 301 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_301_COUNT = 188; + */ + const VIDEO_ERROR_301_COUNT = 188; + /** + * The number of errors of type 302 in reporting. + * Corresponds to "VAST error 302 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_302_COUNT = 189; + */ + const VIDEO_ERROR_302_COUNT = 189; + /** + * The number of errors of type 303 in reporting. + * Corresponds to "VAST error 303 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_303_COUNT = 190; + */ + const VIDEO_ERROR_303_COUNT = 190; + /** + * The number of errors of type 400 in reporting. + * Corresponds to "VAST error 400 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_400_COUNT = 191; + */ + const VIDEO_ERROR_400_COUNT = 191; + /** + * The number of errors of type 401 in reporting. + * Corresponds to "VAST error 401 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_401_COUNT = 192; + */ + const VIDEO_ERROR_401_COUNT = 192; + /** + * The number of errors of type 402 in reporting. + * Corresponds to "VAST error 402 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_402_COUNT = 193; + */ + const VIDEO_ERROR_402_COUNT = 193; + /** + * The number of errors of type 403 in reporting. + * Corresponds to "VAST error 403 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_403_COUNT = 194; + */ + const VIDEO_ERROR_403_COUNT = 194; + /** + * The number of errors of type 405 in reporting. + * Corresponds to "VAST error 405 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_405_COUNT = 195; + */ + const VIDEO_ERROR_405_COUNT = 195; + /** + * The number of errors of type 406 in reporting. + * Corresponds to "VAST error 406 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_406_COUNT = 196; + */ + const VIDEO_ERROR_406_COUNT = 196; + /** + * The number of errors of type 407 in reporting. + * Corresponds to "VAST error 407 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_407_COUNT = 197; + */ + const VIDEO_ERROR_407_COUNT = 197; + /** + * The number of errors of type 408 in reporting. + * Corresponds to "VAST error 408 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_408_COUNT = 198; + */ + const VIDEO_ERROR_408_COUNT = 198; + /** + * The number of errors of type 409 in reporting. + * Corresponds to "VAST error 409 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_409_COUNT = 199; + */ + const VIDEO_ERROR_409_COUNT = 199; + /** + * The number of errors of type 410 in reporting. + * Corresponds to "VAST error 410 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_410_COUNT = 200; + */ + const VIDEO_ERROR_410_COUNT = 200; + /** + * The number of errors of type 500 in reporting. + * Corresponds to "VAST error 500 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_500_COUNT = 201; + */ + const VIDEO_ERROR_500_COUNT = 201; + /** + * The number of errors of type 501 in reporting. + * Corresponds to "VAST error 501 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_501_COUNT = 202; + */ + const VIDEO_ERROR_501_COUNT = 202; + /** + * The number of errors of type 502 in reporting. + * Corresponds to "VAST error 502 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_502_COUNT = 203; + */ + const VIDEO_ERROR_502_COUNT = 203; + /** + * The number of errors of type 503 in reporting. + * Corresponds to "VAST error 503 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_503_COUNT = 204; + */ + const VIDEO_ERROR_503_COUNT = 204; + /** + * The number of errors of type 600 in reporting. + * Corresponds to "VAST error 600 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_600_COUNT = 205; + */ + const VIDEO_ERROR_600_COUNT = 205; + /** + * The number of errors of type 601 in reporting. + * Corresponds to "VAST error 601 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_601_COUNT = 206; + */ + const VIDEO_ERROR_601_COUNT = 206; + /** + * The number of errors of type 602 in reporting. + * Corresponds to "VAST error 602 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_602_COUNT = 207; + */ + const VIDEO_ERROR_602_COUNT = 207; + /** + * The number of errors of type 603 in reporting. + * Corresponds to "VAST error 603 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_603_COUNT = 208; + */ + const VIDEO_ERROR_603_COUNT = 208; + /** + * The number of errors of type 604 in reporting. + * Corresponds to "VAST error 604 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_604_COUNT = 209; + */ + const VIDEO_ERROR_604_COUNT = 209; + /** + * The number of errors of type 900 in reporting. + * Corresponds to "VAST error 900 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_900_COUNT = 210; + */ + const VIDEO_ERROR_900_COUNT = 210; + /** + * The number of errors of type 901 in reporting. + * Corresponds to "VAST error 901 count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_ERROR_901_COUNT = 211; + */ + const VIDEO_ERROR_901_COUNT = 211; + /** + * The number of user interactions with a video, on average, such as pause, + * full screen, mute, etc. + * Corresponds to "Average interaction rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE = 92; + */ + const VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE = 92; + /** + * The number of times a user collapses a video, either to its original size + * or to a different size. + * Corresponds to "Collapses" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_INTERACTION_COLLAPSES = 93; + */ + const VIDEO_INTERACTION_COLLAPSES = 93; + /** + * The number of times a user expands a video. + * Corresponds to "Expands" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_INTERACTION_EXPANDS = 95; + */ + const VIDEO_INTERACTION_EXPANDS = 95; + /** + * The number of times ad clip played in full screen mode. + * Corresponds to "Full screens" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_INTERACTION_FULL_SCREENS = 96; + */ + const VIDEO_INTERACTION_FULL_SCREENS = 96; + /** + * The number of times video player was in mute state during play of ad + * clip. + * Corresponds to "Mutes" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_INTERACTION_MUTES = 97; + */ + const VIDEO_INTERACTION_MUTES = 97; + /** + * The number of times user paused ad clip. + * Corresponds to "Pauses" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_INTERACTION_PAUSES = 98; + */ + const VIDEO_INTERACTION_PAUSES = 98; + /** + * The number of times the user unpaused the video. + * Corresponds to "Resumes" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_INTERACTION_RESUMES = 99; + */ + const VIDEO_INTERACTION_RESUMES = 99; + /** + * The number of times a user rewinds the video. + * Corresponds to "Rewinds" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_INTERACTION_REWINDS = 100; + */ + const VIDEO_INTERACTION_REWINDS = 100; + /** + * The number of times a user unmutes the video. + * Corresponds to "Unmutes" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_INTERACTION_UNMUTES = 101; + */ + const VIDEO_INTERACTION_UNMUTES = 101; + /** + * The number of times a skippable video is skipped. + * Corresponds to "Skips" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_INTERACTION_VIDEO_SKIPS = 102; + */ + const VIDEO_INTERACTION_VIDEO_SKIPS = 102; + /** + * The number of views for monetizable video content. + * Corresponds to "Monetizable content views" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_MONETIZABLE_CONTENT_VIEWS = 601; + */ + const VIDEO_MONETIZABLE_CONTENT_VIEWS = 601; + /** + * The number of total creative serves in video realtime reporting. + * Corresponds to "Total creative serves" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_CREATIVE_SERVES = 139; + */ + const VIDEO_REAL_TIME_CREATIVE_SERVES = 139; + /** + * The number of errors of type 100 in video realtime reporting. + * Corresponds to "VAST error 100 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_100_COUNT = 143; + */ + const VIDEO_REAL_TIME_ERROR_100_COUNT = 143; + /** + * The number of errors of type 101 in video realtime reporting. + * Corresponds to "VAST error 101 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_101_COUNT = 144; + */ + const VIDEO_REAL_TIME_ERROR_101_COUNT = 144; + /** + * The number of errors of type 102 in video realtime reporting. + * Corresponds to "VAST error 102 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_102_COUNT = 145; + */ + const VIDEO_REAL_TIME_ERROR_102_COUNT = 145; + /** + * The number of errors of type 200 in video realtime reporting. + * Corresponds to "VAST error 200 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_200_COUNT = 146; + */ + const VIDEO_REAL_TIME_ERROR_200_COUNT = 146; + /** + * The number of errors of type 201 in video realtime reporting. + * Corresponds to "VAST error 201 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_201_COUNT = 147; + */ + const VIDEO_REAL_TIME_ERROR_201_COUNT = 147; + /** + * The number of errors of type 202 in video realtime reporting. + * Corresponds to "VAST error 202 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_202_COUNT = 148; + */ + const VIDEO_REAL_TIME_ERROR_202_COUNT = 148; + /** + * The number of errors of type 203 in video realtime reporting. + * Corresponds to "VAST error 203 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_203_COUNT = 149; + */ + const VIDEO_REAL_TIME_ERROR_203_COUNT = 149; + /** + * The number of errors of type 300 in video realtime reporting. + * Corresponds to "VAST error 300 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_300_COUNT = 150; + */ + const VIDEO_REAL_TIME_ERROR_300_COUNT = 150; + /** + * The number of errors of type 301 in video realtime reporting. + * Corresponds to "VAST error 301 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_301_COUNT = 151; + */ + const VIDEO_REAL_TIME_ERROR_301_COUNT = 151; + /** + * The number of errors of type 302 in video realtime reporting. + * Corresponds to "VAST error 302 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_302_COUNT = 152; + */ + const VIDEO_REAL_TIME_ERROR_302_COUNT = 152; + /** + * The number of errors of type 303 in video realtime reporting. + * Corresponds to "VAST error 303 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_303_COUNT = 153; + */ + const VIDEO_REAL_TIME_ERROR_303_COUNT = 153; + /** + * The number of errors of type 400 in video realtime reporting. + * Corresponds to "VAST error 400 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_400_COUNT = 154; + */ + const VIDEO_REAL_TIME_ERROR_400_COUNT = 154; + /** + * The number of errors of type 401 in video realtime reporting. + * Corresponds to "VAST error 401 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_401_COUNT = 155; + */ + const VIDEO_REAL_TIME_ERROR_401_COUNT = 155; + /** + * The number of errors of type 402 in video realtime reporting. + * Corresponds to "VAST error 402 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_402_COUNT = 156; + */ + const VIDEO_REAL_TIME_ERROR_402_COUNT = 156; + /** + * The number of errors of type 403 in video realtime reporting. + * Corresponds to "VAST error 403 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_403_COUNT = 157; + */ + const VIDEO_REAL_TIME_ERROR_403_COUNT = 157; + /** + * The number of errors of type 405 in video realtime reporting. + * Corresponds to "VAST error 405 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_405_COUNT = 158; + */ + const VIDEO_REAL_TIME_ERROR_405_COUNT = 158; + /** + * The number of errors of type 406 in video realtime reporting. + * Corresponds to "VAST error 406 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_406_COUNT = 159; + */ + const VIDEO_REAL_TIME_ERROR_406_COUNT = 159; + /** + * The number of errors of type 407 in video realtime reporting. + * Corresponds to "VAST error 407 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_407_COUNT = 160; + */ + const VIDEO_REAL_TIME_ERROR_407_COUNT = 160; + /** + * The number of errors of type 408 in video realtime reporting. + * Corresponds to "VAST error 408 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_408_COUNT = 161; + */ + const VIDEO_REAL_TIME_ERROR_408_COUNT = 161; + /** + * The number of errors of type 409 in video realtime reporting. + * Corresponds to "VAST error 409 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_409_COUNT = 162; + */ + const VIDEO_REAL_TIME_ERROR_409_COUNT = 162; + /** + * The number of errors of type 410 in video realtime reporting. + * Corresponds to "VAST error 410 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_410_COUNT = 163; + */ + const VIDEO_REAL_TIME_ERROR_410_COUNT = 163; + /** + * The number of errors of type 500 in video realtime reporting. + * Corresponds to "VAST error 500 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_500_COUNT = 164; + */ + const VIDEO_REAL_TIME_ERROR_500_COUNT = 164; + /** + * The number of errors of type 501 in video realtime reporting. + * Corresponds to "VAST error 501 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_501_COUNT = 165; + */ + const VIDEO_REAL_TIME_ERROR_501_COUNT = 165; + /** + * The number of errors of type 502 in video realtime reporting. + * Corresponds to "VAST error 502 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_502_COUNT = 166; + */ + const VIDEO_REAL_TIME_ERROR_502_COUNT = 166; + /** + * The number of errors of type 503 in video realtime reporting. + * Corresponds to "VAST error 503 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_503_COUNT = 167; + */ + const VIDEO_REAL_TIME_ERROR_503_COUNT = 167; + /** + * The number of errors of type 600 in video realtime reporting. + * Corresponds to "VAST error 600 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_600_COUNT = 168; + */ + const VIDEO_REAL_TIME_ERROR_600_COUNT = 168; + /** + * The number of errors of type 601 in video realtime reporting. + * Corresponds to "VAST error 601 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_601_COUNT = 169; + */ + const VIDEO_REAL_TIME_ERROR_601_COUNT = 169; + /** + * The number of errors of type 602 in video realtime reporting. + * Corresponds to "VAST error 602 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_602_COUNT = 170; + */ + const VIDEO_REAL_TIME_ERROR_602_COUNT = 170; + /** + * The number of errors of type 603 in video realtime reporting. + * Corresponds to "VAST error 603 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_603_COUNT = 171; + */ + const VIDEO_REAL_TIME_ERROR_603_COUNT = 171; + /** + * The number of errors of type 604 in video realtime reporting. + * Corresponds to "VAST error 604 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_604_COUNT = 172; + */ + const VIDEO_REAL_TIME_ERROR_604_COUNT = 172; + /** + * The number of errors of type 900 in video realtime reporting. + * Corresponds to "VAST error 900 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_900_COUNT = 173; + */ + const VIDEO_REAL_TIME_ERROR_900_COUNT = 173; + /** + * The number of errors of type 901 in video realtime reporting. + * Corresponds to "VAST error 901 count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_ERROR_901_COUNT = 174; + */ + const VIDEO_REAL_TIME_ERROR_901_COUNT = 174; + /** + * The number of total impressions in video realtime reporting. + * Corresponds to "Total impressions" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_IMPRESSIONS = 138; + */ + const VIDEO_REAL_TIME_IMPRESSIONS = 138; + /** + * The number of matched queries in video realtime reporting. + * Corresponds to "Total responses served" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_MATCHED_QUERIES = 140; + */ + const VIDEO_REAL_TIME_MATCHED_QUERIES = 140; + /** + * The number of all errors in video realtime reporting. + * Corresponds to "Total error count" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_TOTAL_ERROR_COUNT = 175; + */ + const VIDEO_REAL_TIME_TOTAL_ERROR_COUNT = 175; + /** + * The number of total queries in video realtime reporting. + * Corresponds to "Total ad requests" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_TOTAL_QUERIES = 142; + */ + const VIDEO_REAL_TIME_TOTAL_QUERIES = 142; + /** + * The number of unmatched queries in video realtime reporting. + * Corresponds to "Total unmatched ad requests" in the Ad Manager UI. + * Compatible with the following report types: + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_REAL_TIME_UNMATCHED_QUERIES = 141; + */ + const VIDEO_REAL_TIME_UNMATCHED_QUERIES = 141; + /** + * Number of times that the publisher specified a video ad played + * automatically. + * Corresponds to "Auto-plays" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_AUTO_PLAYS = 103; + */ + const VIDEO_VIEWERSHIP_AUTO_PLAYS = 103; + /** + * Average percentage of the video watched by users. + * Corresponds to "Average view rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE = 104; + */ + const VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE = 104; + /** + * Average time(seconds) users watched the video. + * Corresponds to "Average view time" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME = 105; + */ + const VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME = 105; + /** + * Number of times that the publisher specified a video ad was clicked to + * play. + * Corresponds to "Click-to-plays" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_CLICK_TO_PLAYS = 106; + */ + const VIDEO_VIEWERSHIP_CLICK_TO_PLAYS = 106; + /** + * The number of times the video played to completion. + * Corresponds to "Completes" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_COMPLETES = 107; + */ + const VIDEO_VIEWERSHIP_COMPLETES = 107; + /** + * Percentage of times the video played to the end. + * Corresponds to "Completion rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_COMPLETION_RATE = 108; + */ + const VIDEO_VIEWERSHIP_COMPLETION_RATE = 108; + /** + * The number of engaged views: ad is viewed to completion or for 30s, + * whichever comes first. + * Corresponds to "Engaged views" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_ENGAGED_VIEWS = 109; + */ + const VIDEO_VIEWERSHIP_ENGAGED_VIEWS = 109; + /** + * The number of times the video played to 25% of its length. + * Corresponds to "First quartiles" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_FIRST_QUARTILES = 110; + */ + const VIDEO_VIEWERSHIP_FIRST_QUARTILES = 110; + /** + * The number of times the video reached its midpoint during play. + * Corresponds to "Midpoints" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_MIDPOINTS = 111; + */ + const VIDEO_VIEWERSHIP_MIDPOINTS = 111; + /** + * The number of times a skip button is shown in video. + * Corresponds to "Skip buttons shown" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN = 112; + */ + const VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN = 112; + /** + * The number of impressions where the video was played. + * Corresponds to "Starts" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_STARTS = 113; + */ + const VIDEO_VIEWERSHIP_STARTS = 113; + /** + * The number of times the video played to 75% of its length. + * Corresponds to "Third quartiles" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_THIRD_QUARTILES = 114; + */ + const VIDEO_VIEWERSHIP_THIRD_QUARTILES = 114; + /** + * The number of times an error occurred, such as a VAST redirect error, a + * video playback error, or an invalid response error. + * Corresponds to "Total error count" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT = 115; + */ + const VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT = 115; + /** + * The percentage of video error count. + * Corresponds to "Total error rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE = 94; + */ + const VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE = 94; + /** + * Duration of the video creative. + * Corresponds to "Video length" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_VIDEO_LENGTH = 116; + */ + const VIDEO_VIEWERSHIP_VIDEO_LENGTH = 116; + /** + * View-through rate represented as a percentage. + * Corresponds to "Video view through rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `PERCENT` + * + * Generated from protobuf enum VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE = 117; + */ + const VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE = 117; + /** + * Number of winning bids received from Open Bidding buyers, even when the + * winning bid is placed at the end of a mediation for mobile apps chain. + * Corresponds to "Yield group auctions won" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum YIELD_GROUP_AUCTIONS_WON = 80; + */ + const YIELD_GROUP_AUCTIONS_WON = 80; + /** + * Number of bids received from Open Bidding buyers, regardless of whether + * the returned bid competes in an auction. + * Corresponds to "Yield group bids" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum YIELD_GROUP_BIDS = 81; + */ + const YIELD_GROUP_BIDS = 81; + /** + * Number of bids received from Open Bidding buyers that competed in + * the auction. + * Corresponds to "Yield group bids in auction" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum YIELD_GROUP_BIDS_IN_AUCTION = 82; + */ + const YIELD_GROUP_BIDS_IN_AUCTION = 82; + /** + * Number of times a yield partner is asked to return bid to fill + * a yield group request. + * Corresponds to "Yield group callouts" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum YIELD_GROUP_CALLOUTS = 83; + */ + const YIELD_GROUP_CALLOUTS = 83; + /** + * The estimated net rate for yield groups or individual + * yield group partners. + * Corresponds to "Yield group estimated CPM" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum YIELD_GROUP_ESTIMATED_CPM = 88; + */ + const YIELD_GROUP_ESTIMATED_CPM = 88; + /** + * Total net revenue earned by a yield group, based upon the yield group + * estimated CPM and yield group impressions recorded. + * Corresponds to "Yield group estimated revenue" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum YIELD_GROUP_ESTIMATED_REVENUE = 87; + */ + const YIELD_GROUP_ESTIMATED_REVENUE = 87; + /** + * Number of matched yield group requests where a yield partner delivered + * their ad to publisher inventory. + * Corresponds to "Yield group impressions" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum YIELD_GROUP_IMPRESSIONS = 85; + */ + const YIELD_GROUP_IMPRESSIONS = 85; + /** + * Yield group Mediation fill rate indicating how often a network + * fills an ad request. + * Corresponds to "Yield group mediation fill rate" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum YIELD_GROUP_MEDIATION_FILL_RATE = 89; + */ + const YIELD_GROUP_MEDIATION_FILL_RATE = 89; + /** + * Total requests where a Mediation chain was served. + * Corresponds to "Yield group mediation matched queries" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum YIELD_GROUP_MEDIATION_MATCHED_QUERIES = 86; + */ + const YIELD_GROUP_MEDIATION_MATCHED_QUERIES = 86; + /** + * The number of mediation chain passback across all channels. + * Corresponds to "Yield group mediation passbacks" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum YIELD_GROUP_MEDIATION_PASSBACKS = 118; + */ + const YIELD_GROUP_MEDIATION_PASSBACKS = 118; + /** + * Revenue per thousand impressions based on data collected by Ad Manager + * from third-party ad network reports. + * Corresponds to "Yield group mediation third party ECPM" in the Ad Manager + * UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `DOUBLE` + * + * Generated from protobuf enum YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM = 90; + */ + const YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM = 90; + /** + * The yield group revenue accrued in the child network's own account but + * paid to their parent network through auto-payment. This metric is only + * relevant for a "Manage Account" child network. + * Corresponds to "Yield group revenue paid through MCM auto-payment" in the + * Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `MONEY` + * + * Generated from protobuf enum YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 215; + */ + const YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT = 215; + /** + * Number of times a yield group buyer successfully returned a bid in + * response to a yield group callout. + * Corresponds to "Yield group successful responses" in the Ad Manager UI. + * Compatible with the following report types: `HISTORICAL` + * Data format: `INTEGER` + * + * Generated from protobuf enum YIELD_GROUP_SUCCESSFUL_RESPONSES = 84; + */ + const YIELD_GROUP_SUCCESSFUL_RESPONSES = 84; + + private static $valueToName = [ + self::METRIC_UNSPECIFIED => 'METRIC_UNSPECIFIED', + self::ACTIVE_USERS => 'ACTIVE_USERS', + self::ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT => 'ACTIVE_VIEW_AUDIBLE_AT_START_PERCENT', + self::ACTIVE_VIEW_AUDIBLE_IMPRESSIONS => 'ACTIVE_VIEW_AUDIBLE_IMPRESSIONS', + self::ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT => 'ACTIVE_VIEW_AUDIBLE_THROUGH_COMPLETION_PERCENT', + self::ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT => 'ACTIVE_VIEW_AUDIBLE_THROUGH_FIRST_QUARTILE_PERCENT', + self::ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT => 'ACTIVE_VIEW_AUDIBLE_THROUGH_MIDPOINT_PERCENT', + self::ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT => 'ACTIVE_VIEW_AUDIBLE_THROUGH_THIRD_QUARTILE_PERCENT', + self::ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS => 'ACTIVE_VIEW_AUDIO_ENABLED_IMPRESSIONS', + self::ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS => 'ACTIVE_VIEW_AUDIO_MEASURABLE_IMPRESSIONS', + self::ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME => 'ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME', + self::ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS => 'ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS', + self::ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT => 'ACTIVE_VIEW_EVER_AUDIBLE_BACKGROUNDED_PERCENT', + self::ACTIVE_VIEW_EVER_AUDIBLE_PERCENT => 'ACTIVE_VIEW_EVER_AUDIBLE_PERCENT', + self::ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT => 'ACTIVE_VIEW_EVER_BACKGROUNDED_PERCENT', + self::ACTIVE_VIEW_EVER_MUTED_PERCENT => 'ACTIVE_VIEW_EVER_MUTED_PERCENT', + self::ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION => 'ACTIVE_VIEW_IMPRESSIONS_AUDIBLE_AND_VISIBLIE_AT_COMPLETION', + self::ACTIVE_VIEW_MEASURABLE_IMPRESSIONS => 'ACTIVE_VIEW_MEASURABLE_IMPRESSIONS', + self::ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE => 'ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE', + self::ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS => 'ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS', + self::ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS => 'ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS', + self::ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION => 'ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION', + self::ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS => 'ACTIVE_VIEW_PERCENT_AUDIBLE_IMPRESSIONS', + self::ACTIVE_VIEW_PLUS_MEASURABLE_COUNT => 'ACTIVE_VIEW_PLUS_MEASURABLE_COUNT', + self::ACTIVE_VIEW_REVENUE => 'ACTIVE_VIEW_REVENUE', + self::ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION => 'ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION', + self::ACTIVE_VIEW_VIEWABLE_IMPRESSIONS => 'ACTIVE_VIEW_VIEWABLE_IMPRESSIONS', + self::ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION => 'ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION', + self::ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE => 'ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE', + self::ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME => 'ADSENSE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME', + self::ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS => 'ADSENSE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS', + self::ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS => 'ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS', + self::ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE => 'ADSENSE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE', + self::ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS => 'ADSENSE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS', + self::ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS => 'ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS', + self::ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION => 'ADSENSE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION', + self::ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION => 'ADSENSE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION', + self::ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS => 'ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS', + self::ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION => 'ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION', + self::ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE => 'ADSENSE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE', + self::ADSENSE_AVERAGE_ECPM => 'ADSENSE_AVERAGE_ECPM', + self::ADSENSE_CLICKS => 'ADSENSE_CLICKS', + self::ADSENSE_CTR => 'ADSENSE_CTR', + self::ADSENSE_IMPRESSIONS => 'ADSENSE_IMPRESSIONS', + self::ADSENSE_PERCENT_CLICKS => 'ADSENSE_PERCENT_CLICKS', + self::ADSENSE_PERCENT_IMPRESSIONS => 'ADSENSE_PERCENT_IMPRESSIONS', + self::ADSENSE_PERCENT_REVENUE => 'ADSENSE_PERCENT_REVENUE', + self::ADSENSE_PERCENT_REVENUE_WITHOUT_CPD => 'ADSENSE_PERCENT_REVENUE_WITHOUT_CPD', + self::ADSENSE_RESPONSES_SERVED => 'ADSENSE_RESPONSES_SERVED', + self::ADSENSE_REVENUE => 'ADSENSE_REVENUE', + self::AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME => 'AD_EXCHANGE_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME', + self::AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS => 'AD_EXCHANGE_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS', + self::AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS => 'AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS', + self::AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE => 'AD_EXCHANGE_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE', + self::AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS => 'AD_EXCHANGE_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS', + self::AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS => 'AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS', + self::AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION => 'AD_EXCHANGE_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION', + self::AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION => 'AD_EXCHANGE_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION', + self::AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS => 'AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS', + self::AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION => 'AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION', + self::AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE => 'AD_EXCHANGE_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE', + self::AD_EXCHANGE_AVERAGE_ECPM => 'AD_EXCHANGE_AVERAGE_ECPM', + self::AD_EXCHANGE_CLICKS => 'AD_EXCHANGE_CLICKS', + self::AD_EXCHANGE_CPC => 'AD_EXCHANGE_CPC', + self::AD_EXCHANGE_CTR => 'AD_EXCHANGE_CTR', + self::AD_EXCHANGE_DELIVERY_RATE => 'AD_EXCHANGE_DELIVERY_RATE', + self::AD_EXCHANGE_IMPRESSIONS => 'AD_EXCHANGE_IMPRESSIONS', + self::AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER => 'AD_EXCHANGE_IMPRESSIONS_PER_AD_VIEWER', + self::AD_EXCHANGE_IMPRESSIONS_PER_SESSION => 'AD_EXCHANGE_IMPRESSIONS_PER_SESSION', + self::AD_EXCHANGE_LIFT => 'AD_EXCHANGE_LIFT', + self::AD_EXCHANGE_MATCHED_REQUEST_CTR => 'AD_EXCHANGE_MATCHED_REQUEST_CTR', + self::AD_EXCHANGE_MATCHED_REQUEST_ECPM => 'AD_EXCHANGE_MATCHED_REQUEST_ECPM', + self::AD_EXCHANGE_MATCH_RATE => 'AD_EXCHANGE_MATCH_RATE', + self::AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS => 'AD_EXCHANGE_OPPORTUNITIES_FROM_ERRORS', + self::AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS => 'AD_EXCHANGE_OPPORTUNITIES_FROM_IMPRESSIONS', + self::AD_EXCHANGE_PERCENT_CLICKS => 'AD_EXCHANGE_PERCENT_CLICKS', + self::AD_EXCHANGE_PERCENT_IMPRESSIONS => 'AD_EXCHANGE_PERCENT_IMPRESSIONS', + self::AD_EXCHANGE_PERCENT_REVENUE => 'AD_EXCHANGE_PERCENT_REVENUE', + self::AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD => 'AD_EXCHANGE_PERCENT_REVENUE_WITHOUT_CPD', + self::AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM => 'AD_EXCHANGE_PLUS_YIELD_GROUP_ECPM', + self::AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS => 'AD_EXCHANGE_PLUS_YIELD_GROUP_IMPRESSIONS', + self::AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE => 'AD_EXCHANGE_PLUS_YIELD_GROUP_REVENUE', + self::AD_EXCHANGE_RESPONSES_SERVED => 'AD_EXCHANGE_RESPONSES_SERVED', + self::AD_EXCHANGE_REVENUE => 'AD_EXCHANGE_REVENUE', + self::AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT => 'AD_EXCHANGE_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT', + self::AD_EXCHANGE_REVENUE_PER_AD_VIEWER => 'AD_EXCHANGE_REVENUE_PER_AD_VIEWER', + self::AD_EXCHANGE_TOTAL_REQUESTS => 'AD_EXCHANGE_TOTAL_REQUESTS', + self::AD_EXCHANGE_TOTAL_REQUEST_CTR => 'AD_EXCHANGE_TOTAL_REQUEST_CTR', + self::AD_EXCHANGE_TOTAL_REQUEST_ECPM => 'AD_EXCHANGE_TOTAL_REQUEST_ECPM', + self::AD_EXPOSURE_SECONDS => 'AD_EXPOSURE_SECONDS', + self::AD_REQUESTS => 'AD_REQUESTS', + self::AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME => 'AD_SERVER_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME', + self::AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS => 'AD_SERVER_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS', + self::AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS => 'AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS', + self::AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE => 'AD_SERVER_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS_RATE', + self::AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS => 'AD_SERVER_ACTIVE_VIEW_NON_MEASURABLE_IMPRESSIONS', + self::AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS => 'AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS', + self::AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION => 'AD_SERVER_ACTIVE_VIEW_NON_VIEWABLE_IMPRESSIONS_DISTRIBUTION', + self::AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION => 'AD_SERVER_ACTIVE_VIEW_UNDETERMINED_IMPRESSIONS_DISTRIBUTION', + self::AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS => 'AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS', + self::AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION => 'AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_DISTRIBUTION', + self::AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE => 'AD_SERVER_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS_RATE', + self::AD_SERVER_AVERAGE_ECPM => 'AD_SERVER_AVERAGE_ECPM', + self::AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD => 'AD_SERVER_AVERAGE_ECPM_WITHOUT_CPD', + self::AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS => 'AD_SERVER_BEGIN_TO_RENDER_IMPRESSIONS', + self::AD_SERVER_CLICKS => 'AD_SERVER_CLICKS', + self::AD_SERVER_COMPLETED_VIEWS => 'AD_SERVER_COMPLETED_VIEWS', + self::AD_SERVER_COVIEWED_IMPRESSIONS => 'AD_SERVER_COVIEWED_IMPRESSIONS', + self::AD_SERVER_CPD_REVENUE => 'AD_SERVER_CPD_REVENUE', + self::AD_SERVER_CTR => 'AD_SERVER_CTR', + self::AD_SERVER_GROSS_REVENUE => 'AD_SERVER_GROSS_REVENUE', + self::AD_SERVER_GROSS_REVENUE_WITHOUT_CPD => 'AD_SERVER_GROSS_REVENUE_WITHOUT_CPD', + self::AD_SERVER_IMPRESSIONS => 'AD_SERVER_IMPRESSIONS', + self::AD_SERVER_IMPRESSIONS_WITH_COMPANION => 'AD_SERVER_IMPRESSIONS_WITH_COMPANION', + self::AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS => 'AD_SERVER_INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS', + self::AD_SERVER_PERCENT_CLICKS => 'AD_SERVER_PERCENT_CLICKS', + self::AD_SERVER_PERCENT_IMPRESSIONS => 'AD_SERVER_PERCENT_IMPRESSIONS', + self::AD_SERVER_PERCENT_REVENUE => 'AD_SERVER_PERCENT_REVENUE', + self::AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD => 'AD_SERVER_PERCENT_REVENUE_WITHOUT_CPD', + self::AD_SERVER_RESPONSES_SERVED => 'AD_SERVER_RESPONSES_SERVED', + self::AD_SERVER_REVENUE => 'AD_SERVER_REVENUE', + self::AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT => 'AD_SERVER_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT', + self::AD_SERVER_REVENUE_WITHOUT_CPD => 'AD_SERVER_REVENUE_WITHOUT_CPD', + self::AD_SERVER_TARGETED_CLICKS => 'AD_SERVER_TARGETED_CLICKS', + self::AD_SERVER_TARGETED_IMPRESSIONS => 'AD_SERVER_TARGETED_IMPRESSIONS', + self::AD_SERVER_TRACKED_ADS => 'AD_SERVER_TRACKED_ADS', + self::AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS => 'AD_SERVER_UNFILTERED_BEGIN_TO_RENDER_IMPRESSIONS', + self::AD_SERVER_UNFILTERED_CLICKS => 'AD_SERVER_UNFILTERED_CLICKS', + self::AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS => 'AD_SERVER_UNFILTERED_DOWNLOADED_IMPRESSIONS', + self::AD_SERVER_UNFILTERED_IMPRESSIONS => 'AD_SERVER_UNFILTERED_IMPRESSIONS', + self::AD_SERVER_UNFILTERED_TRACKED_ADS => 'AD_SERVER_UNFILTERED_TRACKED_ADS', + self::AD_UNIT_EXPOSURE_SECONDS => 'AD_UNIT_EXPOSURE_SECONDS', + self::AD_VIEWERS => 'AD_VIEWERS', + self::ATN_ADS_FAILED_TO_RENDER => 'ATN_ADS_FAILED_TO_RENDER', + self::ATN_ELIGIBLE_LINE_ITEMS => 'ATN_ELIGIBLE_LINE_ITEMS', + self::ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS => 'ATN_ELIGIBLE_LINE_ITEMS_AD_REQUESTS', + self::ATN_HBT_ALLOWED_AD_REQUESTS => 'ATN_HBT_ALLOWED_AD_REQUESTS', + self::ATN_HBT_BIDS_IN_AUCTION => 'ATN_HBT_BIDS_IN_AUCTION', + self::ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS => 'ATN_HBT_BIDS_IN_AUCTION_AD_REQUESTS', + self::ATN_HBT_CANDIDATE_BIDS => 'ATN_HBT_CANDIDATE_BIDS', + self::ATN_HBT_INVALID_AD_REQUESTS => 'ATN_HBT_INVALID_AD_REQUESTS', + self::ATN_HBT_NO_BIDS_AD_REQUESTS => 'ATN_HBT_NO_BIDS_AD_REQUESTS', + self::ATN_HBT_REJECTED_BIDS => 'ATN_HBT_REJECTED_BIDS', + self::ATN_HBT_VALID_AD_REQUESTS => 'ATN_HBT_VALID_AD_REQUESTS', + self::ATN_HBT_WITH_BIDS_AD_REQUESTS => 'ATN_HBT_WITH_BIDS_AD_REQUESTS', + self::ATN_INVALID_AD_REQUESTS => 'ATN_INVALID_AD_REQUESTS', + self::ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED => 'ATN_LINE_ITEMS_CREATIVE_NOT_RETRIEVED', + self::ATN_LINE_ITEMS_IN_AUCTION => 'ATN_LINE_ITEMS_IN_AUCTION', + self::ATN_LINE_ITEMS_NOT_COMPETING => 'ATN_LINE_ITEMS_NOT_COMPETING', + self::ATN_LINE_ITEMS_NOT_SELECTED => 'ATN_LINE_ITEMS_NOT_SELECTED', + self::ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS => 'ATN_LINE_ITEM_IN_AUCTION_AD_REQUESTS', + self::ATN_LINE_ITEM_TARGETED_AD_REQUESTS => 'ATN_LINE_ITEM_TARGETED_AD_REQUESTS', + self::ATN_MEDIATION_ALLOWED_AD_REQUESTS => 'ATN_MEDIATION_ALLOWED_AD_REQUESTS', + self::ATN_MEDIATION_INVALID_AD_REQUESTS => 'ATN_MEDIATION_INVALID_AD_REQUESTS', + self::ATN_MEDIATION_LOADED_ADS_FROM_CHAINS => 'ATN_MEDIATION_LOADED_ADS_FROM_CHAINS', + self::ATN_MEDIATION_NO_PARTNER_AD_REQUESTS => 'ATN_MEDIATION_NO_PARTNER_AD_REQUESTS', + self::ATN_MEDIATION_PARTNERS_IN_AUCTION => 'ATN_MEDIATION_PARTNERS_IN_AUCTION', + self::ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS => 'ATN_MEDIATION_PARTNERS_IN_AUCTION_AD_REQUESTS', + self::ATN_MEDIATION_REJECTED_PARTNERS => 'ATN_MEDIATION_REJECTED_PARTNERS', + self::ATN_MEDIATION_TARGETED_PARTNERS => 'ATN_MEDIATION_TARGETED_PARTNERS', + self::ATN_MEDIATION_TOTAL_YIELD_PARTNERS => 'ATN_MEDIATION_TOTAL_YIELD_PARTNERS', + self::ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS => 'ATN_MEDIATION_UNLOADED_ADS_FROM_CHAINS', + self::ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS => 'ATN_MEDIATION_UNUSED_BIDS_OR_PARTNERS', + self::ATN_MEDIATION_VALID_AD_REQUESTS => 'ATN_MEDIATION_VALID_AD_REQUESTS', + self::ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS => 'ATN_MEDIATION_WITH_PARTNERS_AD_REQUESTS', + self::ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS => 'ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BIDS', + self::ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT => 'ATN_PROGRAMMATIC_AD_REQUESTS_WITH_BID_REQUESTS_SENT', + self::ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS => 'ATN_PROGRAMMATIC_ALLOWED_AD_REQUESTS', + self::ATN_PROGRAMMATIC_BIDS_IN_AUCTION => 'ATN_PROGRAMMATIC_BIDS_IN_AUCTION', + self::ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS => 'ATN_PROGRAMMATIC_BID_IN_AUCTION_AD_REQUESTS', + self::ATN_PROGRAMMATIC_BID_REQUESTS_SENT => 'ATN_PROGRAMMATIC_BID_REQUESTS_SENT', + self::ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE => 'ATN_PROGRAMMATIC_BID_REQUESTS_WITH_RESPONSE', + self::ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES => 'ATN_PROGRAMMATIC_BID_REQUEST_CANDIDATES', + self::ATN_PROGRAMMATIC_BID_REQUEST_ERRORS => 'ATN_PROGRAMMATIC_BID_REQUEST_ERRORS', + self::ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS => 'ATN_PROGRAMMATIC_INELIGIBLE_AD_REQUESTS', + self::ATN_PROGRAMMATIC_REJECTED_BIDS => 'ATN_PROGRAMMATIC_REJECTED_BIDS', + self::ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS => 'ATN_PROGRAMMATIC_SKIPPED_BID_REQUESTS', + self::ATN_PROGRAMMATIC_TOTAL_BIDS => 'ATN_PROGRAMMATIC_TOTAL_BIDS', + self::ATN_PROGRAMMATIC_VALID_AD_REQUESTS => 'ATN_PROGRAMMATIC_VALID_AD_REQUESTS', + self::ATN_REJECTED_LINE_ITEMS => 'ATN_REJECTED_LINE_ITEMS', + self::ATN_SERVED_MEDIATION_CHAINS => 'ATN_SERVED_MEDIATION_CHAINS', + self::ATN_SERVED_SINGLE_ADS => 'ATN_SERVED_SINGLE_ADS', + self::ATN_TARGETED_LINE_ITEMS => 'ATN_TARGETED_LINE_ITEMS', + self::ATN_TOTAL_AD_REQUESTS => 'ATN_TOTAL_AD_REQUESTS', + self::ATN_TOTAL_COMPETING_ADS_IN_AUCTION => 'ATN_TOTAL_COMPETING_ADS_IN_AUCTION', + self::ATN_TOTAL_LOADED_ADS => 'ATN_TOTAL_LOADED_ADS', + self::ATN_VALID_AD_REQUESTS => 'ATN_VALID_AD_REQUESTS', + self::ATN_YIELD_GROUP_MEDIATION_PASSBACKS => 'ATN_YIELD_GROUP_MEDIATION_PASSBACKS', + self::AVERAGE_ECPM => 'AVERAGE_ECPM', + self::AVERAGE_ECPM_WITHOUT_CPD => 'AVERAGE_ECPM_WITHOUT_CPD', + self::AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION => 'AVERAGE_ENGAGEMENT_SECONDS_PER_SESSION', + self::AVERAGE_ENGAGEMENT_SECONDS_PER_USER => 'AVERAGE_ENGAGEMENT_SECONDS_PER_USER', + self::AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR => 'AVERAGE_IMPRESSIONS_PER_UNIQUE_VISITOR', + self::AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER => 'AVERAGE_PURCHASE_REVENUE_PER_PAYING_USER', + self::AVERAGE_REVENUE_PER_USER => 'AVERAGE_REVENUE_PER_USER', + self::AVERAGE_SESSION_SECONDS => 'AVERAGE_SESSION_SECONDS', + self::BIDS => 'BIDS', + self::BID_AVERAGE_CPM => 'BID_AVERAGE_CPM', + self::BOUNCE_RATE => 'BOUNCE_RATE', + self::CLICKS => 'CLICKS', + self::CODE_SERVED_COUNT => 'CODE_SERVED_COUNT', + self::CPC_REVENUE => 'CPC_REVENUE', + self::CPM_REVENUE => 'CPM_REVENUE', + self::CREATIVE_LOAD_TIME_0_500_PERCENT => 'CREATIVE_LOAD_TIME_0_500_PERCENT', + self::CREATIVE_LOAD_TIME_1000_2000_PERCENT => 'CREATIVE_LOAD_TIME_1000_2000_PERCENT', + self::CREATIVE_LOAD_TIME_2000_4000_PERCENT => 'CREATIVE_LOAD_TIME_2000_4000_PERCENT', + self::CREATIVE_LOAD_TIME_4000_8000_PERCENT => 'CREATIVE_LOAD_TIME_4000_8000_PERCENT', + self::CREATIVE_LOAD_TIME_500_1000_PERCENT => 'CREATIVE_LOAD_TIME_500_1000_PERCENT', + self::CREATIVE_LOAD_TIME_GT_8000_PERCENT => 'CREATIVE_LOAD_TIME_GT_8000_PERCENT', + self::CTR => 'CTR', + self::DEALS_BIDS => 'DEALS_BIDS', + self::DEALS_BID_RATE => 'DEALS_BID_RATE', + self::DEALS_BID_REQUESTS => 'DEALS_BID_REQUESTS', + self::DEALS_WINNING_BIDS => 'DEALS_WINNING_BIDS', + self::DEALS_WIN_RATE => 'DEALS_WIN_RATE', + self::DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT => 'DOM_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT', + self::DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT => 'DOM_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT', + self::DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT => 'DOM_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT', + self::DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT => 'DOM_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT', + self::DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT => 'DOM_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT', + self::DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT => 'DOM_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT', + self::DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT => 'DOM_LOAD_TO_TAG_LOAD_TIME_0_500_PERCENT', + self::DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT => 'DOM_LOAD_TO_TAG_LOAD_TIME_1000_2000_PERCENT', + self::DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT => 'DOM_LOAD_TO_TAG_LOAD_TIME_2000_4000_PERCENT', + self::DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT => 'DOM_LOAD_TO_TAG_LOAD_TIME_4000_8000_PERCENT', + self::DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT => 'DOM_LOAD_TO_TAG_LOAD_TIME_500_1000_PERCENT', + self::DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT => 'DOM_LOAD_TO_TAG_LOAD_TIME_GT_8000_PERCENT', + self::DROPOFF_RATE => 'DROPOFF_RATE', + self::ENGAGED_SESSIONS => 'ENGAGED_SESSIONS', + self::ENGAGED_SESSIONS_PER_USER => 'ENGAGED_SESSIONS_PER_USER', + self::ENGAGEMENT_RATE => 'ENGAGEMENT_RATE', + self::EUROPEAN_REGULATIONS_CONSENT_RATE => 'EUROPEAN_REGULATIONS_CONSENT_RATE', + self::EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE => 'EUROPEAN_REGULATIONS_CUSTOM_CONSENT_RATE', + self::EUROPEAN_REGULATIONS_MESSAGES_SHOWN => 'EUROPEAN_REGULATIONS_MESSAGES_SHOWN', + self::EUROPEAN_REGULATIONS_NO_CONSENT_RATE => 'EUROPEAN_REGULATIONS_NO_CONSENT_RATE', + self::FILL_RATE => 'FILL_RATE', + self::GOOGLE_ANALYTICS_CLICKS => 'GOOGLE_ANALYTICS_CLICKS', + self::GOOGLE_ANALYTICS_CTR => 'GOOGLE_ANALYTICS_CTR', + self::GOOGLE_ANALYTICS_ECPM => 'GOOGLE_ANALYTICS_ECPM', + self::GOOGLE_ANALYTICS_IMPRESSIONS => 'GOOGLE_ANALYTICS_IMPRESSIONS', + self::GOOGLE_ANALYTICS_REVENUE => 'GOOGLE_ANALYTICS_REVENUE', + self::GOOGLE_ANALYTICS_VIEWS => 'GOOGLE_ANALYTICS_VIEWS', + self::GOOGLE_ANALYTICS_VIEWS_PER_USER => 'GOOGLE_ANALYTICS_VIEWS_PER_USER', + self::GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS => 'GOOGLE_SOLD_AUCTION_COVIEWED_IMPRESSIONS', + self::GOOGLE_SOLD_AUCTION_IMPRESSIONS => 'GOOGLE_SOLD_AUCTION_IMPRESSIONS', + self::GOOGLE_SOLD_COVIEWED_IMPRESSIONS => 'GOOGLE_SOLD_COVIEWED_IMPRESSIONS', + self::GOOGLE_SOLD_IMPRESSIONS => 'GOOGLE_SOLD_IMPRESSIONS', + self::GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS => 'GOOGLE_SOLD_RESERVATION_COVIEWED_IMPRESSIONS', + self::GOOGLE_SOLD_RESERVATION_IMPRESSIONS => 'GOOGLE_SOLD_RESERVATION_IMPRESSIONS', + self::IMPRESSIONS => 'IMPRESSIONS', + self::INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS => 'INACTIVE_BEGIN_TO_RENDER_IMPRESSIONS', + self::INVENTORY_SHARES => 'INVENTORY_SHARES', + self::INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES => 'INVENTORY_SHARE_PARTNER_UNFILLED_OPPORTUNITIES', + self::INVOICED_IMPRESSIONS => 'INVOICED_IMPRESSIONS', + self::INVOICED_UNFILLED_IMPRESSIONS => 'INVOICED_UNFILLED_IMPRESSIONS', + self::MEDIATION_CHAINS_FILLED => 'MEDIATION_CHAINS_FILLED', + self::MUTED_IMPRESSIONS => 'MUTED_IMPRESSIONS', + self::MUTE_ELIGIBLE_IMPRESSIONS => 'MUTE_ELIGIBLE_IMPRESSIONS', + self::OPPORTUNITIES => 'OPPORTUNITIES', + self::OVERDELIVERED_IMPRESSIONS => 'OVERDELIVERED_IMPRESSIONS', + self::PARTNER_SALES_FILLED_POD_REQUESTS => 'PARTNER_SALES_FILLED_POD_REQUESTS', + self::PARTNER_SALES_FILL_RATE => 'PARTNER_SALES_FILL_RATE', + self::PARTNER_SALES_PARTNER_MATCH_RATE => 'PARTNER_SALES_PARTNER_MATCH_RATE', + self::PARTNER_SALES_QUERIES => 'PARTNER_SALES_QUERIES', + self::PARTNER_SALES_UNFILLED_IMPRESSIONS => 'PARTNER_SALES_UNFILLED_IMPRESSIONS', + self::PARTNER_SALES_UNMATCHED_QUERIES => 'PARTNER_SALES_UNMATCHED_QUERIES', + self::PARTNER_SOLD_CODE_SERVED => 'PARTNER_SOLD_CODE_SERVED', + self::PARTNER_SOLD_COVIEWED_IMPRESSIONS => 'PARTNER_SOLD_COVIEWED_IMPRESSIONS', + self::PARTNER_SOLD_IMPRESSIONS => 'PARTNER_SOLD_IMPRESSIONS', + self::PROGRAMMATIC_ELIGIBLE_AD_REQUESTS => 'PROGRAMMATIC_ELIGIBLE_AD_REQUESTS', + self::PROGRAMMATIC_MATCH_RATE => 'PROGRAMMATIC_MATCH_RATE', + self::PROGRAMMATIC_RESPONSES_SERVED => 'PROGRAMMATIC_RESPONSES_SERVED', + self::REACH_IMPRESSIONS => 'REACH_IMPRESSIONS', + self::RESPONSES_SERVED => 'RESPONSES_SERVED', + self::RETENTION => 'RETENTION', + self::REVENUE => 'REVENUE', + self::REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT => 'REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT', + self::REVENUE_WITHOUT_CPD => 'REVENUE_WITHOUT_CPD', + self::REWARDS_GRANTED => 'REWARDS_GRANTED', + self::RICH_MEDIA_AVERAGE_DISPLAY_TIME => 'RICH_MEDIA_AVERAGE_DISPLAY_TIME', + self::RICH_MEDIA_AVERAGE_INTERACTION_TIME => 'RICH_MEDIA_AVERAGE_INTERACTION_TIME', + self::RICH_MEDIA_BACKUP_IMAGES => 'RICH_MEDIA_BACKUP_IMAGES', + self::RICH_MEDIA_CUSTOM_EVENT_COUNT => 'RICH_MEDIA_CUSTOM_EVENT_COUNT', + self::RICH_MEDIA_CUSTOM_EVENT_TIME => 'RICH_MEDIA_CUSTOM_EVENT_TIME', + self::RICH_MEDIA_DISPLAY_TIME => 'RICH_MEDIA_DISPLAY_TIME', + self::RICH_MEDIA_EXPANDING_TIME => 'RICH_MEDIA_EXPANDING_TIME', + self::RICH_MEDIA_EXPANSIONS => 'RICH_MEDIA_EXPANSIONS', + self::RICH_MEDIA_FULL_SCREEN_IMPRESSIONS => 'RICH_MEDIA_FULL_SCREEN_IMPRESSIONS', + self::RICH_MEDIA_INTERACTION_COUNT => 'RICH_MEDIA_INTERACTION_COUNT', + self::RICH_MEDIA_INTERACTION_RATE => 'RICH_MEDIA_INTERACTION_RATE', + self::RICH_MEDIA_INTERACTION_TIME => 'RICH_MEDIA_INTERACTION_TIME', + self::RICH_MEDIA_INTERACTIVE_IMPRESSIONS => 'RICH_MEDIA_INTERACTIVE_IMPRESSIONS', + self::RICH_MEDIA_MANUAL_CLOSES => 'RICH_MEDIA_MANUAL_CLOSES', + self::RICH_MEDIA_VIDEO_COMPLETES => 'RICH_MEDIA_VIDEO_COMPLETES', + self::RICH_MEDIA_VIDEO_INTERACTIONS => 'RICH_MEDIA_VIDEO_INTERACTIONS', + self::RICH_MEDIA_VIDEO_INTERACTION_RATE => 'RICH_MEDIA_VIDEO_INTERACTION_RATE', + self::RICH_MEDIA_VIDEO_MIDPOINTS => 'RICH_MEDIA_VIDEO_MIDPOINTS', + self::RICH_MEDIA_VIDEO_MUTES => 'RICH_MEDIA_VIDEO_MUTES', + self::RICH_MEDIA_VIDEO_PAUSES => 'RICH_MEDIA_VIDEO_PAUSES', + self::RICH_MEDIA_VIDEO_PLAYS => 'RICH_MEDIA_VIDEO_PLAYS', + self::RICH_MEDIA_VIDEO_REPLAYS => 'RICH_MEDIA_VIDEO_REPLAYS', + self::RICH_MEDIA_VIDEO_STOPS => 'RICH_MEDIA_VIDEO_STOPS', + self::RICH_MEDIA_VIDEO_UNMUTES => 'RICH_MEDIA_VIDEO_UNMUTES', + self::RICH_MEDIA_VIDEO_VIEW_RATE => 'RICH_MEDIA_VIDEO_VIEW_RATE', + self::RICH_MEDIA_VIDEO_VIEW_TIME => 'RICH_MEDIA_VIDEO_VIEW_TIME', + self::SELL_THROUGH_AVAILABLE_IMPRESSIONS => 'SELL_THROUGH_AVAILABLE_IMPRESSIONS', + self::SELL_THROUGH_FORECASTED_IMPRESSIONS => 'SELL_THROUGH_FORECASTED_IMPRESSIONS', + self::SELL_THROUGH_RESERVED_IMPRESSIONS => 'SELL_THROUGH_RESERVED_IMPRESSIONS', + self::SELL_THROUGH_SELL_THROUGH_RATE => 'SELL_THROUGH_SELL_THROUGH_RATE', + self::SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS => 'SERVER_SIDE_UNWRAPPING_AVERAGE_LATENCY_MS', + self::SERVER_SIDE_UNWRAPPING_CALLOUTS => 'SERVER_SIDE_UNWRAPPING_CALLOUTS', + self::SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES => 'SERVER_SIDE_UNWRAPPING_EMPTY_RESPONSES', + self::SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES => 'SERVER_SIDE_UNWRAPPING_ERROR_RESPONSES', + self::SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES => 'SERVER_SIDE_UNWRAPPING_SUCCESSFUL_RESPONSES', + self::SERVER_SIDE_UNWRAPPING_TIMEOUTS => 'SERVER_SIDE_UNWRAPPING_TIMEOUTS', + self::SESSIONS => 'SESSIONS', + self::TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT => 'TAG_LOAD_TO_FIRST_AD_REQUEST_0_500_PERCENT', + self::TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT => 'TAG_LOAD_TO_FIRST_AD_REQUEST_1000_2000_PERCENT', + self::TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT => 'TAG_LOAD_TO_FIRST_AD_REQUEST_2000_4000_PERCENT', + self::TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT => 'TAG_LOAD_TO_FIRST_AD_REQUEST_4000_8000_PERCENT', + self::TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT => 'TAG_LOAD_TO_FIRST_AD_REQUEST_500_1000_PERCENT', + self::TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT => 'TAG_LOAD_TO_FIRST_AD_REQUEST_GT_8000_PERCENT', + self::TARGETED_CLICKS => 'TARGETED_CLICKS', + self::TARGETED_IMPRESSIONS => 'TARGETED_IMPRESSIONS', + self::UNFILLED_IMPRESSIONS => 'UNFILLED_IMPRESSIONS', + self::UNIQUE_VISITORS => 'UNIQUE_VISITORS', + self::UNLOADED_IMPRESSIONS_DUE_TO_CPU => 'UNLOADED_IMPRESSIONS_DUE_TO_CPU', + self::UNLOADED_IMPRESSIONS_DUE_TO_NETWORK => 'UNLOADED_IMPRESSIONS_DUE_TO_NETWORK', + self::UNMATCHED_AD_REQUESTS => 'UNMATCHED_AD_REQUESTS', + self::UNVIEWED_REASON_OTHER_PERCENT => 'UNVIEWED_REASON_OTHER_PERCENT', + self::UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT => 'UNVIEWED_REASON_SLOT_NEVER_ENTERED_VIEWPORT_PERCENT', + self::UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT => 'UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_FILLED_PERCENT', + self::UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT => 'UNVIEWED_REASON_USER_SCROLLED_BEFORE_AD_LOADED_PERCENT', + self::UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT => 'UNVIEWED_REASON_USER_SCROLLED_BEFORE_ONE_SECOND_PERCENT', + self::USER_ENGAGEMENT_DURATION_IN_SECONDS => 'USER_ENGAGEMENT_DURATION_IN_SECONDS', + self::USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE => 'USER_MESSAGES_AD_BLOCKING_EXTENSION_RATE', + self::USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT => 'USER_MESSAGES_AD_BLOCKING_RECOVERY_ALLOWLISTED_COUNT', + self::USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN => 'USER_MESSAGES_AD_BLOCKING_RECOVERY_MESSAGES_SHOWN', + self::USER_MESSAGES_ALLOW_ADS_PAGEVIEWS => 'USER_MESSAGES_ALLOW_ADS_PAGEVIEWS', + self::USER_MESSAGES_CCPA_MESSAGES_SHOWN => 'USER_MESSAGES_CCPA_MESSAGES_SHOWN', + self::USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN => 'USER_MESSAGES_IDFA_ATT_ALERTS_SHOWN', + self::USER_MESSAGES_IDFA_ATT_CONSENT => 'USER_MESSAGES_IDFA_ATT_CONSENT', + self::USER_MESSAGES_IDFA_ATT_CONSENT_RATE => 'USER_MESSAGES_IDFA_ATT_CONSENT_RATE', + self::USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT => 'USER_MESSAGES_IDFA_ATT_DECLINE_CONSENT', + self::USER_MESSAGES_IDFA_ATT_DECLINE_RATE => 'USER_MESSAGES_IDFA_ATT_DECLINE_RATE', + self::USER_MESSAGES_IDFA_EXPLAINERS_SHOWN => 'USER_MESSAGES_IDFA_EXPLAINERS_SHOWN', + self::USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN => 'USER_MESSAGES_IDFA_IAB_MESSAGES_SHOWN', + self::USER_MESSAGES_IDFA_NO_DECISION => 'USER_MESSAGES_IDFA_NO_DECISION', + self::USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN => 'USER_MESSAGES_OFFERWALL_MESSAGES_SHOWN', + self::USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS => 'USER_MESSAGES_OFFERWALL_SUCCESSFUL_ENGAGEMENTS', + self::USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS => 'USER_MESSAGES_POST_OFFERWALL_PAGEVIEWS', + self::USER_MESSAGES_TOTAL_ESTIMATED_REVENUE => 'USER_MESSAGES_TOTAL_ESTIMATED_REVENUE', + self::USER_MESSAGES_UPTC_MESSAGES_SHOWN => 'USER_MESSAGES_UPTC_MESSAGES_SHOWN', + self::USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO => 'USER_MESSAGES_UPTC_PERSONALIZATION_OPT_OUT_RATIO', + self::VIDEO_ERROR_100_COUNT => 'VIDEO_ERROR_100_COUNT', + self::VIDEO_ERROR_101_COUNT => 'VIDEO_ERROR_101_COUNT', + self::VIDEO_ERROR_102_COUNT => 'VIDEO_ERROR_102_COUNT', + self::VIDEO_ERROR_200_COUNT => 'VIDEO_ERROR_200_COUNT', + self::VIDEO_ERROR_201_COUNT => 'VIDEO_ERROR_201_COUNT', + self::VIDEO_ERROR_202_COUNT => 'VIDEO_ERROR_202_COUNT', + self::VIDEO_ERROR_203_COUNT => 'VIDEO_ERROR_203_COUNT', + self::VIDEO_ERROR_300_COUNT => 'VIDEO_ERROR_300_COUNT', + self::VIDEO_ERROR_301_COUNT => 'VIDEO_ERROR_301_COUNT', + self::VIDEO_ERROR_302_COUNT => 'VIDEO_ERROR_302_COUNT', + self::VIDEO_ERROR_303_COUNT => 'VIDEO_ERROR_303_COUNT', + self::VIDEO_ERROR_400_COUNT => 'VIDEO_ERROR_400_COUNT', + self::VIDEO_ERROR_401_COUNT => 'VIDEO_ERROR_401_COUNT', + self::VIDEO_ERROR_402_COUNT => 'VIDEO_ERROR_402_COUNT', + self::VIDEO_ERROR_403_COUNT => 'VIDEO_ERROR_403_COUNT', + self::VIDEO_ERROR_405_COUNT => 'VIDEO_ERROR_405_COUNT', + self::VIDEO_ERROR_406_COUNT => 'VIDEO_ERROR_406_COUNT', + self::VIDEO_ERROR_407_COUNT => 'VIDEO_ERROR_407_COUNT', + self::VIDEO_ERROR_408_COUNT => 'VIDEO_ERROR_408_COUNT', + self::VIDEO_ERROR_409_COUNT => 'VIDEO_ERROR_409_COUNT', + self::VIDEO_ERROR_410_COUNT => 'VIDEO_ERROR_410_COUNT', + self::VIDEO_ERROR_500_COUNT => 'VIDEO_ERROR_500_COUNT', + self::VIDEO_ERROR_501_COUNT => 'VIDEO_ERROR_501_COUNT', + self::VIDEO_ERROR_502_COUNT => 'VIDEO_ERROR_502_COUNT', + self::VIDEO_ERROR_503_COUNT => 'VIDEO_ERROR_503_COUNT', + self::VIDEO_ERROR_600_COUNT => 'VIDEO_ERROR_600_COUNT', + self::VIDEO_ERROR_601_COUNT => 'VIDEO_ERROR_601_COUNT', + self::VIDEO_ERROR_602_COUNT => 'VIDEO_ERROR_602_COUNT', + self::VIDEO_ERROR_603_COUNT => 'VIDEO_ERROR_603_COUNT', + self::VIDEO_ERROR_604_COUNT => 'VIDEO_ERROR_604_COUNT', + self::VIDEO_ERROR_900_COUNT => 'VIDEO_ERROR_900_COUNT', + self::VIDEO_ERROR_901_COUNT => 'VIDEO_ERROR_901_COUNT', + self::VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE => 'VIDEO_INTERACTION_AVERAGE_INTERACTION_RATE', + self::VIDEO_INTERACTION_COLLAPSES => 'VIDEO_INTERACTION_COLLAPSES', + self::VIDEO_INTERACTION_EXPANDS => 'VIDEO_INTERACTION_EXPANDS', + self::VIDEO_INTERACTION_FULL_SCREENS => 'VIDEO_INTERACTION_FULL_SCREENS', + self::VIDEO_INTERACTION_MUTES => 'VIDEO_INTERACTION_MUTES', + self::VIDEO_INTERACTION_PAUSES => 'VIDEO_INTERACTION_PAUSES', + self::VIDEO_INTERACTION_RESUMES => 'VIDEO_INTERACTION_RESUMES', + self::VIDEO_INTERACTION_REWINDS => 'VIDEO_INTERACTION_REWINDS', + self::VIDEO_INTERACTION_UNMUTES => 'VIDEO_INTERACTION_UNMUTES', + self::VIDEO_INTERACTION_VIDEO_SKIPS => 'VIDEO_INTERACTION_VIDEO_SKIPS', + self::VIDEO_MONETIZABLE_CONTENT_VIEWS => 'VIDEO_MONETIZABLE_CONTENT_VIEWS', + self::VIDEO_REAL_TIME_CREATIVE_SERVES => 'VIDEO_REAL_TIME_CREATIVE_SERVES', + self::VIDEO_REAL_TIME_ERROR_100_COUNT => 'VIDEO_REAL_TIME_ERROR_100_COUNT', + self::VIDEO_REAL_TIME_ERROR_101_COUNT => 'VIDEO_REAL_TIME_ERROR_101_COUNT', + self::VIDEO_REAL_TIME_ERROR_102_COUNT => 'VIDEO_REAL_TIME_ERROR_102_COUNT', + self::VIDEO_REAL_TIME_ERROR_200_COUNT => 'VIDEO_REAL_TIME_ERROR_200_COUNT', + self::VIDEO_REAL_TIME_ERROR_201_COUNT => 'VIDEO_REAL_TIME_ERROR_201_COUNT', + self::VIDEO_REAL_TIME_ERROR_202_COUNT => 'VIDEO_REAL_TIME_ERROR_202_COUNT', + self::VIDEO_REAL_TIME_ERROR_203_COUNT => 'VIDEO_REAL_TIME_ERROR_203_COUNT', + self::VIDEO_REAL_TIME_ERROR_300_COUNT => 'VIDEO_REAL_TIME_ERROR_300_COUNT', + self::VIDEO_REAL_TIME_ERROR_301_COUNT => 'VIDEO_REAL_TIME_ERROR_301_COUNT', + self::VIDEO_REAL_TIME_ERROR_302_COUNT => 'VIDEO_REAL_TIME_ERROR_302_COUNT', + self::VIDEO_REAL_TIME_ERROR_303_COUNT => 'VIDEO_REAL_TIME_ERROR_303_COUNT', + self::VIDEO_REAL_TIME_ERROR_400_COUNT => 'VIDEO_REAL_TIME_ERROR_400_COUNT', + self::VIDEO_REAL_TIME_ERROR_401_COUNT => 'VIDEO_REAL_TIME_ERROR_401_COUNT', + self::VIDEO_REAL_TIME_ERROR_402_COUNT => 'VIDEO_REAL_TIME_ERROR_402_COUNT', + self::VIDEO_REAL_TIME_ERROR_403_COUNT => 'VIDEO_REAL_TIME_ERROR_403_COUNT', + self::VIDEO_REAL_TIME_ERROR_405_COUNT => 'VIDEO_REAL_TIME_ERROR_405_COUNT', + self::VIDEO_REAL_TIME_ERROR_406_COUNT => 'VIDEO_REAL_TIME_ERROR_406_COUNT', + self::VIDEO_REAL_TIME_ERROR_407_COUNT => 'VIDEO_REAL_TIME_ERROR_407_COUNT', + self::VIDEO_REAL_TIME_ERROR_408_COUNT => 'VIDEO_REAL_TIME_ERROR_408_COUNT', + self::VIDEO_REAL_TIME_ERROR_409_COUNT => 'VIDEO_REAL_TIME_ERROR_409_COUNT', + self::VIDEO_REAL_TIME_ERROR_410_COUNT => 'VIDEO_REAL_TIME_ERROR_410_COUNT', + self::VIDEO_REAL_TIME_ERROR_500_COUNT => 'VIDEO_REAL_TIME_ERROR_500_COUNT', + self::VIDEO_REAL_TIME_ERROR_501_COUNT => 'VIDEO_REAL_TIME_ERROR_501_COUNT', + self::VIDEO_REAL_TIME_ERROR_502_COUNT => 'VIDEO_REAL_TIME_ERROR_502_COUNT', + self::VIDEO_REAL_TIME_ERROR_503_COUNT => 'VIDEO_REAL_TIME_ERROR_503_COUNT', + self::VIDEO_REAL_TIME_ERROR_600_COUNT => 'VIDEO_REAL_TIME_ERROR_600_COUNT', + self::VIDEO_REAL_TIME_ERROR_601_COUNT => 'VIDEO_REAL_TIME_ERROR_601_COUNT', + self::VIDEO_REAL_TIME_ERROR_602_COUNT => 'VIDEO_REAL_TIME_ERROR_602_COUNT', + self::VIDEO_REAL_TIME_ERROR_603_COUNT => 'VIDEO_REAL_TIME_ERROR_603_COUNT', + self::VIDEO_REAL_TIME_ERROR_604_COUNT => 'VIDEO_REAL_TIME_ERROR_604_COUNT', + self::VIDEO_REAL_TIME_ERROR_900_COUNT => 'VIDEO_REAL_TIME_ERROR_900_COUNT', + self::VIDEO_REAL_TIME_ERROR_901_COUNT => 'VIDEO_REAL_TIME_ERROR_901_COUNT', + self::VIDEO_REAL_TIME_IMPRESSIONS => 'VIDEO_REAL_TIME_IMPRESSIONS', + self::VIDEO_REAL_TIME_MATCHED_QUERIES => 'VIDEO_REAL_TIME_MATCHED_QUERIES', + self::VIDEO_REAL_TIME_TOTAL_ERROR_COUNT => 'VIDEO_REAL_TIME_TOTAL_ERROR_COUNT', + self::VIDEO_REAL_TIME_TOTAL_QUERIES => 'VIDEO_REAL_TIME_TOTAL_QUERIES', + self::VIDEO_REAL_TIME_UNMATCHED_QUERIES => 'VIDEO_REAL_TIME_UNMATCHED_QUERIES', + self::VIDEO_VIEWERSHIP_AUTO_PLAYS => 'VIDEO_VIEWERSHIP_AUTO_PLAYS', + self::VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE => 'VIDEO_VIEWERSHIP_AVERAGE_VIEW_RATE', + self::VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME => 'VIDEO_VIEWERSHIP_AVERAGE_VIEW_TIME', + self::VIDEO_VIEWERSHIP_CLICK_TO_PLAYS => 'VIDEO_VIEWERSHIP_CLICK_TO_PLAYS', + self::VIDEO_VIEWERSHIP_COMPLETES => 'VIDEO_VIEWERSHIP_COMPLETES', + self::VIDEO_VIEWERSHIP_COMPLETION_RATE => 'VIDEO_VIEWERSHIP_COMPLETION_RATE', + self::VIDEO_VIEWERSHIP_ENGAGED_VIEWS => 'VIDEO_VIEWERSHIP_ENGAGED_VIEWS', + self::VIDEO_VIEWERSHIP_FIRST_QUARTILES => 'VIDEO_VIEWERSHIP_FIRST_QUARTILES', + self::VIDEO_VIEWERSHIP_MIDPOINTS => 'VIDEO_VIEWERSHIP_MIDPOINTS', + self::VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN => 'VIDEO_VIEWERSHIP_SKIP_BUTTONS_SHOWN', + self::VIDEO_VIEWERSHIP_STARTS => 'VIDEO_VIEWERSHIP_STARTS', + self::VIDEO_VIEWERSHIP_THIRD_QUARTILES => 'VIDEO_VIEWERSHIP_THIRD_QUARTILES', + self::VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT => 'VIDEO_VIEWERSHIP_TOTAL_ERROR_COUNT', + self::VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE => 'VIDEO_VIEWERSHIP_TOTAL_ERROR_RATE', + self::VIDEO_VIEWERSHIP_VIDEO_LENGTH => 'VIDEO_VIEWERSHIP_VIDEO_LENGTH', + self::VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE => 'VIDEO_VIEWERSHIP_VIEW_THROUGH_RATE', + self::YIELD_GROUP_AUCTIONS_WON => 'YIELD_GROUP_AUCTIONS_WON', + self::YIELD_GROUP_BIDS => 'YIELD_GROUP_BIDS', + self::YIELD_GROUP_BIDS_IN_AUCTION => 'YIELD_GROUP_BIDS_IN_AUCTION', + self::YIELD_GROUP_CALLOUTS => 'YIELD_GROUP_CALLOUTS', + self::YIELD_GROUP_ESTIMATED_CPM => 'YIELD_GROUP_ESTIMATED_CPM', + self::YIELD_GROUP_ESTIMATED_REVENUE => 'YIELD_GROUP_ESTIMATED_REVENUE', + self::YIELD_GROUP_IMPRESSIONS => 'YIELD_GROUP_IMPRESSIONS', + self::YIELD_GROUP_MEDIATION_FILL_RATE => 'YIELD_GROUP_MEDIATION_FILL_RATE', + self::YIELD_GROUP_MEDIATION_MATCHED_QUERIES => 'YIELD_GROUP_MEDIATION_MATCHED_QUERIES', + self::YIELD_GROUP_MEDIATION_PASSBACKS => 'YIELD_GROUP_MEDIATION_PASSBACKS', + self::YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM => 'YIELD_GROUP_MEDIATION_THIRD_PARTY_ECPM', + self::YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT => 'YIELD_GROUP_REVENUE_PAID_THROUGH_MCM_AUTOPAYMENT', + self::YIELD_GROUP_SUCCESSFUL_RESPONSES => 'YIELD_GROUP_SUCCESSFUL_RESPONSES', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/MetricValueType.php b/AdsAdManager/src/V1/ReportDefinition/MetricValueType.php new file mode 100644 index 000000000000..1215ab0c5ffb --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/MetricValueType.php @@ -0,0 +1,83 @@ +google.ads.admanager.v1.ReportDefinition.MetricValueType + */ +class MetricValueType +{ + /** + * The values for the primary date_range. + * + * Generated from protobuf enum PRIMARY = 0; + */ + const PRIMARY = 0; + /** + * Each metrics' percent of the total for the primary date_range. + * + * Generated from protobuf enum PRIMARY_PERCENT_OF_TOTAL = 1; + */ + const PRIMARY_PERCENT_OF_TOTAL = 1; + /** + * The values for the comparison_date_range. + * + * Generated from protobuf enum COMPARISON = 2; + */ + const COMPARISON = 2; + /** + * Each metrics' percent of the total for the comparison_date_range. + * + * Generated from protobuf enum COMPARISON_PERCENT_OF_TOTAL = 3; + */ + const COMPARISON_PERCENT_OF_TOTAL = 3; + /** + * The absolute change between the primary and comparison date ranges. + * + * Generated from protobuf enum ABSOLUTE_CHANGE = 4; + */ + const ABSOLUTE_CHANGE = 4; + /** + * The relative change between the primary and comparison date ranges. + * + * Generated from protobuf enum RELATIVE_CHANGE = 5; + */ + const RELATIVE_CHANGE = 5; + + private static $valueToName = [ + self::PRIMARY => 'PRIMARY', + self::PRIMARY_PERCENT_OF_TOTAL => 'PRIMARY_PERCENT_OF_TOTAL', + self::COMPARISON => 'COMPARISON', + self::COMPARISON_PERCENT_OF_TOTAL => 'COMPARISON_PERCENT_OF_TOTAL', + self::ABSOLUTE_CHANGE => 'ABSOLUTE_CHANGE', + self::RELATIVE_CHANGE => 'RELATIVE_CHANGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/ReportType.php b/AdsAdManager/src/V1/ReportDefinition/ReportType.php new file mode 100644 index 000000000000..97773a2c1c8c --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/ReportType.php @@ -0,0 +1,76 @@ +google.ads.admanager.v1.ReportDefinition.ReportType + */ +class ReportType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum REPORT_TYPE_UNSPECIFIED = 0; + */ + const REPORT_TYPE_UNSPECIFIED = 0; + /** + * Historical. + * + * Generated from protobuf enum HISTORICAL = 1; + */ + const HISTORICAL = 1; + /** + * Reach. + * + * Generated from protobuf enum REACH = 5; + */ + const REACH = 5; + /** + * Privacy and messaging. + * + * Generated from protobuf enum PRIVACY_AND_MESSAGING = 6; + */ + const PRIVACY_AND_MESSAGING = 6; + /** + * Ad speed. + * + * Generated from protobuf enum AD_SPEED = 13; + */ + const AD_SPEED = 13; + + private static $valueToName = [ + self::REPORT_TYPE_UNSPECIFIED => 'REPORT_TYPE_UNSPECIFIED', + self::HISTORICAL => 'HISTORICAL', + self::REACH => 'REACH', + self::PRIVACY_AND_MESSAGING => 'PRIVACY_AND_MESSAGING', + self::AD_SPEED => 'AD_SPEED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/Slice.php b/AdsAdManager/src/V1/ReportDefinition/Slice.php new file mode 100644 index 000000000000..1a4d1861d10a --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/Slice.php @@ -0,0 +1,114 @@ +google.ads.admanager.v1.ReportDefinition.Slice + */ +class Slice extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The dimension to slice on. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Dimension dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dimension = 0; + /** + * Required. The value of the dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportValue value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $dimension + * Required. The dimension to slice on. + * @type \Google\Ads\AdManager\V1\ReportValue $value + * Required. The value of the dimension. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); + parent::__construct($data); + } + + /** + * Required. The dimension to slice on. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Dimension dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDimension() + { + return $this->dimension; + } + + /** + * Required. The dimension to slice on. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Dimension dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDimension($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReportDefinition\Dimension::class); + $this->dimension = $var; + + return $this; + } + + /** + * Required. The value of the dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportValue value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\ReportValue|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * Required. The value of the dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportValue value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\ReportValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportValue::class); + $this->value = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/Sort.php b/AdsAdManager/src/V1/ReportDefinition/Sort.php new file mode 100644 index 000000000000..1aa0177b30be --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/Sort.php @@ -0,0 +1,252 @@ +google.ads.admanager.v1.ReportDefinition.Sort + */ +class Sort extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A field (dimension or metric) to sort by. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $field = null; + /** + * Optional. The sort order. If true the sort will be descending. + * + * Generated from protobuf field bool descending = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $descending = false; + /** + * Optional. Use to sort on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.Slice slice = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $slice = null; + /** + * Optional. When using time period columns, use this to sort on a specific + * column. + * + * Generated from protobuf field optional int32 time_period_index = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_period_index = null; + /** + * Optional. Use to specify which metric value type to sort on. Defaults to + * PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.MetricValueType metric_value_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metric_value_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\ReportDefinition\Field $field + * Required. A field (dimension or metric) to sort by. + * @type bool $descending + * Optional. The sort order. If true the sort will be descending. + * @type \Google\Ads\AdManager\V1\ReportDefinition\Slice $slice + * Optional. Use to sort on a specific slice of data. + * @type int $time_period_index + * Optional. When using time period columns, use this to sort on a specific + * column. + * @type int $metric_value_type + * Optional. Use to specify which metric value type to sort on. Defaults to + * PRIMARY. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); + parent::__construct($data); + } + + /** + * Required. A field (dimension or metric) to sort by. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\ReportDefinition\Field|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * Required. A field (dimension or metric) to sort by. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportDefinition.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\ReportDefinition\Field $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\Field::class); + $this->field = $var; + + return $this; + } + + /** + * Optional. The sort order. If true the sort will be descending. + * + * Generated from protobuf field bool descending = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDescending() + { + return $this->descending; + } + + /** + * Optional. The sort order. If true the sort will be descending. + * + * Generated from protobuf field bool descending = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDescending($var) + { + GPBUtil::checkBool($var); + $this->descending = $var; + + return $this; + } + + /** + * Optional. Use to sort on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.Slice slice = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\ReportDefinition\Slice|null + */ + public function getSlice() + { + return $this->slice; + } + + public function hasSlice() + { + return isset($this->slice); + } + + public function clearSlice() + { + unset($this->slice); + } + + /** + * Optional. Use to sort on a specific slice of data. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.Slice slice = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\ReportDefinition\Slice $var + * @return $this + */ + public function setSlice($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportDefinition\Slice::class); + $this->slice = $var; + + return $this; + } + + /** + * Optional. When using time period columns, use this to sort on a specific + * column. + * + * Generated from protobuf field optional int32 time_period_index = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTimePeriodIndex() + { + return isset($this->time_period_index) ? $this->time_period_index : 0; + } + + public function hasTimePeriodIndex() + { + return isset($this->time_period_index); + } + + public function clearTimePeriodIndex() + { + unset($this->time_period_index); + } + + /** + * Optional. When using time period columns, use this to sort on a specific + * column. + * + * Generated from protobuf field optional int32 time_period_index = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTimePeriodIndex($var) + { + GPBUtil::checkInt32($var); + $this->time_period_index = $var; + + return $this; + } + + /** + * Optional. Use to specify which metric value type to sort on. Defaults to + * PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.MetricValueType metric_value_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMetricValueType() + { + return isset($this->metric_value_type) ? $this->metric_value_type : 0; + } + + public function hasMetricValueType() + { + return isset($this->metric_value_type); + } + + public function clearMetricValueType() + { + unset($this->metric_value_type); + } + + /** + * Optional. Use to specify which metric value type to sort on. Defaults to + * PRIMARY. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReportDefinition.MetricValueType metric_value_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMetricValueType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReportDefinition\MetricValueType::class); + $this->metric_value_type = $var; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/TimePeriodColumn.php b/AdsAdManager/src/V1/ReportDefinition/TimePeriodColumn.php new file mode 100644 index 000000000000..3f37faf336bd --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/TimePeriodColumn.php @@ -0,0 +1,76 @@ +google.ads.admanager.v1.ReportDefinition.TimePeriodColumn + */ +class TimePeriodColumn +{ + /** + * Default value. Report will have no time period column. + * + * Generated from protobuf enum TIME_PERIOD_COLUMN_UNSPECIFIED = 0; + */ + const TIME_PERIOD_COLUMN_UNSPECIFIED = 0; + /** + * A column for each date in the report. + * + * Generated from protobuf enum TIME_PERIOD_COLUMN_DATE = 1; + */ + const TIME_PERIOD_COLUMN_DATE = 1; + /** + * A column for each week in the report. + * + * Generated from protobuf enum TIME_PERIOD_COLUMN_WEEK = 2; + */ + const TIME_PERIOD_COLUMN_WEEK = 2; + /** + * A column for each month in the report. + * + * Generated from protobuf enum TIME_PERIOD_COLUMN_MONTH = 3; + */ + const TIME_PERIOD_COLUMN_MONTH = 3; + /** + * A column for each quarter in the report. + * + * Generated from protobuf enum TIME_PERIOD_COLUMN_QUARTER = 4; + */ + const TIME_PERIOD_COLUMN_QUARTER = 4; + + private static $valueToName = [ + self::TIME_PERIOD_COLUMN_UNSPECIFIED => 'TIME_PERIOD_COLUMN_UNSPECIFIED', + self::TIME_PERIOD_COLUMN_DATE => 'TIME_PERIOD_COLUMN_DATE', + self::TIME_PERIOD_COLUMN_WEEK => 'TIME_PERIOD_COLUMN_WEEK', + self::TIME_PERIOD_COLUMN_MONTH => 'TIME_PERIOD_COLUMN_MONTH', + self::TIME_PERIOD_COLUMN_QUARTER => 'TIME_PERIOD_COLUMN_QUARTER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/ReportDefinition/TimeZoneSource.php b/AdsAdManager/src/V1/ReportDefinition/TimeZoneSource.php new file mode 100644 index 000000000000..413489812510 --- /dev/null +++ b/AdsAdManager/src/V1/ReportDefinition/TimeZoneSource.php @@ -0,0 +1,81 @@ +google.ads.admanager.v1.ReportDefinition.TimeZoneSource + */ +class TimeZoneSource +{ + /** + * Unspecified default value. + * + * Generated from protobuf enum TIME_ZONE_SOURCE_UNSPECIFIED = 0; + */ + const TIME_ZONE_SOURCE_UNSPECIFIED = 0; + /** + * Use the publisher's time zone in network settings. + * + * Generated from protobuf enum PUBLISHER = 1; + */ + const PUBLISHER = 1; + /** + * Use the time zone of the ad exchange. + * Only compatible with Ad Exchange dimensions and metrics. + * + * Generated from protobuf enum AD_EXCHANGE = 2; + */ + const AD_EXCHANGE = 2; + /** + * Use UTC time zone. + * Only compatible with Revenue Verification reports. + * + * Generated from protobuf enum UTC = 3; + */ + const UTC = 3; + /** + * Use the time zone provided in the ReportDefinition.time_zone field. + * Has limited dimension and metric compatibility compared with PUBLISHER, + * and reports may take longer to run since the dates are dynamically + * calculated at request time. + * + * Generated from protobuf enum PROVIDED = 4; + */ + const PROVIDED = 4; + + private static $valueToName = [ + self::TIME_ZONE_SOURCE_UNSPECIFIED => 'TIME_ZONE_SOURCE_UNSPECIFIED', + self::PUBLISHER => 'PUBLISHER', + self::AD_EXCHANGE => 'AD_EXCHANGE', + self::UTC => 'UTC', + self::PROVIDED => 'PROVIDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/ReportValue.php b/AdsAdManager/src/V1/ReportValue.php new file mode 100644 index 000000000000..aa1da1290baf --- /dev/null +++ b/AdsAdManager/src/V1/ReportValue.php @@ -0,0 +1,306 @@ +google.ads.admanager.v1.ReportValue + */ +class ReportValue extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $int_value + * For integer values. + * @type float $double_value + * For double values. + * @type string $string_value + * For string values. + * @type bool $bool_value + * For boolean values. + * @type \Google\Ads\AdManager\V1\ReportValue\IntList $int_list_value + * For lists of integer values. + * @type \Google\Ads\AdManager\V1\ReportValue\StringList $string_list_value + * For lists of string values. + * @type \Google\Ads\AdManager\V1\ReportValue\DoubleList $double_list_value + * For lists of double values. + * @type string $bytes_value + * For bytes values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportValue::initOnce(); + parent::__construct($data); + } + + /** + * For integer values. + * + * Generated from protobuf field int64 int_value = 1; + * @return int|string + */ + public function getIntValue() + { + return $this->readOneof(1); + } + + public function hasIntValue() + { + return $this->hasOneof(1); + } + + /** + * For integer values. + * + * Generated from protobuf field int64 int_value = 1; + * @param int|string $var + * @return $this + */ + public function setIntValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * For double values. + * + * Generated from protobuf field double double_value = 2; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(2); + } + + public function hasDoubleValue() + { + return $this->hasOneof(2); + } + + /** + * For double values. + * + * Generated from protobuf field double double_value = 2; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * For string values. + * + * Generated from protobuf field string string_value = 3; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(3); + } + + public function hasStringValue() + { + return $this->hasOneof(3); + } + + /** + * For string values. + * + * Generated from protobuf field string string_value = 3; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * For boolean values. + * + * Generated from protobuf field bool bool_value = 4; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(4); + } + + public function hasBoolValue() + { + return $this->hasOneof(4); + } + + /** + * For boolean values. + * + * Generated from protobuf field bool bool_value = 4; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * For lists of integer values. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportValue.IntList int_list_value = 6; + * @return \Google\Ads\AdManager\V1\ReportValue\IntList|null + */ + public function getIntListValue() + { + return $this->readOneof(6); + } + + public function hasIntListValue() + { + return $this->hasOneof(6); + } + + /** + * For lists of integer values. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportValue.IntList int_list_value = 6; + * @param \Google\Ads\AdManager\V1\ReportValue\IntList $var + * @return $this + */ + public function setIntListValue($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportValue\IntList::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * For lists of string values. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportValue.StringList string_list_value = 7; + * @return \Google\Ads\AdManager\V1\ReportValue\StringList|null + */ + public function getStringListValue() + { + return $this->readOneof(7); + } + + public function hasStringListValue() + { + return $this->hasOneof(7); + } + + /** + * For lists of string values. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportValue.StringList string_list_value = 7; + * @param \Google\Ads\AdManager\V1\ReportValue\StringList $var + * @return $this + */ + public function setStringListValue($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportValue\StringList::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * For lists of double values. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportValue.DoubleList double_list_value = 9; + * @return \Google\Ads\AdManager\V1\ReportValue\DoubleList|null + */ + public function getDoubleListValue() + { + return $this->readOneof(9); + } + + public function hasDoubleListValue() + { + return $this->hasOneof(9); + } + + /** + * For lists of double values. + * + * Generated from protobuf field .google.ads.admanager.v1.ReportValue.DoubleList double_list_value = 9; + * @param \Google\Ads\AdManager\V1\ReportValue\DoubleList $var + * @return $this + */ + public function setDoubleListValue($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ReportValue\DoubleList::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * For bytes values. + * + * Generated from protobuf field bytes bytes_value = 8; + * @return string + */ + public function getBytesValue() + { + return $this->readOneof(8); + } + + public function hasBytesValue() + { + return $this->hasOneof(8); + } + + /** + * For bytes values. + * + * Generated from protobuf field bytes bytes_value = 8; + * @param string $var + * @return $this + */ + public function setBytesValue($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/AdsAdManager/src/V1/ReportValue/DoubleList.php b/AdsAdManager/src/V1/ReportValue/DoubleList.php new file mode 100644 index 000000000000..e4ae70d03f0d --- /dev/null +++ b/AdsAdManager/src/V1/ReportValue/DoubleList.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.ReportValue.DoubleList + */ +class DoubleList extends \Google\Protobuf\Internal\Message +{ + /** + * The values + * + * Generated from protobuf field repeated double values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $values + * The values + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportValue::initOnce(); + parent::__construct($data); + } + + /** + * The values + * + * Generated from protobuf field repeated double values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The values + * + * Generated from protobuf field repeated double values = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->values = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ReportValue/IntList.php b/AdsAdManager/src/V1/ReportValue/IntList.php new file mode 100644 index 000000000000..b11fc301bb8e --- /dev/null +++ b/AdsAdManager/src/V1/ReportValue/IntList.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.ReportValue.IntList + */ +class IntList extends \Google\Protobuf\Internal\Message +{ + /** + * The values + * + * Generated from protobuf field repeated int64 values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|array|\Google\Protobuf\Internal\RepeatedField $values + * The values + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportValue::initOnce(); + parent::__construct($data); + } + + /** + * The values + * + * Generated from protobuf field repeated int64 values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The values + * + * Generated from protobuf field repeated int64 values = 1; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->values = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ReportValue/StringList.php b/AdsAdManager/src/V1/ReportValue/StringList.php new file mode 100644 index 000000000000..6f60b915ec87 --- /dev/null +++ b/AdsAdManager/src/V1/ReportValue/StringList.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.ReportValue.StringList + */ +class StringList extends \Google\Protobuf\Internal\Message +{ + /** + * The values + * + * Generated from protobuf field repeated string values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $values + * The values + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportValue::initOnce(); + parent::__construct($data); + } + + /** + * The values + * + * Generated from protobuf field repeated string values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The values + * + * Generated from protobuf field repeated string values = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ScheduleOptions.php b/AdsAdManager/src/V1/ScheduleOptions.php index 4d6bff921cb8..b982fc993b4c 100644 --- a/AdsAdManager/src/V1/ScheduleOptions.php +++ b/AdsAdManager/src/V1/ScheduleOptions.php @@ -18,7 +18,7 @@ class ScheduleOptions extends \Google\Protobuf\Internal\Message /** * Information pertaining to schedule itself. * - * Generated from protobuf field .google.ads.admanager.v1.Schedule schedule = 1; + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.Schedule schedule = 1; */ protected $schedule = null; /** @@ -31,7 +31,7 @@ class ScheduleOptions extends \Google\Protobuf\Internal\Message * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT * is specified. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $flags; @@ -41,11 +41,11 @@ class ScheduleOptions extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type \Google\Ads\AdManager\V1\Schedule $schedule + * @type \Google\Ads\AdManager\V1\ScheduleOptions\Schedule $schedule * Information pertaining to schedule itself. * @type int $delivery_condition * Option for when to deliver the scheduled report. - * @type array<\Google\Ads\AdManager\V1\Report\Flag>|\Google\Protobuf\Internal\RepeatedField $flags + * @type array<\Google\Ads\AdManager\V1\ReportDefinition\Flag>|\Google\Protobuf\Internal\RepeatedField $flags * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT * is specified. * } @@ -58,8 +58,8 @@ public function __construct($data = NULL) { /** * Information pertaining to schedule itself. * - * Generated from protobuf field .google.ads.admanager.v1.Schedule schedule = 1; - * @return \Google\Ads\AdManager\V1\Schedule|null + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.Schedule schedule = 1; + * @return \Google\Ads\AdManager\V1\ScheduleOptions\Schedule|null */ public function getSchedule() { @@ -79,13 +79,13 @@ public function clearSchedule() /** * Information pertaining to schedule itself. * - * Generated from protobuf field .google.ads.admanager.v1.Schedule schedule = 1; - * @param \Google\Ads\AdManager\V1\Schedule $var + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.Schedule schedule = 1; + * @param \Google\Ads\AdManager\V1\ScheduleOptions\Schedule $var * @return $this */ public function setSchedule($var) { - GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Schedule::class); + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ScheduleOptions\Schedule::class); $this->schedule = $var; return $this; @@ -121,7 +121,7 @@ public function setDeliveryCondition($var) * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT * is specified. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getFlags() @@ -133,13 +133,13 @@ public function getFlags() * Optional. The flags evaluated when ReportDeliveryOption.WHEN_FLAG_PRESENT * is specified. * - * Generated from protobuf field repeated .google.ads.admanager.v1.Report.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Ads\AdManager\V1\Report\Flag>|\Google\Protobuf\Internal\RepeatedField $var + * Generated from protobuf field repeated .google.ads.admanager.v1.ReportDefinition.Flag flags = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Ads\AdManager\V1\ReportDefinition\Flag>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setFlags($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Report\Flag::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\ReportDefinition\Flag::class); $this->flags = $arr; return $this; diff --git a/AdsAdManager/src/V1/ScheduleOptions/Schedule.php b/AdsAdManager/src/V1/ScheduleOptions/Schedule.php new file mode 100644 index 000000000000..04ee4fad4426 --- /dev/null +++ b/AdsAdManager/src/V1/ScheduleOptions/Schedule.php @@ -0,0 +1,307 @@ +google.ads.admanager.v1.ScheduleOptions.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * Date for the first run of the report. + * + * Generated from protobuf field .google.type.Date start_date = 1; + */ + protected $start_date = null; + /** + * Date for the final run of the report. + * + * Generated from protobuf field .google.type.Date end_date = 2; + */ + protected $end_date = null; + /** + * Frequency to run report. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency frequency = 3; + */ + protected $frequency = 0; + /** + * Indicates start time for schedule to run + * Will use the time_zone from `ReportDefinition`. Defaults + * to the publisher's time zone if not specified. + * For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this + * will be the time of day that the first report will run on the first day. + * For example, if the start time is 2:00 PM, and the frequency is + * THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, + * 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, + * 2:00 PM, 10:00 PM. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 4; + */ + protected $start_time = null; + protected $frequency_schedule; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\ScheduleOptions\Schedule\WeeklySchedule $weekly_schedule + * Days of week to schedule report run. + * @type \Google\Ads\AdManager\V1\ScheduleOptions\Schedule\MonthlySchedule $monthly_schedule + * Days of month to schedule report run. + * @type \Google\Type\Date $start_date + * Date for the first run of the report. + * @type \Google\Type\Date $end_date + * Date for the final run of the report. + * @type int $frequency + * Frequency to run report. + * @type \Google\Type\TimeOfDay $start_time + * Indicates start time for schedule to run + * Will use the time_zone from `ReportDefinition`. Defaults + * to the publisher's time zone if not specified. + * For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this + * will be the time of day that the first report will run on the first day. + * For example, if the start time is 2:00 PM, and the frequency is + * THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, + * 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, + * 2:00 PM, 10:00 PM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportMessages::initOnce(); + parent::__construct($data); + } + + /** + * Days of week to schedule report run. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule weekly_schedule = 6; + * @return \Google\Ads\AdManager\V1\ScheduleOptions\Schedule\WeeklySchedule|null + */ + public function getWeeklySchedule() + { + return $this->readOneof(6); + } + + public function hasWeeklySchedule() + { + return $this->hasOneof(6); + } + + /** + * Days of week to schedule report run. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule weekly_schedule = 6; + * @param \Google\Ads\AdManager\V1\ScheduleOptions\Schedule\WeeklySchedule $var + * @return $this + */ + public function setWeeklySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ScheduleOptions\Schedule\WeeklySchedule::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Days of month to schedule report run. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule monthly_schedule = 7; + * @return \Google\Ads\AdManager\V1\ScheduleOptions\Schedule\MonthlySchedule|null + */ + public function getMonthlySchedule() + { + return $this->readOneof(7); + } + + public function hasMonthlySchedule() + { + return $this->hasOneof(7); + } + + /** + * Days of month to schedule report run. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule monthly_schedule = 7; + * @param \Google\Ads\AdManager\V1\ScheduleOptions\Schedule\MonthlySchedule $var + * @return $this + */ + public function setMonthlySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ScheduleOptions\Schedule\MonthlySchedule::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Date for the first run of the report. + * + * Generated from protobuf field .google.type.Date start_date = 1; + * @return \Google\Type\Date|null + */ + public function getStartDate() + { + return $this->start_date; + } + + public function hasStartDate() + { + return isset($this->start_date); + } + + public function clearStartDate() + { + unset($this->start_date); + } + + /** + * Date for the first run of the report. + * + * Generated from protobuf field .google.type.Date start_date = 1; + * @param \Google\Type\Date $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->start_date = $var; + + return $this; + } + + /** + * Date for the final run of the report. + * + * Generated from protobuf field .google.type.Date end_date = 2; + * @return \Google\Type\Date|null + */ + public function getEndDate() + { + return $this->end_date; + } + + public function hasEndDate() + { + return isset($this->end_date); + } + + public function clearEndDate() + { + unset($this->end_date); + } + + /** + * Date for the final run of the report. + * + * Generated from protobuf field .google.type.Date end_date = 2; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_date = $var; + + return $this; + } + + /** + * Frequency to run report. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency frequency = 3; + * @return int + */ + public function getFrequency() + { + return $this->frequency; + } + + /** + * Frequency to run report. + * + * Generated from protobuf field .google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency frequency = 3; + * @param int $var + * @return $this + */ + public function setFrequency($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ScheduleOptions\Schedule\Frequency::class); + $this->frequency = $var; + + return $this; + } + + /** + * Indicates start time for schedule to run + * Will use the time_zone from `ReportDefinition`. Defaults + * to the publisher's time zone if not specified. + * For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this + * will be the time of day that the first report will run on the first day. + * For example, if the start time is 2:00 PM, and the frequency is + * THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, + * 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, + * 2:00 PM, 10:00 PM. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 4; + * @return \Google\Type\TimeOfDay|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Indicates start time for schedule to run + * Will use the time_zone from `ReportDefinition`. Defaults + * to the publisher's time zone if not specified. + * For HOURLY, TWO_TIMES_DAILY, THREE_TIMES_DAILY, or FOUR_TIMES_DAILY, this + * will be the time of day that the first report will run on the first day. + * For example, if the start time is 2:00 PM, and the frequency is + * THREE_TIMES_DAILY, the first day will have reports scheduled at 2:00 PM, + * 10:00 PM. Each subsequent day will have reports scheduled at 6:00 AM, + * 2:00 PM, 10:00 PM. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 4; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->start_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getFrequencySchedule() + { + return $this->whichOneof("frequency_schedule"); + } + +} + + diff --git a/AdsAdManager/src/V1/ScheduleOptions/Schedule/Frequency.php b/AdsAdManager/src/V1/ScheduleOptions/Schedule/Frequency.php new file mode 100644 index 000000000000..f0186048b8d2 --- /dev/null +++ b/AdsAdManager/src/V1/ScheduleOptions/Schedule/Frequency.php @@ -0,0 +1,97 @@ +google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency + */ +class Frequency +{ + /** + * No Frequency specified. + * + * Generated from protobuf enum FREQUENCY_UNSPECIFIED = 0; + */ + const FREQUENCY_UNSPECIFIED = 0; + /** + * Schedule report to run every hour. + * + * Generated from protobuf enum HOURLY = 1; + */ + const HOURLY = 1; + /** + * Schedule report to run twice a day (every 12 hours). + * + * Generated from protobuf enum TWO_TIMES_DAILY = 2; + */ + const TWO_TIMES_DAILY = 2; + /** + * Schedule report to run three times a day (every 8 hours). + * + * Generated from protobuf enum THREE_TIMES_DAILY = 3; + */ + const THREE_TIMES_DAILY = 3; + /** + * Schedule report to run four times a day (every 6 hours). + * + * Generated from protobuf enum FOUR_TIMES_DAILY = 4; + */ + const FOUR_TIMES_DAILY = 4; + /** + * Schedule report to run on a daily basis. + * + * Generated from protobuf enum DAILY = 5; + */ + const DAILY = 5; + /** + * Schedule report to run on a weekly basis. + * + * Generated from protobuf enum WEEKLY = 6; + */ + const WEEKLY = 6; + /** + * Schedule report to run on a monthly basis. + * + * Generated from protobuf enum MONTHLY = 7; + */ + const MONTHLY = 7; + + private static $valueToName = [ + self::FREQUENCY_UNSPECIFIED => 'FREQUENCY_UNSPECIFIED', + self::HOURLY => 'HOURLY', + self::TWO_TIMES_DAILY => 'TWO_TIMES_DAILY', + self::THREE_TIMES_DAILY => 'THREE_TIMES_DAILY', + self::FOUR_TIMES_DAILY => 'FOUR_TIMES_DAILY', + self::DAILY => 'DAILY', + self::WEEKLY => 'WEEKLY', + self::MONTHLY => 'MONTHLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/ScheduleOptions/Schedule/MonthlySchedule.php b/AdsAdManager/src/V1/ScheduleOptions/Schedule/MonthlySchedule.php new file mode 100644 index 000000000000..1bc67a53e885 --- /dev/null +++ b/AdsAdManager/src/V1/ScheduleOptions/Schedule/MonthlySchedule.php @@ -0,0 +1,72 @@ +google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlySchedule + */ +class MonthlySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies days of the month to run report. Range is from 1-31. + * Will ignore days that are not valid for the given month. + * + * Generated from protobuf field repeated int32 monthly_scheduled_days = 1; + */ + private $monthly_scheduled_days; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $monthly_scheduled_days + * Specifies days of the month to run report. Range is from 1-31. + * Will ignore days that are not valid for the given month. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportMessages::initOnce(); + parent::__construct($data); + } + + /** + * Specifies days of the month to run report. Range is from 1-31. + * Will ignore days that are not valid for the given month. + * + * Generated from protobuf field repeated int32 monthly_scheduled_days = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMonthlyScheduledDays() + { + return $this->monthly_scheduled_days; + } + + /** + * Specifies days of the month to run report. Range is from 1-31. + * Will ignore days that are not valid for the given month. + * + * Generated from protobuf field repeated int32 monthly_scheduled_days = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMonthlyScheduledDays($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->monthly_scheduled_days = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/ScheduleOptions/Schedule/WeeklySchedule.php b/AdsAdManager/src/V1/ScheduleOptions/Schedule/WeeklySchedule.php new file mode 100644 index 000000000000..a5f4b739bd41 --- /dev/null +++ b/AdsAdManager/src/V1/ScheduleOptions/Schedule/WeeklySchedule.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklySchedule + */ +class WeeklySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies days of the week on which to run report. + * + * Generated from protobuf field repeated .google.type.DayOfWeek weekly_scheduled_days = 1; + */ + private $weekly_scheduled_days; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $weekly_scheduled_days + * Specifies days of the week on which to run report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ReportMessages::initOnce(); + parent::__construct($data); + } + + /** + * Specifies days of the week on which to run report. + * + * Generated from protobuf field repeated .google.type.DayOfWeek weekly_scheduled_days = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWeeklyScheduledDays() + { + return $this->weekly_scheduled_days; + } + + /** + * Specifies days of the week on which to run report. + * + * Generated from protobuf field repeated .google.type.DayOfWeek weekly_scheduled_days = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWeeklyScheduledDays($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Type\DayOfWeek::class); + $this->weekly_scheduled_days = $arr; + + return $this; + } + +} + + diff --git a/AdsAdManager/src/V1/SearchAdReviewCenterAdsRequest.php b/AdsAdManager/src/V1/SearchAdReviewCenterAdsRequest.php new file mode 100644 index 000000000000..469c0b024a85 --- /dev/null +++ b/AdsAdManager/src/V1/SearchAdReviewCenterAdsRequest.php @@ -0,0 +1,422 @@ +google.ads.admanager.v1.SearchAdReviewCenterAdsRequest + */ +class SearchAdReviewCenterAdsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of AdReviewCenterAds to return. The service + * may return fewer than this value. If unspecified, at most 50 + * AdReviewCenterAds will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token to fetch the next page of AdReviewCenterAds. This + * is the value returned from a previous Search request, or empty. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Required. Only return ads with the given status. + * + * Generated from protobuf field .google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus status = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $status = 0; + /** + * Optional. If provided, only return ads with the given AdReviewCenterAd IDs. + * + * Generated from protobuf field repeated string ad_review_center_ad_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ad_review_center_ad_id; + /** + * Optional. If provided, only return ads that served within the given date + * range (inclusive). The date range must be within the last 30 days. If not + * provided, the date range will be the last 30 days. + * + * Generated from protobuf field .google.type.Interval date_time_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $date_time_range = null; + /** + * Optional. If provided, restrict the search to AdReviewCenterAds associated + * with the text (including any text on the ad or in the destination URL). If + * more than one value is provided, the search will combine them in a logical + * AND. For example, ['car', 'blue'] will match ads that contain both "car" + * and "blue", but not an ad that only contains "car". + * + * Generated from protobuf field repeated string search_text = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $search_text; + /** + * Optional. If provided, restrict the search to creatives belonging to one of + * the given Adx buyer account IDs. Only applicable to RTB creatives. Adx + * buyer account IDs can be found via the ProgrammaticBuyerService. + * + * Generated from protobuf field repeated int64 buyer_account_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $buyer_account_id; + + /** + * @param string $parent Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * + * `networks/{network_code}/webProperties/display` + * + * `networks/{network_code}/webProperties/videoAndAudio` + * + * `networks/{network_code}/webProperties/mobileApp` + * + * `networks/{network_code}/webProperties/games` + * Please see {@see AdReviewCenterAdServiceClient::webPropertyName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\SearchAdReviewCenterAdsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * @type int $page_size + * Optional. The maximum number of AdReviewCenterAds to return. The service + * may return fewer than this value. If unspecified, at most 50 + * AdReviewCenterAds will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * @type string $page_token + * Optional. The page token to fetch the next page of AdReviewCenterAds. This + * is the value returned from a previous Search request, or empty. + * @type int $status + * Required. Only return ads with the given status. + * @type array|\Google\Protobuf\Internal\RepeatedField $ad_review_center_ad_id + * Optional. If provided, only return ads with the given AdReviewCenterAd IDs. + * @type \Google\Type\Interval $date_time_range + * Optional. If provided, only return ads that served within the given date + * range (inclusive). The date range must be within the last 30 days. If not + * provided, the date range will be the last 30 days. + * @type array|\Google\Protobuf\Internal\RepeatedField $search_text + * Optional. If provided, restrict the search to AdReviewCenterAds associated + * with the text (including any text on the ad or in the destination URL). If + * more than one value is provided, the search will combine them in a logical + * AND. For example, ['car', 'blue'] will match ads that contain both "car" + * and "blue", but not an ad that only contains "car". + * @type array|array|\Google\Protobuf\Internal\RepeatedField $buyer_account_id + * Optional. If provided, restrict the search to creatives belonging to one of + * the given Adx buyer account IDs. Only applicable to RTB creatives. Adx + * buyer account IDs can be found via the ProgrammaticBuyerService. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdReviewCenterAdService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of AdReviewCenterAds. + * Format: networks/{network_code}/webProperties/{web_property_code} + * Since a network can only have a single web property of each + * `ExchangeSyndicationProduct`, you can use the + * `ExchangeSyndicationProduct` as an alias for the web property code: + * `networks/{network_code}/webProperties/display` + * `networks/{network_code}/webProperties/videoAndAudio` + * `networks/{network_code}/webProperties/mobileApp` + * `networks/{network_code}/webProperties/games` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of AdReviewCenterAds to return. The service + * may return fewer than this value. If unspecified, at most 50 + * AdReviewCenterAds will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of AdReviewCenterAds to return. The service + * may return fewer than this value. If unspecified, at most 50 + * AdReviewCenterAds will be returned. The maximum value is 1000; values + * greater than 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The page token to fetch the next page of AdReviewCenterAds. This + * is the value returned from a previous Search request, or empty. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token to fetch the next page of AdReviewCenterAds. This + * is the value returned from a previous Search request, or empty. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Required. Only return ads with the given status. + * + * Generated from protobuf field .google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus status = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Required. Only return ads with the given status. + * + * Generated from protobuf field .google.ads.admanager.v1.AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus status = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\AdReviewCenterAdStatusEnum\AdReviewCenterAdStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Optional. If provided, only return ads with the given AdReviewCenterAd IDs. + * + * Generated from protobuf field repeated string ad_review_center_ad_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdReviewCenterAdId() + { + return $this->ad_review_center_ad_id; + } + + /** + * Optional. If provided, only return ads with the given AdReviewCenterAd IDs. + * + * Generated from protobuf field repeated string ad_review_center_ad_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdReviewCenterAdId($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ad_review_center_ad_id = $arr; + + return $this; + } + + /** + * Optional. If provided, only return ads that served within the given date + * range (inclusive). The date range must be within the last 30 days. If not + * provided, the date range will be the last 30 days. + * + * Generated from protobuf field .google.type.Interval date_time_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\Interval|null + */ + public function getDateTimeRange() + { + return $this->date_time_range; + } + + public function hasDateTimeRange() + { + return isset($this->date_time_range); + } + + public function clearDateTimeRange() + { + unset($this->date_time_range); + } + + /** + * Optional. If provided, only return ads that served within the given date + * range (inclusive). The date range must be within the last 30 days. If not + * provided, the date range will be the last 30 days. + * + * Generated from protobuf field .google.type.Interval date_time_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\Interval $var + * @return $this + */ + public function setDateTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Type\Interval::class); + $this->date_time_range = $var; + + return $this; + } + + /** + * Optional. If provided, restrict the search to AdReviewCenterAds associated + * with the text (including any text on the ad or in the destination URL). If + * more than one value is provided, the search will combine them in a logical + * AND. For example, ['car', 'blue'] will match ads that contain both "car" + * and "blue", but not an ad that only contains "car". + * + * Generated from protobuf field repeated string search_text = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSearchText() + { + return $this->search_text; + } + + /** + * Optional. If provided, restrict the search to AdReviewCenterAds associated + * with the text (including any text on the ad or in the destination URL). If + * more than one value is provided, the search will combine them in a logical + * AND. For example, ['car', 'blue'] will match ads that contain both "car" + * and "blue", but not an ad that only contains "car". + * + * Generated from protobuf field repeated string search_text = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSearchText($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->search_text = $arr; + + return $this; + } + + /** + * Optional. If provided, restrict the search to creatives belonging to one of + * the given Adx buyer account IDs. Only applicable to RTB creatives. Adx + * buyer account IDs can be found via the ProgrammaticBuyerService. + * + * Generated from protobuf field repeated int64 buyer_account_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBuyerAccountId() + { + return $this->buyer_account_id; + } + + /** + * Optional. If provided, restrict the search to creatives belonging to one of + * the given Adx buyer account IDs. Only applicable to RTB creatives. Adx + * buyer account IDs can be found via the ProgrammaticBuyerService. + * + * Generated from protobuf field repeated int64 buyer_account_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBuyerAccountId($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->buyer_account_id = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/SearchAdReviewCenterAdsResponse.php b/AdsAdManager/src/V1/SearchAdReviewCenterAdsResponse.php new file mode 100644 index 000000000000..d8d393fa5557 --- /dev/null +++ b/AdsAdManager/src/V1/SearchAdReviewCenterAdsResponse.php @@ -0,0 +1,105 @@ +google.ads.admanager.v1.SearchAdReviewCenterAdsResponse + */ +class SearchAdReviewCenterAdsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The AdReviewCenterAds that match the search request. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdReviewCenterAd ad_review_center_ads = 1; + */ + private $ad_review_center_ads; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Ads\AdManager\V1\AdReviewCenterAd>|\Google\Protobuf\Internal\RepeatedField $ad_review_center_ads + * The AdReviewCenterAds that match the search request. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\AdReviewCenterAdService::initOnce(); + parent::__construct($data); + } + + /** + * The AdReviewCenterAds that match the search request. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdReviewCenterAd ad_review_center_ads = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdReviewCenterAds() + { + return $this->ad_review_center_ads; + } + + /** + * The AdReviewCenterAds that match the search request. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AdReviewCenterAd ad_review_center_ads = 1; + * @param array<\Google\Ads\AdManager\V1\AdReviewCenterAd>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdReviewCenterAds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AdReviewCenterAd::class); + $this->ad_review_center_ads = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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; + } + +} + diff --git a/AdsAdManager/src/V1/Site.php b/AdsAdManager/src/V1/Site.php new file mode 100644 index 000000000000..a93bd640ef59 --- /dev/null +++ b/AdsAdManager/src/V1/Site.php @@ -0,0 +1,291 @@ +google.ads.admanager.v1.Site + */ +class Site extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Site`. + * Format: `networks/{network_code}/sites/{site_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The URL of the Site. + * + * Generated from protobuf field optional string url = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $url = null; + /** + * Optional. The network code of the child if the Site is being managed for an + * MCM child network, or null if owned by this network. + * + * Generated from protobuf field optional string child_network_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $child_network_code = null; + /** + * Output only. Status of the review performed on the Site by Google. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus approval_status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $approval_status = null; + /** + * Output only. The latest Site approval status change time. + * + * Generated from protobuf field optional .google.protobuf.Timestamp approval_status_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $approval_status_update_time = null; + /** + * Output only. Provides reasons for disapproving the Site. It is null when + * the Site is not disapproved. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.DisapprovalReason disapproval_reasons = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $disapproval_reasons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Site`. + * Format: `networks/{network_code}/sites/{site_id}` + * @type string $url + * Required. The URL of the Site. + * @type string $child_network_code + * Optional. The network code of the child if the Site is being managed for an + * MCM child network, or null if owned by this network. + * @type int $approval_status + * Output only. Status of the review performed on the Site by Google. + * @type \Google\Protobuf\Timestamp $approval_status_update_time + * Output only. The latest Site approval status change time. + * @type array<\Google\Ads\AdManager\V1\DisapprovalReason>|\Google\Protobuf\Internal\RepeatedField $disapproval_reasons + * Output only. Provides reasons for disapproving the Site. It is null when + * the Site is not disapproved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Site`. + * Format: `networks/{network_code}/sites/{site_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the `Site`. + * Format: `networks/{network_code}/sites/{site_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The URL of the Site. + * + * Generated from protobuf field optional string url = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUrl() + { + return isset($this->url) ? $this->url : ''; + } + + public function hasUrl() + { + return isset($this->url); + } + + public function clearUrl() + { + unset($this->url); + } + + /** + * Required. The URL of the Site. + * + * Generated from protobuf field optional string url = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * Optional. The network code of the child if the Site is being managed for an + * MCM child network, or null if owned by this network. + * + * Generated from protobuf field optional string child_network_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getChildNetworkCode() + { + return isset($this->child_network_code) ? $this->child_network_code : ''; + } + + public function hasChildNetworkCode() + { + return isset($this->child_network_code); + } + + public function clearChildNetworkCode() + { + unset($this->child_network_code); + } + + /** + * Optional. The network code of the child if the Site is being managed for an + * MCM child network, or null if owned by this network. + * + * Generated from protobuf field optional string child_network_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setChildNetworkCode($var) + { + GPBUtil::checkString($var, True); + $this->child_network_code = $var; + + return $this; + } + + /** + * Output only. Status of the review performed on the Site by Google. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus approval_status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getApprovalStatus() + { + return isset($this->approval_status) ? $this->approval_status : 0; + } + + public function hasApprovalStatus() + { + return isset($this->approval_status); + } + + public function clearApprovalStatus() + { + unset($this->approval_status); + } + + /** + * Output only. Status of the review performed on the Site by Google. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus approval_status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setApprovalStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\SiteApprovalStatusEnum\SiteApprovalStatus::class); + $this->approval_status = $var; + + return $this; + } + + /** + * Output only. The latest Site approval status change time. + * + * Generated from protobuf field optional .google.protobuf.Timestamp approval_status_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getApprovalStatusUpdateTime() + { + return $this->approval_status_update_time; + } + + public function hasApprovalStatusUpdateTime() + { + return isset($this->approval_status_update_time); + } + + public function clearApprovalStatusUpdateTime() + { + unset($this->approval_status_update_time); + } + + /** + * Output only. The latest Site approval status change time. + * + * Generated from protobuf field optional .google.protobuf.Timestamp approval_status_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setApprovalStatusUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->approval_status_update_time = $var; + + return $this; + } + + /** + * Output only. Provides reasons for disapproving the Site. It is null when + * the Site is not disapproved. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.DisapprovalReason disapproval_reasons = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisapprovalReasons() + { + return $this->disapproval_reasons; + } + + /** + * Output only. Provides reasons for disapproving the Site. It is null when + * the Site is not disapproved. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.DisapprovalReason disapproval_reasons = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Ads\AdManager\V1\DisapprovalReason>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisapprovalReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\DisapprovalReason::class); + $this->disapproval_reasons = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/SiteApprovalStatusEnum.php b/AdsAdManager/src/V1/SiteApprovalStatusEnum.php new file mode 100644 index 000000000000..36763ecbc68c --- /dev/null +++ b/AdsAdManager/src/V1/SiteApprovalStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.SiteApprovalStatusEnum + */ +class SiteApprovalStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/SiteApprovalStatusEnum/SiteApprovalStatus.php b/AdsAdManager/src/V1/SiteApprovalStatusEnum/SiteApprovalStatus.php new file mode 100644 index 000000000000..be5b97906f5f --- /dev/null +++ b/AdsAdManager/src/V1/SiteApprovalStatusEnum/SiteApprovalStatus.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.SiteApprovalStatusEnum.SiteApprovalStatus + */ +class SiteApprovalStatus +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum SITE_APPROVAL_STATUS_UNSPECIFIED = 0; + */ + const SITE_APPROVAL_STATUS_UNSPECIFIED = 0; + /** + * The site has been approved to serve ads. + * + * Generated from protobuf enum APPROVED = 1; + */ + const APPROVED = 1; + /** + * The site has been disapproved from serving ads. + * + * Generated from protobuf enum DISAPPROVED = 2; + */ + const DISAPPROVED = 2; + /** + * The default status with which a site is created. + * + * Generated from protobuf enum DRAFT = 3; + */ + const DRAFT = 3; + /** + * The site has been deactivated and is not serving ads due to dormancy. It + * must be resubmitted for approval. + * + * Generated from protobuf enum REQUIRES_REVIEW = 4; + */ + const REQUIRES_REVIEW = 4; + /** + * Once the site is submitted for approval, its status changes from draft to + * unchecked. It will be reviwed with an estimated turn-around time of 24h. + * Such a site cannot serve ads. + * + * Generated from protobuf enum UNCHECKED = 5; + */ + const UNCHECKED = 5; + + private static $valueToName = [ + self::SITE_APPROVAL_STATUS_UNSPECIFIED => 'SITE_APPROVAL_STATUS_UNSPECIFIED', + self::APPROVED => 'APPROVED', + self::DISAPPROVED => 'DISAPPROVED', + self::DRAFT => 'DRAFT', + self::REQUIRES_REVIEW => 'REQUIRES_REVIEW', + self::UNCHECKED => 'UNCHECKED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/SiteDisapprovalReasonEnum.php b/AdsAdManager/src/V1/SiteDisapprovalReasonEnum.php new file mode 100644 index 000000000000..e23f34c3341b --- /dev/null +++ b/AdsAdManager/src/V1/SiteDisapprovalReasonEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.SiteDisapprovalReasonEnum + */ +class SiteDisapprovalReasonEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/SiteDisapprovalReasonEnum/SiteDisapprovalReason.php b/AdsAdManager/src/V1/SiteDisapprovalReasonEnum/SiteDisapprovalReason.php new file mode 100644 index 000000000000..bdf2526e55e1 --- /dev/null +++ b/AdsAdManager/src/V1/SiteDisapprovalReasonEnum/SiteDisapprovalReason.php @@ -0,0 +1,69 @@ +google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason + */ +class SiteDisapprovalReason +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum SITE_DISAPPROVAL_REASON_UNSPECIFIED = 0; + */ + const SITE_DISAPPROVAL_REASON_UNSPECIFIED = 0; + /** + * The site has content that violates policy. + * + * Generated from protobuf enum CONTENT = 1; + */ + const CONTENT = 1; + /** + * Generic error type. + * + * Generated from protobuf enum OTHER = 2; + */ + const OTHER = 2; + /** + * The parent must be an authorized seller of the child network's inventory. + * + * Generated from protobuf enum OWNERSHIP = 3; + */ + const OWNERSHIP = 3; + + private static $valueToName = [ + self::SITE_DISAPPROVAL_REASON_UNSPECIFIED => 'SITE_DISAPPROVAL_REASON_UNSPECIFIED', + self::CONTENT => 'CONTENT', + self::OTHER => 'OTHER', + self::OWNERSHIP => 'OWNERSHIP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/Targeting.php b/AdsAdManager/src/V1/Targeting.php index 481f4e84b32e..a748cbe66f7a 100644 --- a/AdsAdManager/src/V1/Targeting.php +++ b/AdsAdManager/src/V1/Targeting.php @@ -64,6 +64,18 @@ class Targeting extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.ads.admanager.v1.DataSegmentTargeting data_segment_targeting = 13 [(.google.api.field_behavior) = OPTIONAL]; */ protected $data_segment_targeting = null; + /** + * Optional. Used to target content. + * + * Generated from protobuf field .google.ads.admanager.v1.ContentTargeting content_targeting = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $content_targeting = null; + /** + * Optional. Used to target mobile applications. + * + * Generated from protobuf field .google.ads.admanager.v1.MobileApplicationTargeting mobile_application_targeting = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mobile_application_targeting = null; /** * Constructor. @@ -88,6 +100,10 @@ class Targeting extends \Google\Protobuf\Internal\Message * Optional. Used to target video positions. * @type \Google\Ads\AdManager\V1\DataSegmentTargeting $data_segment_targeting * Optional. Used to target data segments. + * @type \Google\Ads\AdManager\V1\ContentTargeting $content_targeting + * Optional. Used to target content. + * @type \Google\Ads\AdManager\V1\MobileApplicationTargeting $mobile_application_targeting + * Optional. Used to target mobile applications. * } */ public function __construct($data = NULL) { @@ -385,5 +401,77 @@ public function setDataSegmentTargeting($var) return $this; } + /** + * Optional. Used to target content. + * + * Generated from protobuf field .google.ads.admanager.v1.ContentTargeting content_targeting = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\ContentTargeting|null + */ + public function getContentTargeting() + { + return $this->content_targeting; + } + + public function hasContentTargeting() + { + return isset($this->content_targeting); + } + + public function clearContentTargeting() + { + unset($this->content_targeting); + } + + /** + * Optional. Used to target content. + * + * Generated from protobuf field .google.ads.admanager.v1.ContentTargeting content_targeting = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\ContentTargeting $var + * @return $this + */ + public function setContentTargeting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ContentTargeting::class); + $this->content_targeting = $var; + + return $this; + } + + /** + * Optional. Used to target mobile applications. + * + * Generated from protobuf field .google.ads.admanager.v1.MobileApplicationTargeting mobile_application_targeting = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\MobileApplicationTargeting|null + */ + public function getMobileApplicationTargeting() + { + return $this->mobile_application_targeting; + } + + public function hasMobileApplicationTargeting() + { + return isset($this->mobile_application_targeting); + } + + public function clearMobileApplicationTargeting() + { + unset($this->mobile_application_targeting); + } + + /** + * Optional. Used to target mobile applications. + * + * Generated from protobuf field .google.ads.admanager.v1.MobileApplicationTargeting mobile_application_targeting = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\MobileApplicationTargeting $var + * @return $this + */ + public function setMobileApplicationTargeting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\MobileApplicationTargeting::class); + $this->mobile_application_targeting = $var; + + return $this; + } + } diff --git a/AdsAdManager/src/V1/TaxonomyTypeEnum/TaxonomyType.php b/AdsAdManager/src/V1/TaxonomyTypeEnum/TaxonomyType.php index e3dcd4043d54..749da57a6494 100644 --- a/AdsAdManager/src/V1/TaxonomyTypeEnum/TaxonomyType.php +++ b/AdsAdManager/src/V1/TaxonomyTypeEnum/TaxonomyType.php @@ -26,6 +26,12 @@ class TaxonomyType * Generated from protobuf enum TAXONOMY_IAB_AUDIENCE_1_1 = 3; */ const TAXONOMY_IAB_AUDIENCE_1_1 = 3; + /** + * The IAB Content Taxonomy v1.0. + * + * Generated from protobuf enum TAXONOMY_IAB_CONTENT_1_0 = 8; + */ + const TAXONOMY_IAB_CONTENT_1_0 = 8; /** * The IAB Content Taxonomy v2.1. * @@ -54,6 +60,7 @@ class TaxonomyType private static $valueToName = [ self::TAXONOMY_TYPE_UNSPECIFIED => 'TAXONOMY_TYPE_UNSPECIFIED', self::TAXONOMY_IAB_AUDIENCE_1_1 => 'TAXONOMY_IAB_AUDIENCE_1_1', + self::TAXONOMY_IAB_CONTENT_1_0 => 'TAXONOMY_IAB_CONTENT_1_0', self::TAXONOMY_IAB_CONTENT_2_1 => 'TAXONOMY_IAB_CONTENT_2_1', self::TAXONOMY_IAB_CONTENT_2_2 => 'TAXONOMY_IAB_CONTENT_2_2', self::TAXONOMY_IAB_CONTENT_3_0 => 'TAXONOMY_IAB_CONTENT_3_0', diff --git a/AdsAdManager/src/V1/Team.php b/AdsAdManager/src/V1/Team.php index 8284923b078e..a40883cd942e 100644 --- a/AdsAdManager/src/V1/Team.php +++ b/AdsAdManager/src/V1/Team.php @@ -22,6 +22,49 @@ class Team extends \Google\Protobuf\Internal\Message * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; + /** + * Required. The name of the Team. This value has a maximum length of 127 + * characters. + * + * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = null; + /** + * Optional. The description of the Team. This value has a maximum length of + * 255 characters. + * + * Generated from protobuf field optional string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = null; + /** + * Output only. The status of the Team. This value determines the visibility + * of the team in the UI. + * + * Generated from protobuf field optional .google.ads.admanager.v1.TeamStatusEnum.TeamStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * Optional. Whether or not users on this team have access to all companies. + * If this value is true, then an error will be thrown if an attempt is made + * to associate this team with a Company. + * + * Generated from protobuf field optional bool all_companies_access = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $all_companies_access = null; + /** + * Optional. Whether or not users on this team have access to all inventory. + * If this value is true, then an error will be thrown if an attempt is made + * to associate this team with an AdUnit. + * + * Generated from protobuf field optional bool all_inventory_access = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $all_inventory_access = null; + /** + * Optional. The default access to orders for users on this team. + * + * Generated from protobuf field optional .google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType access_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $access_type = null; /** * Constructor. @@ -32,6 +75,25 @@ class Team extends \Google\Protobuf\Internal\Message * @type string $name * Identifier. The resource name of the `Team`. * Format: `networks/{network_code}/teams/{team_id}` + * @type string $display_name + * Required. The name of the Team. This value has a maximum length of 127 + * characters. + * @type string $description + * Optional. The description of the Team. This value has a maximum length of + * 255 characters. + * @type int $status + * Output only. The status of the Team. This value determines the visibility + * of the team in the UI. + * @type bool $all_companies_access + * Optional. Whether or not users on this team have access to all companies. + * If this value is true, then an error will be thrown if an attempt is made + * to associate this team with a Company. + * @type bool $all_inventory_access + * Optional. Whether or not users on this team have access to all inventory. + * If this value is true, then an error will be thrown if an attempt is made + * to associate this team with an AdUnit. + * @type int $access_type + * Optional. The default access to orders for users on this team. * } */ public function __construct($data = NULL) { @@ -67,5 +129,235 @@ public function setName($var) return $this; } + /** + * Required. The name of the Team. This value has a maximum length of 127 + * characters. + * + * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Required. The name of the Team. This value has a maximum length of 127 + * characters. + * + * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. The description of the Team. This value has a maximum length of + * 255 characters. + * + * Generated from protobuf field optional string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * Optional. The description of the Team. This value has a maximum length of + * 255 characters. + * + * Generated from protobuf field optional string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The status of the Team. This value determines the visibility + * of the team in the UI. + * + * Generated from protobuf field optional .google.ads.admanager.v1.TeamStatusEnum.TeamStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return isset($this->status) ? $this->status : 0; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. The status of the Team. This value determines the visibility + * of the team in the UI. + * + * Generated from protobuf field optional .google.ads.admanager.v1.TeamStatusEnum.TeamStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\TeamStatusEnum\TeamStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Optional. Whether or not users on this team have access to all companies. + * If this value is true, then an error will be thrown if an attempt is made + * to associate this team with a Company. + * + * Generated from protobuf field optional bool all_companies_access = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllCompaniesAccess() + { + return isset($this->all_companies_access) ? $this->all_companies_access : false; + } + + public function hasAllCompaniesAccess() + { + return isset($this->all_companies_access); + } + + public function clearAllCompaniesAccess() + { + unset($this->all_companies_access); + } + + /** + * Optional. Whether or not users on this team have access to all companies. + * If this value is true, then an error will be thrown if an attempt is made + * to associate this team with a Company. + * + * Generated from protobuf field optional bool all_companies_access = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllCompaniesAccess($var) + { + GPBUtil::checkBool($var); + $this->all_companies_access = $var; + + return $this; + } + + /** + * Optional. Whether or not users on this team have access to all inventory. + * If this value is true, then an error will be thrown if an attempt is made + * to associate this team with an AdUnit. + * + * Generated from protobuf field optional bool all_inventory_access = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllInventoryAccess() + { + return isset($this->all_inventory_access) ? $this->all_inventory_access : false; + } + + public function hasAllInventoryAccess() + { + return isset($this->all_inventory_access); + } + + public function clearAllInventoryAccess() + { + unset($this->all_inventory_access); + } + + /** + * Optional. Whether or not users on this team have access to all inventory. + * If this value is true, then an error will be thrown if an attempt is made + * to associate this team with an AdUnit. + * + * Generated from protobuf field optional bool all_inventory_access = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllInventoryAccess($var) + { + GPBUtil::checkBool($var); + $this->all_inventory_access = $var; + + return $this; + } + + /** + * Optional. The default access to orders for users on this team. + * + * Generated from protobuf field optional .google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType access_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAccessType() + { + return isset($this->access_type) ? $this->access_type : 0; + } + + public function hasAccessType() + { + return isset($this->access_type); + } + + public function clearAccessType() + { + unset($this->access_type); + } + + /** + * Optional. The default access to orders for users on this team. + * + * Generated from protobuf field optional .google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType access_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAccessType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\TeamAccessTypeEnum\TeamAccessType::class); + $this->access_type = $var; + + return $this; + } + } diff --git a/AdsAdManager/src/V1/TeamAccessTypeEnum.php b/AdsAdManager/src/V1/TeamAccessTypeEnum.php new file mode 100644 index 000000000000..c8d713303e5c --- /dev/null +++ b/AdsAdManager/src/V1/TeamAccessTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.TeamAccessTypeEnum + */ +class TeamAccessTypeEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/TeamAccessTypeEnum/TeamAccessType.php b/AdsAdManager/src/V1/TeamAccessTypeEnum/TeamAccessType.php new file mode 100644 index 000000000000..56b283aad163 --- /dev/null +++ b/AdsAdManager/src/V1/TeamAccessTypeEnum/TeamAccessType.php @@ -0,0 +1,71 @@ +google.ads.admanager.v1.TeamAccessTypeEnum.TeamAccessType + */ +class TeamAccessType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum TEAM_ACCESS_TYPE_UNSPECIFIED = 0; + */ + const TEAM_ACCESS_TYPE_UNSPECIFIED = 0; + /** + * The level of access in which team members can't view or edit a team's + * orders. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * The level of access in which team members can only view a team's orders. + * + * Generated from protobuf enum READ_ONLY = 2; + */ + const READ_ONLY = 2; + /** + * The level of access in which team members can view and edit a team's + * orders. + * + * Generated from protobuf enum READ_WRITE = 3; + */ + const READ_WRITE = 3; + + private static $valueToName = [ + self::TEAM_ACCESS_TYPE_UNSPECIFIED => 'TEAM_ACCESS_TYPE_UNSPECIFIED', + self::NONE => 'NONE', + self::READ_ONLY => 'READ_ONLY', + self::READ_WRITE => 'READ_WRITE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/TeamStatusEnum.php b/AdsAdManager/src/V1/TeamStatusEnum.php new file mode 100644 index 000000000000..1f4120cc50b4 --- /dev/null +++ b/AdsAdManager/src/V1/TeamStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.TeamStatusEnum + */ +class TeamStatusEnum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/TeamStatusEnum/TeamStatus.php b/AdsAdManager/src/V1/TeamStatusEnum/TeamStatus.php new file mode 100644 index 000000000000..d1523dd4b412 --- /dev/null +++ b/AdsAdManager/src/V1/TeamStatusEnum/TeamStatus.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.TeamStatusEnum.TeamStatus + */ +class TeamStatus +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum TEAM_STATUS_UNSPECIFIED = 0; + */ + const TEAM_STATUS_UNSPECIFIED = 0; + /** + * The status of an active team. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The status of an inactive team. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + + private static $valueToName = [ + self::TEAM_STATUS_UNSPECIFIED => 'TEAM_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AdsAdManager/src/V1/TechnologyTargeting.php b/AdsAdManager/src/V1/TechnologyTargeting.php index afc31e96ba93..fdb77af49595 100644 --- a/AdsAdManager/src/V1/TechnologyTargeting.php +++ b/AdsAdManager/src/V1/TechnologyTargeting.php @@ -22,12 +22,42 @@ class TechnologyTargeting extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.ads.admanager.v1.BandwidthTargeting bandwidth_targeting = 3 [(.google.api.field_behavior) = OPTIONAL]; */ protected $bandwidth_targeting = null; + /** + * Optional. Browser targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.BrowserTargeting browser_targeting = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $browser_targeting = null; + /** + * Optional. Browser language targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.BrowserLanguageTargeting browser_language_targeting = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $browser_language_targeting = null; + /** + * Optional. Device capability targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.DeviceCapabilityTargeting device_capability_targeting = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $device_capability_targeting = null; /** * Optional. Device category targeting dimension. * * Generated from protobuf field .google.ads.admanager.v1.DeviceCategoryTargeting device_category_targeting = 1 [(.google.api.field_behavior) = OPTIONAL]; */ protected $device_category_targeting = null; + /** + * Optional. Device manufacturer targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.DeviceManufacturerTargeting device_manufacturer_targeting = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $device_manufacturer_targeting = null; + /** + * Optional. Mobile carrier targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.MobileCarrierTargeting mobile_carrier_targeting = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mobile_carrier_targeting = null; /** * Optional. Operating system targeting dimension. * @@ -43,8 +73,18 @@ class TechnologyTargeting extends \Google\Protobuf\Internal\Message * * @type \Google\Ads\AdManager\V1\BandwidthTargeting $bandwidth_targeting * Optional. Bandwidth targeting dimension. + * @type \Google\Ads\AdManager\V1\BrowserTargeting $browser_targeting + * Optional. Browser targeting dimension. + * @type \Google\Ads\AdManager\V1\BrowserLanguageTargeting $browser_language_targeting + * Optional. Browser language targeting dimension. + * @type \Google\Ads\AdManager\V1\DeviceCapabilityTargeting $device_capability_targeting + * Optional. Device capability targeting dimension. * @type \Google\Ads\AdManager\V1\DeviceCategoryTargeting $device_category_targeting * Optional. Device category targeting dimension. + * @type \Google\Ads\AdManager\V1\DeviceManufacturerTargeting $device_manufacturer_targeting + * Optional. Device manufacturer targeting dimension. + * @type \Google\Ads\AdManager\V1\MobileCarrierTargeting $mobile_carrier_targeting + * Optional. Mobile carrier targeting dimension. * @type \Google\Ads\AdManager\V1\OperatingSystemTargeting $operating_system_targeting * Optional. Operating system targeting dimension. * } @@ -90,6 +130,114 @@ public function setBandwidthTargeting($var) return $this; } + /** + * Optional. Browser targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.BrowserTargeting browser_targeting = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\BrowserTargeting|null + */ + public function getBrowserTargeting() + { + return $this->browser_targeting; + } + + public function hasBrowserTargeting() + { + return isset($this->browser_targeting); + } + + public function clearBrowserTargeting() + { + unset($this->browser_targeting); + } + + /** + * Optional. Browser targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.BrowserTargeting browser_targeting = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\BrowserTargeting $var + * @return $this + */ + public function setBrowserTargeting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\BrowserTargeting::class); + $this->browser_targeting = $var; + + return $this; + } + + /** + * Optional. Browser language targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.BrowserLanguageTargeting browser_language_targeting = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\BrowserLanguageTargeting|null + */ + public function getBrowserLanguageTargeting() + { + return $this->browser_language_targeting; + } + + public function hasBrowserLanguageTargeting() + { + return isset($this->browser_language_targeting); + } + + public function clearBrowserLanguageTargeting() + { + unset($this->browser_language_targeting); + } + + /** + * Optional. Browser language targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.BrowserLanguageTargeting browser_language_targeting = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\BrowserLanguageTargeting $var + * @return $this + */ + public function setBrowserLanguageTargeting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\BrowserLanguageTargeting::class); + $this->browser_language_targeting = $var; + + return $this; + } + + /** + * Optional. Device capability targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.DeviceCapabilityTargeting device_capability_targeting = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\DeviceCapabilityTargeting|null + */ + public function getDeviceCapabilityTargeting() + { + return $this->device_capability_targeting; + } + + public function hasDeviceCapabilityTargeting() + { + return isset($this->device_capability_targeting); + } + + public function clearDeviceCapabilityTargeting() + { + unset($this->device_capability_targeting); + } + + /** + * Optional. Device capability targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.DeviceCapabilityTargeting device_capability_targeting = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\DeviceCapabilityTargeting $var + * @return $this + */ + public function setDeviceCapabilityTargeting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\DeviceCapabilityTargeting::class); + $this->device_capability_targeting = $var; + + return $this; + } + /** * Optional. Device category targeting dimension. * @@ -126,6 +274,78 @@ public function setDeviceCategoryTargeting($var) return $this; } + /** + * Optional. Device manufacturer targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.DeviceManufacturerTargeting device_manufacturer_targeting = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\DeviceManufacturerTargeting|null + */ + public function getDeviceManufacturerTargeting() + { + return $this->device_manufacturer_targeting; + } + + public function hasDeviceManufacturerTargeting() + { + return isset($this->device_manufacturer_targeting); + } + + public function clearDeviceManufacturerTargeting() + { + unset($this->device_manufacturer_targeting); + } + + /** + * Optional. Device manufacturer targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.DeviceManufacturerTargeting device_manufacturer_targeting = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\DeviceManufacturerTargeting $var + * @return $this + */ + public function setDeviceManufacturerTargeting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\DeviceManufacturerTargeting::class); + $this->device_manufacturer_targeting = $var; + + return $this; + } + + /** + * Optional. Mobile carrier targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.MobileCarrierTargeting mobile_carrier_targeting = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\MobileCarrierTargeting|null + */ + public function getMobileCarrierTargeting() + { + return $this->mobile_carrier_targeting; + } + + public function hasMobileCarrierTargeting() + { + return isset($this->mobile_carrier_targeting); + } + + public function clearMobileCarrierTargeting() + { + unset($this->mobile_carrier_targeting); + } + + /** + * Optional. Mobile carrier targeting dimension. + * + * Generated from protobuf field .google.ads.admanager.v1.MobileCarrierTargeting mobile_carrier_targeting = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\MobileCarrierTargeting $var + * @return $this + */ + public function setMobileCarrierTargeting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\MobileCarrierTargeting::class); + $this->mobile_carrier_targeting = $var; + + return $this; + } + /** * Optional. Operating system targeting dimension. * diff --git a/AdsAdManager/src/V1/UpdateContactRequest.php b/AdsAdManager/src/V1/UpdateContactRequest.php new file mode 100644 index 000000000000..e7e0c5edc59b --- /dev/null +++ b/AdsAdManager/src/V1/UpdateContactRequest.php @@ -0,0 +1,142 @@ +google.ads.admanager.v1.UpdateContactRequest + */ +class UpdateContactRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Contact` to update. + * The `Contact`'s `name` is used to identify the `Contact` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Contact contact = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $contact = null; + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Ads\AdManager\V1\Contact $contact Required. The `Contact` to update. + * + * The `Contact`'s `name` is used to identify the `Contact` to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. + * + * @return \Google\Ads\AdManager\V1\UpdateContactRequest + * + * @experimental + */ + public static function build(\Google\Ads\AdManager\V1\Contact $contact, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setContact($contact) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Contact $contact + * Required. The `Contact` to update. + * The `Contact`'s `name` is used to identify the `Contact` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ContactService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Contact` to update. + * The `Contact`'s `name` is used to identify the `Contact` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Contact contact = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Contact|null + */ + public function getContact() + { + return $this->contact; + } + + public function hasContact() + { + return isset($this->contact); + } + + public function clearContact() + { + unset($this->contact); + } + + /** + * Required. The `Contact` to update. + * The `Contact`'s `name` is used to identify the `Contact` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Contact contact = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Contact $var + * @return $this + */ + public function setContact($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Contact::class); + $this->contact = $var; + + return $this; + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/UpdateCustomFieldRequest.php b/AdsAdManager/src/V1/UpdateCustomFieldRequest.php new file mode 100644 index 000000000000..01d31346566a --- /dev/null +++ b/AdsAdManager/src/V1/UpdateCustomFieldRequest.php @@ -0,0 +1,142 @@ +google.ads.admanager.v1.UpdateCustomFieldRequest + */ +class UpdateCustomFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `CustomField` to update. + * The `CustomField`'s `name` is used to identify the `CustomField` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomField custom_field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $custom_field = null; + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Ads\AdManager\V1\CustomField $customField Required. The `CustomField` to update. + * + * The `CustomField`'s `name` is used to identify the `CustomField` to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. + * + * @return \Google\Ads\AdManager\V1\UpdateCustomFieldRequest + * + * @experimental + */ + public static function build(\Google\Ads\AdManager\V1\CustomField $customField, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCustomField($customField) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\CustomField $custom_field + * Required. The `CustomField` to update. + * The `CustomField`'s `name` is used to identify the `CustomField` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `CustomField` to update. + * The `CustomField`'s `name` is used to identify the `CustomField` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomField custom_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\CustomField|null + */ + public function getCustomField() + { + return $this->custom_field; + } + + public function hasCustomField() + { + return isset($this->custom_field); + } + + public function clearCustomField() + { + unset($this->custom_field); + } + + /** + * Required. The `CustomField` to update. + * The `CustomField`'s `name` is used to identify the `CustomField` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.CustomField custom_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\CustomField $var + * @return $this + */ + public function setCustomField($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CustomField::class); + $this->custom_field = $var; + + return $this; + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/UpdatePlacementRequest.php b/AdsAdManager/src/V1/UpdatePlacementRequest.php new file mode 100644 index 000000000000..758e615a794d --- /dev/null +++ b/AdsAdManager/src/V1/UpdatePlacementRequest.php @@ -0,0 +1,152 @@ +google.ads.admanager.v1.UpdatePlacementRequest + */ +class UpdatePlacementRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Placement` to update. + * The `Placement`'s name is used to identify the `Placement` to + * update. Format: + * `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field .google.ads.admanager.v1.Placement placement = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $placement = null; + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Ads\AdManager\V1\Placement $placement Required. The `Placement` to update. + * + * The `Placement`'s name is used to identify the `Placement` to + * update. Format: + * `networks/{network_code}/placements/{placement_id}` + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. + * + * @return \Google\Ads\AdManager\V1\UpdatePlacementRequest + * + * @experimental + */ + public static function build(\Google\Ads\AdManager\V1\Placement $placement, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPlacement($placement) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Placement $placement + * Required. The `Placement` to update. + * The `Placement`'s name is used to identify the `Placement` to + * update. Format: + * `networks/{network_code}/placements/{placement_id}` + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\PlacementService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Placement` to update. + * The `Placement`'s name is used to identify the `Placement` to + * update. Format: + * `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field .google.ads.admanager.v1.Placement placement = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Placement|null + */ + public function getPlacement() + { + return $this->placement; + } + + public function hasPlacement() + { + return isset($this->placement); + } + + public function clearPlacement() + { + unset($this->placement); + } + + /** + * Required. The `Placement` to update. + * The `Placement`'s name is used to identify the `Placement` to + * update. Format: + * `networks/{network_code}/placements/{placement_id}` + * + * Generated from protobuf field .google.ads.admanager.v1.Placement placement = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Placement $var + * @return $this + */ + public function setPlacement($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Placement::class); + $this->placement = $var; + + return $this; + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/UpdateSiteRequest.php b/AdsAdManager/src/V1/UpdateSiteRequest.php new file mode 100644 index 000000000000..1b4e512d03d0 --- /dev/null +++ b/AdsAdManager/src/V1/UpdateSiteRequest.php @@ -0,0 +1,142 @@ +google.ads.admanager.v1.UpdateSiteRequest + */ +class UpdateSiteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Site` to update. + * The `Site`'s `name` is used to identify the `Site` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Site site = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $site = null; + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Ads\AdManager\V1\Site $site Required. The `Site` to update. + * + * The `Site`'s `name` is used to identify the `Site` to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. + * + * @return \Google\Ads\AdManager\V1\UpdateSiteRequest + * + * @experimental + */ + public static function build(\Google\Ads\AdManager\V1\Site $site, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSite($site) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Site $site + * Required. The `Site` to update. + * The `Site`'s `name` is used to identify the `Site` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SiteService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Site` to update. + * The `Site`'s `name` is used to identify the `Site` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Site site = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Site|null + */ + public function getSite() + { + return $this->site; + } + + public function hasSite() + { + return isset($this->site); + } + + public function clearSite() + { + unset($this->site); + } + + /** + * Required. The `Site` to update. + * The `Site`'s `name` is used to identify the `Site` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Site site = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Site $var + * @return $this + */ + public function setSite($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Site::class); + $this->site = $var; + + return $this; + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/UpdateTeamRequest.php b/AdsAdManager/src/V1/UpdateTeamRequest.php new file mode 100644 index 000000000000..b739d1d9593d --- /dev/null +++ b/AdsAdManager/src/V1/UpdateTeamRequest.php @@ -0,0 +1,142 @@ +google.ads.admanager.v1.UpdateTeamRequest + */ +class UpdateTeamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Team` to update. + * The `Team`'s `name` is used to identify the `Team` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Team team = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $team = null; + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Ads\AdManager\V1\Team $team Required. The `Team` to update. + * + * The `Team`'s `name` is used to identify the `Team` to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. + * + * @return \Google\Ads\AdManager\V1\UpdateTeamRequest + * + * @experimental + */ + public static function build(\Google\Ads\AdManager\V1\Team $team, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTeam($team) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Team $team + * Required. The `Team` to update. + * The `Team`'s `name` is used to identify the `Team` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TeamService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Team` to update. + * The `Team`'s `name` is used to identify the `Team` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Team team = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Team|null + */ + public function getTeam() + { + return $this->team; + } + + public function hasTeam() + { + return isset($this->team); + } + + public function clearTeam() + { + unset($this->team); + } + + /** + * Required. The `Team` to update. + * The `Team`'s `name` is used to identify the `Team` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Team team = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Team $var + * @return $this + */ + public function setTeam($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Team::class); + $this->team = $var; + + return $this; + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/WebProperty.php b/AdsAdManager/src/V1/WebProperty.php new file mode 100644 index 000000000000..1408c29ff4d8 --- /dev/null +++ b/AdsAdManager/src/V1/WebProperty.php @@ -0,0 +1,177 @@ +google.ads.admanager.v1.WebProperty + */ +class WebProperty extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the WebProperty. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The `WebProperty` code. + * + * Generated from protobuf field string web_property_code = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $web_property_code = ''; + /** + * Required. The ExchangeSyndicationProduct associated with this WebProperty. + * + * Generated from protobuf field .google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $product_type = 0; + /** + * Optional. The `WebProperty` ID. + * + * Generated from protobuf field int64 web_property_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $web_property_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the WebProperty. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}` + * @type string $web_property_code + * Required. The `WebProperty` code. + * @type int $product_type + * Required. The ExchangeSyndicationProduct associated with this WebProperty. + * @type int|string $web_property_id + * Optional. The `WebProperty` ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\WebProperty::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the WebProperty. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the WebProperty. + * Format: + * `networks/{network_code}/webProperties/{web_property_code}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The `WebProperty` code. + * + * Generated from protobuf field string web_property_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getWebPropertyCode() + { + return $this->web_property_code; + } + + /** + * Required. The `WebProperty` code. + * + * Generated from protobuf field string web_property_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setWebPropertyCode($var) + { + GPBUtil::checkString($var, True); + $this->web_property_code = $var; + + return $this; + } + + /** + * Required. The ExchangeSyndicationProduct associated with this WebProperty. + * + * Generated from protobuf field .google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getProductType() + { + return $this->product_type; + } + + /** + * Required. The ExchangeSyndicationProduct associated with this WebProperty. + * + * Generated from protobuf field .google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setProductType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ExchangeSyndicationProductEnum\ExchangeSyndicationProduct::class); + $this->product_type = $var; + + return $this; + } + + /** + * Optional. The `WebProperty` ID. + * + * Generated from protobuf field int64 web_property_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getWebPropertyId() + { + return $this->web_property_id; + } + + /** + * Optional. The `WebProperty` ID. + * + * Generated from protobuf field int64 web_property_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setWebPropertyId($var) + { + GPBUtil::checkInt64($var); + $this->web_property_id = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/gapic_metadata.json b/AdsAdManager/src/V1/gapic_metadata.json index 77e50abbdb6a..d1e0f2196cde 100644 --- a/AdsAdManager/src/V1/gapic_metadata.json +++ b/AdsAdManager/src/V1/gapic_metadata.json @@ -39,6 +39,30 @@ } } }, + "AdReviewCenterAdService": { + "clients": { + "grpc": { + "libraryClient": "AdReviewCenterAdServiceGapicClient", + "rpcs": { + "BatchAllowAdReviewCenterAds": { + "methods": [ + "batchAllowAdReviewCenterAds" + ] + }, + "BatchBlockAdReviewCenterAds": { + "methods": [ + "batchBlockAdReviewCenterAds" + ] + }, + "SearchAdReviewCenterAds": { + "methods": [ + "searchAdReviewCenterAds" + ] + } + } + } + } + }, "AdUnitService": { "clients": { "grpc": { @@ -63,6 +87,44 @@ } } }, + "ApplicationService": { + "clients": { + "grpc": { + "libraryClient": "ApplicationServiceGapicClient", + "rpcs": { + "GetApplication": { + "methods": [ + "getApplication" + ] + }, + "ListApplications": { + "methods": [ + "listApplications" + ] + } + } + } + } + }, + "AudienceSegmentService": { + "clients": { + "grpc": { + "libraryClient": "AudienceSegmentServiceGapicClient", + "rpcs": { + "GetAudienceSegment": { + "methods": [ + "getAudienceSegment" + ] + }, + "ListAudienceSegments": { + "methods": [ + "listAudienceSegments" + ] + } + } + } + } + }, "BandwidthGroupService": { "clients": { "grpc": { @@ -82,6 +144,82 @@ } } }, + "BrowserLanguageService": { + "clients": { + "grpc": { + "libraryClient": "BrowserLanguageServiceGapicClient", + "rpcs": { + "GetBrowserLanguage": { + "methods": [ + "getBrowserLanguage" + ] + }, + "ListBrowserLanguages": { + "methods": [ + "listBrowserLanguages" + ] + } + } + } + } + }, + "BrowserService": { + "clients": { + "grpc": { + "libraryClient": "BrowserServiceGapicClient", + "rpcs": { + "GetBrowser": { + "methods": [ + "getBrowser" + ] + }, + "ListBrowsers": { + "methods": [ + "listBrowsers" + ] + } + } + } + } + }, + "CmsMetadataKeyService": { + "clients": { + "grpc": { + "libraryClient": "CmsMetadataKeyServiceGapicClient", + "rpcs": { + "GetCmsMetadataKey": { + "methods": [ + "getCmsMetadataKey" + ] + }, + "ListCmsMetadataKeys": { + "methods": [ + "listCmsMetadataKeys" + ] + } + } + } + } + }, + "CmsMetadataValueService": { + "clients": { + "grpc": { + "libraryClient": "CmsMetadataValueServiceGapicClient", + "rpcs": { + "GetCmsMetadataValue": { + "methods": [ + "getCmsMetadataValue" + ] + }, + "ListCmsMetadataValues": { + "methods": [ + "listCmsMetadataValues" + ] + } + } + } + } + }, "CompanyService": { "clients": { "grpc": { @@ -101,11 +239,151 @@ } } }, + "ContactService": { + "clients": { + "grpc": { + "libraryClient": "ContactServiceGapicClient", + "rpcs": { + "BatchCreateContacts": { + "methods": [ + "batchCreateContacts" + ] + }, + "BatchUpdateContacts": { + "methods": [ + "batchUpdateContacts" + ] + }, + "CreateContact": { + "methods": [ + "createContact" + ] + }, + "GetContact": { + "methods": [ + "getContact" + ] + }, + "ListContacts": { + "methods": [ + "listContacts" + ] + }, + "UpdateContact": { + "methods": [ + "updateContact" + ] + } + } + } + } + }, + "ContentBundleService": { + "clients": { + "grpc": { + "libraryClient": "ContentBundleServiceGapicClient", + "rpcs": { + "GetContentBundle": { + "methods": [ + "getContentBundle" + ] + }, + "ListContentBundles": { + "methods": [ + "listContentBundles" + ] + } + } + } + } + }, + "ContentLabelService": { + "clients": { + "grpc": { + "libraryClient": "ContentLabelServiceGapicClient", + "rpcs": { + "GetContentLabel": { + "methods": [ + "getContentLabel" + ] + }, + "ListContentLabels": { + "methods": [ + "listContentLabels" + ] + } + } + } + } + }, + "ContentService": { + "clients": { + "grpc": { + "libraryClient": "ContentServiceGapicClient", + "rpcs": { + "GetContent": { + "methods": [ + "getContent" + ] + }, + "ListContent": { + "methods": [ + "listContent" + ] + } + } + } + } + }, + "CreativeTemplateService": { + "clients": { + "grpc": { + "libraryClient": "CreativeTemplateServiceGapicClient", + "rpcs": { + "GetCreativeTemplate": { + "methods": [ + "getCreativeTemplate" + ] + }, + "ListCreativeTemplates": { + "methods": [ + "listCreativeTemplates" + ] + } + } + } + } + }, "CustomFieldService": { "clients": { "grpc": { "libraryClient": "CustomFieldServiceGapicClient", "rpcs": { + "BatchActivateCustomFields": { + "methods": [ + "batchActivateCustomFields" + ] + }, + "BatchCreateCustomFields": { + "methods": [ + "batchCreateCustomFields" + ] + }, + "BatchDeactivateCustomFields": { + "methods": [ + "batchDeactivateCustomFields" + ] + }, + "BatchUpdateCustomFields": { + "methods": [ + "batchUpdateCustomFields" + ] + }, + "CreateCustomField": { + "methods": [ + "createCustomField" + ] + }, "GetCustomField": { "methods": [ "getCustomField" @@ -115,6 +393,11 @@ "methods": [ "listCustomFields" ] + }, + "UpdateCustomField": { + "methods": [ + "updateCustomField" + ] } } } @@ -158,6 +441,25 @@ } } }, + "DeviceCapabilityService": { + "clients": { + "grpc": { + "libraryClient": "DeviceCapabilityServiceGapicClient", + "rpcs": { + "GetDeviceCapability": { + "methods": [ + "getDeviceCapability" + ] + }, + "ListDeviceCapabilities": { + "methods": [ + "listDeviceCapabilities" + ] + } + } + } + } + }, "DeviceCategoryService": { "clients": { "grpc": { @@ -177,6 +479,25 @@ } } }, + "DeviceManufacturerService": { + "clients": { + "grpc": { + "libraryClient": "DeviceManufacturerServiceGapicClient", + "rpcs": { + "GetDeviceManufacturer": { + "methods": [ + "getDeviceManufacturer" + ] + }, + "ListDeviceManufacturers": { + "methods": [ + "listDeviceManufacturers" + ] + } + } + } + } + }, "EntitySignalsMappingService": { "clients": { "grpc": { @@ -235,6 +556,63 @@ } } }, + "MobileCarrierService": { + "clients": { + "grpc": { + "libraryClient": "MobileCarrierServiceGapicClient", + "rpcs": { + "GetMobileCarrier": { + "methods": [ + "getMobileCarrier" + ] + }, + "ListMobileCarriers": { + "methods": [ + "listMobileCarriers" + ] + } + } + } + } + }, + "MobileDeviceService": { + "clients": { + "grpc": { + "libraryClient": "MobileDeviceServiceGapicClient", + "rpcs": { + "GetMobileDevice": { + "methods": [ + "getMobileDevice" + ] + }, + "ListMobileDevices": { + "methods": [ + "listMobileDevices" + ] + } + } + } + } + }, + "MobileDeviceSubmodelService": { + "clients": { + "grpc": { + "libraryClient": "MobileDeviceSubmodelServiceGapicClient", + "rpcs": { + "GetMobileDeviceSubmodel": { + "methods": [ + "getMobileDeviceSubmodel" + ] + }, + "ListMobileDeviceSubmodels": { + "methods": [ + "listMobileDeviceSubmodels" + ] + } + } + } + } + }, "NetworkService": { "clients": { "grpc": { @@ -316,6 +694,36 @@ "grpc": { "libraryClient": "PlacementServiceGapicClient", "rpcs": { + "BatchActivatePlacements": { + "methods": [ + "batchActivatePlacements" + ] + }, + "BatchArchivePlacements": { + "methods": [ + "batchArchivePlacements" + ] + }, + "BatchCreatePlacements": { + "methods": [ + "batchCreatePlacements" + ] + }, + "BatchDeactivatePlacements": { + "methods": [ + "batchDeactivatePlacements" + ] + }, + "BatchUpdatePlacements": { + "methods": [ + "batchUpdatePlacements" + ] + }, + "CreatePlacement": { + "methods": [ + "createPlacement" + ] + }, "GetPlacement": { "methods": [ "getPlacement" @@ -325,6 +733,11 @@ "methods": [ "listPlacements" ] + }, + "UpdatePlacement": { + "methods": [ + "updatePlacement" + ] } } } @@ -465,6 +878,55 @@ } } }, + "SiteService": { + "clients": { + "grpc": { + "libraryClient": "SiteServiceGapicClient", + "rpcs": { + "BatchCreateSites": { + "methods": [ + "batchCreateSites" + ] + }, + "BatchDeactivateSites": { + "methods": [ + "batchDeactivateSites" + ] + }, + "BatchSubmitSitesForApproval": { + "methods": [ + "batchSubmitSitesForApproval" + ] + }, + "BatchUpdateSites": { + "methods": [ + "batchUpdateSites" + ] + }, + "CreateSite": { + "methods": [ + "createSite" + ] + }, + "GetSite": { + "methods": [ + "getSite" + ] + }, + "ListSites": { + "methods": [ + "listSites" + ] + }, + "UpdateSite": { + "methods": [ + "updateSite" + ] + } + } + } + } + }, "TaxonomyCategoryService": { "clients": { "grpc": { @@ -484,6 +946,55 @@ } } }, + "TeamService": { + "clients": { + "grpc": { + "libraryClient": "TeamServiceGapicClient", + "rpcs": { + "BatchActivateTeams": { + "methods": [ + "batchActivateTeams" + ] + }, + "BatchCreateTeams": { + "methods": [ + "batchCreateTeams" + ] + }, + "BatchDeactivateTeams": { + "methods": [ + "batchDeactivateTeams" + ] + }, + "BatchUpdateTeams": { + "methods": [ + "batchUpdateTeams" + ] + }, + "CreateTeam": { + "methods": [ + "createTeam" + ] + }, + "GetTeam": { + "methods": [ + "getTeam" + ] + }, + "ListTeams": { + "methods": [ + "listTeams" + ] + }, + "UpdateTeam": { + "methods": [ + "updateTeam" + ] + } + } + } + } + }, "UserService": { "clients": { "grpc": { diff --git a/AdsAdManager/src/V1/resources/ad_review_center_ad_service_client_config.json b/AdsAdManager/src/V1/resources/ad_review_center_ad_service_client_config.json new file mode 100644 index 000000000000..c91b629a8fe7 --- /dev/null +++ b/AdsAdManager/src/V1/resources/ad_review_center_ad_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.ads.admanager.v1.AdReviewCenterAdService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "BatchAllowAdReviewCenterAds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchBlockAdReviewCenterAds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SearchAdReviewCenterAds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/ad_review_center_ad_service_descriptor_config.php b/AdsAdManager/src/V1/resources/ad_review_center_ad_service_descriptor_config.php new file mode 100644 index 000000000000..63c868cf3296 --- /dev/null +++ b/AdsAdManager/src/V1/resources/ad_review_center_ad_service_descriptor_config.php @@ -0,0 +1,90 @@ + [ + 'google.ads.admanager.v1.AdReviewCenterAdService' => [ + 'BatchAllowAdReviewCenterAds' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Ads\AdManager\V1\BatchAllowAdReviewCenterAdsResponse', + 'metadataReturnType' => '\Google\Ads\AdManager\V1\BatchAdReviewCenterAdsOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchBlockAdReviewCenterAds' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Ads\AdManager\V1\BatchBlockAdReviewCenterAdsResponse', + 'metadataReturnType' => '\Google\Ads\AdManager\V1\BatchAdReviewCenterAdsOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchAdReviewCenterAds' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAdReviewCenterAds', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\SearchAdReviewCenterAdsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'adReviewCenterAd' => 'networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}', + 'webProperty' => 'networks/{network_code}/webProperties/{web_property}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/ad_review_center_ad_service_rest_client_config.php b/AdsAdManager/src/V1/resources/ad_review_center_ad_service_rest_client_config.php new file mode 100644 index 000000000000..80f0197ccd55 --- /dev/null +++ b/AdsAdManager/src/V1/resources/ad_review_center_ad_service_rest_client_config.php @@ -0,0 +1,77 @@ + [ + 'google.ads.admanager.v1.AdReviewCenterAdService' => [ + 'BatchAllowAdReviewCenterAds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchAllow', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchBlockAdReviewCenterAds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchBlock', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchAdReviewCenterAds' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:search', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/application_service_client_config.json b/AdsAdManager/src/V1/resources/application_service_client_config.json new file mode 100644 index 000000000000..bb64e8fa9612 --- /dev/null +++ b/AdsAdManager/src/V1/resources/application_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ApplicationService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetApplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListApplications": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/application_service_descriptor_config.php b/AdsAdManager/src/V1/resources/application_service_descriptor_config.php new file mode 100644 index 000000000000..dc9b42d7a40b --- /dev/null +++ b/AdsAdManager/src/V1/resources/application_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.ApplicationService' => [ + 'GetApplication' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Application', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListApplications' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getApplications', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListApplicationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'application' => 'networks/{network_code}/applications/{application}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/application_service_rest_client_config.php b/AdsAdManager/src/V1/resources/application_service_rest_client_config.php new file mode 100644 index 000000000000..e5b05944ec30 --- /dev/null +++ b/AdsAdManager/src/V1/resources/application_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.ApplicationService' => [ + 'GetApplication' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/applications/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListApplications' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/applications', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/audience_segment_service_client_config.json b/AdsAdManager/src/V1/resources/audience_segment_service_client_config.json new file mode 100644 index 000000000000..8b6d16b3203f --- /dev/null +++ b/AdsAdManager/src/V1/resources/audience_segment_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.AudienceSegmentService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetAudienceSegment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAudienceSegments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/audience_segment_service_descriptor_config.php b/AdsAdManager/src/V1/resources/audience_segment_service_descriptor_config.php new file mode 100644 index 000000000000..9ed13d205bf2 --- /dev/null +++ b/AdsAdManager/src/V1/resources/audience_segment_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.AudienceSegmentService' => [ + 'GetAudienceSegment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\AudienceSegment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAudienceSegments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAudienceSegments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListAudienceSegmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'audienceSegment' => 'networks/{network_code}/audienceSegments/{audience_segment}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/audience_segment_service_rest_client_config.php b/AdsAdManager/src/V1/resources/audience_segment_service_rest_client_config.php new file mode 100644 index 000000000000..f25b8bfa2cbe --- /dev/null +++ b/AdsAdManager/src/V1/resources/audience_segment_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.AudienceSegmentService' => [ + 'GetAudienceSegment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/audienceSegments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAudienceSegments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/audienceSegments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/browser_language_service_client_config.json b/AdsAdManager/src/V1/resources/browser_language_service_client_config.json new file mode 100644 index 000000000000..6c787fff7d1b --- /dev/null +++ b/AdsAdManager/src/V1/resources/browser_language_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.BrowserLanguageService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetBrowserLanguage": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBrowserLanguages": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/browser_language_service_descriptor_config.php b/AdsAdManager/src/V1/resources/browser_language_service_descriptor_config.php new file mode 100644 index 000000000000..5cb94bd1e55e --- /dev/null +++ b/AdsAdManager/src/V1/resources/browser_language_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.BrowserLanguageService' => [ + 'GetBrowserLanguage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BrowserLanguage', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBrowserLanguages' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBrowserLanguages', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListBrowserLanguagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'browserLanguage' => 'networks/{network_code}/browserLanguages/{browser_language}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/browser_language_service_rest_client_config.php b/AdsAdManager/src/V1/resources/browser_language_service_rest_client_config.php new file mode 100644 index 000000000000..ba837d2362be --- /dev/null +++ b/AdsAdManager/src/V1/resources/browser_language_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.BrowserLanguageService' => [ + 'GetBrowserLanguage' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/browserLanguages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBrowserLanguages' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/browserLanguages', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/browser_service_client_config.json b/AdsAdManager/src/V1/resources/browser_service_client_config.json new file mode 100644 index 000000000000..89c46c3ac3a7 --- /dev/null +++ b/AdsAdManager/src/V1/resources/browser_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.BrowserService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetBrowser": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBrowsers": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/browser_service_descriptor_config.php b/AdsAdManager/src/V1/resources/browser_service_descriptor_config.php new file mode 100644 index 000000000000..c463f2d6aa9a --- /dev/null +++ b/AdsAdManager/src/V1/resources/browser_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.BrowserService' => [ + 'GetBrowser' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Browser', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBrowsers' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBrowsers', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListBrowsersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'browser' => 'networks/{network_code}/browsers/{browser}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/browser_service_rest_client_config.php b/AdsAdManager/src/V1/resources/browser_service_rest_client_config.php new file mode 100644 index 000000000000..cecd80b05732 --- /dev/null +++ b/AdsAdManager/src/V1/resources/browser_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.BrowserService' => [ + 'GetBrowser' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/browsers/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBrowsers' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/browsers', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/cms_metadata_key_service_client_config.json b/AdsAdManager/src/V1/resources/cms_metadata_key_service_client_config.json new file mode 100644 index 000000000000..ce722c8cfe92 --- /dev/null +++ b/AdsAdManager/src/V1/resources/cms_metadata_key_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CmsMetadataKeyService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetCmsMetadataKey": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListCmsMetadataKeys": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/cms_metadata_key_service_descriptor_config.php b/AdsAdManager/src/V1/resources/cms_metadata_key_service_descriptor_config.php new file mode 100644 index 000000000000..f8385224a189 --- /dev/null +++ b/AdsAdManager/src/V1/resources/cms_metadata_key_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.CmsMetadataKeyService' => [ + 'GetCmsMetadataKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CmsMetadataKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCmsMetadataKeys' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCmsMetadataKeys', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListCmsMetadataKeysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'cmsMetadataKey' => 'networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/cms_metadata_key_service_rest_client_config.php b/AdsAdManager/src/V1/resources/cms_metadata_key_service_rest_client_config.php new file mode 100644 index 000000000000..b505014dd953 --- /dev/null +++ b/AdsAdManager/src/V1/resources/cms_metadata_key_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.CmsMetadataKeyService' => [ + 'GetCmsMetadataKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/cmsMetadataKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCmsMetadataKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/cmsMetadataKeys', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/cms_metadata_value_service_client_config.json b/AdsAdManager/src/V1/resources/cms_metadata_value_service_client_config.json new file mode 100644 index 000000000000..faca0f996228 --- /dev/null +++ b/AdsAdManager/src/V1/resources/cms_metadata_value_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CmsMetadataValueService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetCmsMetadataValue": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListCmsMetadataValues": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/cms_metadata_value_service_descriptor_config.php b/AdsAdManager/src/V1/resources/cms_metadata_value_service_descriptor_config.php new file mode 100644 index 000000000000..877a76e63100 --- /dev/null +++ b/AdsAdManager/src/V1/resources/cms_metadata_value_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.CmsMetadataValueService' => [ + 'GetCmsMetadataValue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CmsMetadataValue', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCmsMetadataValues' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCmsMetadataValues', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListCmsMetadataValuesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'cmsMetadataValue' => 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/cms_metadata_value_service_rest_client_config.php b/AdsAdManager/src/V1/resources/cms_metadata_value_service_rest_client_config.php new file mode 100644 index 000000000000..883105fce99e --- /dev/null +++ b/AdsAdManager/src/V1/resources/cms_metadata_value_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.CmsMetadataValueService' => [ + 'GetCmsMetadataValue' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/cmsMetadataValues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCmsMetadataValues' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/cmsMetadataValues', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/contact_service_client_config.json b/AdsAdManager/src/V1/resources/contact_service_client_config.json new file mode 100644 index 000000000000..44bd6387f3bd --- /dev/null +++ b/AdsAdManager/src/V1/resources/contact_service_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ContactService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "BatchCreateContacts": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchUpdateContacts": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateContact": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetContact": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListContacts": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateContact": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/contact_service_descriptor_config.php b/AdsAdManager/src/V1/resources/contact_service_descriptor_config.php new file mode 100644 index 000000000000..f04672f7ac95 --- /dev/null +++ b/AdsAdManager/src/V1/resources/contact_service_descriptor_config.php @@ -0,0 +1,114 @@ + [ + 'google.ads.admanager.v1.ContactService' => [ + 'BatchCreateContacts' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchCreateContactsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateContacts' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUpdateContactsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateContact' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Contact', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetContact' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Contact', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListContacts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getContacts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListContactsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateContact' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Contact', + 'headerParams' => [ + [ + 'keyName' => 'contact.name', + 'fieldAccessors' => [ + 'getContact', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'company' => 'networks/{network_code}/companies/{company}', + 'contact' => 'networks/{network_code}/contacts/{contact}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/contact_service_rest_client_config.php b/AdsAdManager/src/V1/resources/contact_service_rest_client_config.php new file mode 100644 index 000000000000..676bc0d66e5b --- /dev/null +++ b/AdsAdManager/src/V1/resources/contact_service_rest_client_config.php @@ -0,0 +1,116 @@ + [ + 'google.ads.admanager.v1.ContactService' => [ + 'BatchCreateContacts' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/contacts:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateContacts' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/contacts:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateContact' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/contacts', + 'body' => 'contact', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetContact' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/contacts/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListContacts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/contacts', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateContact' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{contact.name=networks/*/contacts/*}', + 'body' => 'contact', + 'placeholders' => [ + 'contact.name' => [ + 'getters' => [ + 'getContact', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/content_bundle_service_client_config.json b/AdsAdManager/src/V1/resources/content_bundle_service_client_config.json new file mode 100644 index 000000000000..4a7146ed4e3b --- /dev/null +++ b/AdsAdManager/src/V1/resources/content_bundle_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ContentBundleService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetContentBundle": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListContentBundles": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/content_bundle_service_descriptor_config.php b/AdsAdManager/src/V1/resources/content_bundle_service_descriptor_config.php new file mode 100644 index 000000000000..75f84ad16ac8 --- /dev/null +++ b/AdsAdManager/src/V1/resources/content_bundle_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.ContentBundleService' => [ + 'GetContentBundle' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ContentBundle', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListContentBundles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getContentBundles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListContentBundlesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'contentBundle' => 'networks/{network_code}/contentBundles/{content_bundle}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/content_bundle_service_rest_client_config.php b/AdsAdManager/src/V1/resources/content_bundle_service_rest_client_config.php new file mode 100644 index 000000000000..3b09659da55e --- /dev/null +++ b/AdsAdManager/src/V1/resources/content_bundle_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.ContentBundleService' => [ + 'GetContentBundle' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/contentBundles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListContentBundles' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/contentBundles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/content_label_service_client_config.json b/AdsAdManager/src/V1/resources/content_label_service_client_config.json new file mode 100644 index 000000000000..6252bfa3b254 --- /dev/null +++ b/AdsAdManager/src/V1/resources/content_label_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ContentLabelService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetContentLabel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListContentLabels": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/content_label_service_descriptor_config.php b/AdsAdManager/src/V1/resources/content_label_service_descriptor_config.php new file mode 100644 index 000000000000..c3b7e8b83d57 --- /dev/null +++ b/AdsAdManager/src/V1/resources/content_label_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.ContentLabelService' => [ + 'GetContentLabel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ContentLabel', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListContentLabels' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getContentLabels', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListContentLabelsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'contentLabel' => 'networks/{network_code}/contentLabels/{content_label}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/content_label_service_rest_client_config.php b/AdsAdManager/src/V1/resources/content_label_service_rest_client_config.php new file mode 100644 index 000000000000..edaecf687628 --- /dev/null +++ b/AdsAdManager/src/V1/resources/content_label_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.ContentLabelService' => [ + 'GetContentLabel' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/contentLabels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListContentLabels' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/contentLabels', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/content_service_client_config.json b/AdsAdManager/src/V1/resources/content_service_client_config.json new file mode 100644 index 000000000000..d2da72f0491f --- /dev/null +++ b/AdsAdManager/src/V1/resources/content_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.ContentService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetContent": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListContent": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/content_service_descriptor_config.php b/AdsAdManager/src/V1/resources/content_service_descriptor_config.php new file mode 100644 index 000000000000..65de8ae3afaa --- /dev/null +++ b/AdsAdManager/src/V1/resources/content_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.ContentService' => [ + 'GetContent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Content', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListContent' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getContent', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListContentResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'content' => 'networks/{network_code}/content/{content}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/content_service_rest_client_config.php b/AdsAdManager/src/V1/resources/content_service_rest_client_config.php new file mode 100644 index 000000000000..cff16a05f780 --- /dev/null +++ b/AdsAdManager/src/V1/resources/content_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.ContentService' => [ + 'GetContent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/content/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListContent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/content', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/creative_template_service_client_config.json b/AdsAdManager/src/V1/resources/creative_template_service_client_config.json new file mode 100644 index 000000000000..75af61df4193 --- /dev/null +++ b/AdsAdManager/src/V1/resources/creative_template_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CreativeTemplateService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetCreativeTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListCreativeTemplates": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/creative_template_service_descriptor_config.php b/AdsAdManager/src/V1/resources/creative_template_service_descriptor_config.php new file mode 100644 index 000000000000..90fcea4e24b2 --- /dev/null +++ b/AdsAdManager/src/V1/resources/creative_template_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.CreativeTemplateService' => [ + 'GetCreativeTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CreativeTemplate', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCreativeTemplates' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCreativeTemplates', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListCreativeTemplatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'creativeTemplate' => 'networks/{network_code}/creativeTemplates/{creative_template}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/creative_template_service_rest_client_config.php b/AdsAdManager/src/V1/resources/creative_template_service_rest_client_config.php new file mode 100644 index 000000000000..79a57d492246 --- /dev/null +++ b/AdsAdManager/src/V1/resources/creative_template_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.CreativeTemplateService' => [ + 'GetCreativeTemplate' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/creativeTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCreativeTemplates' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/creativeTemplates', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/custom_field_service_client_config.json b/AdsAdManager/src/V1/resources/custom_field_service_client_config.json index 8f8a5a8fc36e..2e9f9e2ab6dc 100644 --- a/AdsAdManager/src/V1/resources/custom_field_service_client_config.json +++ b/AdsAdManager/src/V1/resources/custom_field_service_client_config.json @@ -16,6 +16,31 @@ } }, "methods": { + "BatchActivateCustomFields": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchCreateCustomFields": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchDeactivateCustomFields": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchUpdateCustomFields": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateCustomField": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "GetCustomField": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", @@ -25,6 +50,11 @@ "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" + }, + "UpdateCustomField": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" } } } diff --git a/AdsAdManager/src/V1/resources/custom_field_service_descriptor_config.php b/AdsAdManager/src/V1/resources/custom_field_service_descriptor_config.php index a7ce127626b8..9c720249ee67 100644 --- a/AdsAdManager/src/V1/resources/custom_field_service_descriptor_config.php +++ b/AdsAdManager/src/V1/resources/custom_field_service_descriptor_config.php @@ -23,6 +23,66 @@ return [ 'interfaces' => [ 'google.ads.admanager.v1.CustomFieldService' => [ + 'BatchActivateCustomFields' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchActivateCustomFieldsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreateCustomFields' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchCreateCustomFieldsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeactivateCustomFields' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchDeactivateCustomFieldsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateCustomFields' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUpdateCustomFieldsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCustomField' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CustomField', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'GetCustomField' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Ads\AdManager\V1\CustomField', @@ -55,6 +115,19 @@ ], ], ], + 'UpdateCustomField' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CustomField', + 'headerParams' => [ + [ + 'keyName' => 'custom_field.name', + 'fieldAccessors' => [ + 'getCustomField', + 'getName', + ], + ], + ], + ], 'templateMap' => [ 'customField' => 'networks/{network_code}/customFields/{custom_field}', 'network' => 'networks/{network_code}', diff --git a/AdsAdManager/src/V1/resources/custom_field_service_rest_client_config.php b/AdsAdManager/src/V1/resources/custom_field_service_rest_client_config.php index 3c2979acd873..0af95ae4ef62 100644 --- a/AdsAdManager/src/V1/resources/custom_field_service_rest_client_config.php +++ b/AdsAdManager/src/V1/resources/custom_field_service_rest_client_config.php @@ -23,6 +23,66 @@ return [ 'interfaces' => [ 'google.ads.admanager.v1.CustomFieldService' => [ + 'BatchActivateCustomFields' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/customFields:batchActivate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreateCustomFields' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/customFields:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeactivateCustomFields' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/customFields:batchDeactivate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateCustomFields' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/customFields:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCustomField' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/customFields', + 'body' => 'custom_field', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'GetCustomField' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=networks/*/customFields/*}', @@ -45,6 +105,22 @@ ], ], ], + 'UpdateCustomField' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{custom_field.name=networks/*/customFields/*}', + 'body' => 'custom_field', + 'placeholders' => [ + 'custom_field.name' => [ + 'getters' => [ + 'getCustomField', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], ], 'google.longrunning.Operations' => [ 'GetOperation' => [ diff --git a/AdsAdManager/src/V1/resources/device_capability_service_client_config.json b/AdsAdManager/src/V1/resources/device_capability_service_client_config.json new file mode 100644 index 000000000000..492b7bbd286b --- /dev/null +++ b/AdsAdManager/src/V1/resources/device_capability_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.DeviceCapabilityService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetDeviceCapability": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDeviceCapabilities": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/device_capability_service_descriptor_config.php b/AdsAdManager/src/V1/resources/device_capability_service_descriptor_config.php new file mode 100644 index 000000000000..9c8e2f8c2492 --- /dev/null +++ b/AdsAdManager/src/V1/resources/device_capability_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.DeviceCapabilityService' => [ + 'GetDeviceCapability' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\DeviceCapability', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDeviceCapabilities' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeviceCapabilities', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListDeviceCapabilitiesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'deviceCapability' => 'networks/{network_code}/deviceCapabilities/{device_capability}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/device_capability_service_rest_client_config.php b/AdsAdManager/src/V1/resources/device_capability_service_rest_client_config.php new file mode 100644 index 000000000000..8adef8c90ddb --- /dev/null +++ b/AdsAdManager/src/V1/resources/device_capability_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.DeviceCapabilityService' => [ + 'GetDeviceCapability' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/deviceCapabilities/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDeviceCapabilities' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/deviceCapabilities', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/device_manufacturer_service_client_config.json b/AdsAdManager/src/V1/resources/device_manufacturer_service_client_config.json new file mode 100644 index 000000000000..e6f3ca01e5ee --- /dev/null +++ b/AdsAdManager/src/V1/resources/device_manufacturer_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.DeviceManufacturerService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetDeviceManufacturer": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDeviceManufacturers": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/device_manufacturer_service_descriptor_config.php b/AdsAdManager/src/V1/resources/device_manufacturer_service_descriptor_config.php new file mode 100644 index 000000000000..7c28e5dfce51 --- /dev/null +++ b/AdsAdManager/src/V1/resources/device_manufacturer_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.DeviceManufacturerService' => [ + 'GetDeviceManufacturer' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\DeviceManufacturer', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDeviceManufacturers' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeviceManufacturers', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListDeviceManufacturersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'deviceManufacturer' => 'networks/{network_code}/deviceManufacturers/{device_manufacturer}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/device_manufacturer_service_rest_client_config.php b/AdsAdManager/src/V1/resources/device_manufacturer_service_rest_client_config.php new file mode 100644 index 000000000000..6ae7e184b176 --- /dev/null +++ b/AdsAdManager/src/V1/resources/device_manufacturer_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.DeviceManufacturerService' => [ + 'GetDeviceManufacturer' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/deviceManufacturers/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDeviceManufacturers' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/deviceManufacturers', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/mobile_carrier_service_client_config.json b/AdsAdManager/src/V1/resources/mobile_carrier_service_client_config.json new file mode 100644 index 000000000000..e52339f89d25 --- /dev/null +++ b/AdsAdManager/src/V1/resources/mobile_carrier_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.MobileCarrierService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetMobileCarrier": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListMobileCarriers": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/mobile_carrier_service_descriptor_config.php b/AdsAdManager/src/V1/resources/mobile_carrier_service_descriptor_config.php new file mode 100644 index 000000000000..343f2bfe096f --- /dev/null +++ b/AdsAdManager/src/V1/resources/mobile_carrier_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.MobileCarrierService' => [ + 'GetMobileCarrier' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\MobileCarrier', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListMobileCarriers' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMobileCarriers', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListMobileCarriersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'mobileCarrier' => 'networks/{network_code}/mobileCarriers/{mobile_carrier}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/mobile_carrier_service_rest_client_config.php b/AdsAdManager/src/V1/resources/mobile_carrier_service_rest_client_config.php new file mode 100644 index 000000000000..81b96c1945a5 --- /dev/null +++ b/AdsAdManager/src/V1/resources/mobile_carrier_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.MobileCarrierService' => [ + 'GetMobileCarrier' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/mobileCarriers/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListMobileCarriers' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/mobileCarriers', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/mobile_device_service_client_config.json b/AdsAdManager/src/V1/resources/mobile_device_service_client_config.json new file mode 100644 index 000000000000..83fc4e6920a6 --- /dev/null +++ b/AdsAdManager/src/V1/resources/mobile_device_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.MobileDeviceService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetMobileDevice": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListMobileDevices": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/mobile_device_service_descriptor_config.php b/AdsAdManager/src/V1/resources/mobile_device_service_descriptor_config.php new file mode 100644 index 000000000000..be6dc20617e2 --- /dev/null +++ b/AdsAdManager/src/V1/resources/mobile_device_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.MobileDeviceService' => [ + 'GetMobileDevice' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\MobileDevice', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListMobileDevices' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMobileDevices', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListMobileDevicesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'mobileDevice' => 'networks/{network_code}/mobileDevices/{mobile_device}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/mobile_device_service_rest_client_config.php b/AdsAdManager/src/V1/resources/mobile_device_service_rest_client_config.php new file mode 100644 index 000000000000..3680518643d7 --- /dev/null +++ b/AdsAdManager/src/V1/resources/mobile_device_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.MobileDeviceService' => [ + 'GetMobileDevice' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/mobileDevices/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListMobileDevices' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/mobileDevices', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/mobile_device_submodel_service_client_config.json b/AdsAdManager/src/V1/resources/mobile_device_submodel_service_client_config.json new file mode 100644 index 000000000000..44e32b8e3bd3 --- /dev/null +++ b/AdsAdManager/src/V1/resources/mobile_device_submodel_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.ads.admanager.v1.MobileDeviceSubmodelService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "GetMobileDeviceSubmodel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListMobileDeviceSubmodels": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/mobile_device_submodel_service_descriptor_config.php b/AdsAdManager/src/V1/resources/mobile_device_submodel_service_descriptor_config.php new file mode 100644 index 000000000000..09cc238914d7 --- /dev/null +++ b/AdsAdManager/src/V1/resources/mobile_device_submodel_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.MobileDeviceSubmodelService' => [ + 'GetMobileDeviceSubmodel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\MobileDeviceSubmodel', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListMobileDeviceSubmodels' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMobileDeviceSubmodels', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListMobileDeviceSubmodelsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'mobileDeviceSubmodel' => 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/mobile_device_submodel_service_rest_client_config.php b/AdsAdManager/src/V1/resources/mobile_device_submodel_service_rest_client_config.php new file mode 100644 index 000000000000..2356b6c1fec7 --- /dev/null +++ b/AdsAdManager/src/V1/resources/mobile_device_submodel_service_rest_client_config.php @@ -0,0 +1,64 @@ + [ + 'google.ads.admanager.v1.MobileDeviceSubmodelService' => [ + 'GetMobileDeviceSubmodel' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/mobileDeviceSubmodels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListMobileDeviceSubmodels' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/mobileDeviceSubmodels', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/placement_service_client_config.json b/AdsAdManager/src/V1/resources/placement_service_client_config.json index 8d039baaad41..5c98f37c18ed 100644 --- a/AdsAdManager/src/V1/resources/placement_service_client_config.json +++ b/AdsAdManager/src/V1/resources/placement_service_client_config.json @@ -16,6 +16,36 @@ } }, "methods": { + "BatchActivatePlacements": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchArchivePlacements": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchCreatePlacements": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchDeactivatePlacements": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchUpdatePlacements": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreatePlacement": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "GetPlacement": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", @@ -25,6 +55,11 @@ "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" + }, + "UpdatePlacement": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" } } } diff --git a/AdsAdManager/src/V1/resources/placement_service_descriptor_config.php b/AdsAdManager/src/V1/resources/placement_service_descriptor_config.php index f7949ce84422..1879ce926cd0 100644 --- a/AdsAdManager/src/V1/resources/placement_service_descriptor_config.php +++ b/AdsAdManager/src/V1/resources/placement_service_descriptor_config.php @@ -23,6 +23,78 @@ return [ 'interfaces' => [ 'google.ads.admanager.v1.PlacementService' => [ + 'BatchActivatePlacements' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchActivatePlacementsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchArchivePlacements' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchArchivePlacementsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreatePlacements' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchCreatePlacementsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeactivatePlacements' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchDeactivatePlacementsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdatePlacements' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUpdatePlacementsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePlacement' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Placement', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'GetPlacement' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Ads\AdManager\V1\Placement', @@ -55,7 +127,21 @@ ], ], ], + 'UpdatePlacement' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Placement', + 'headerParams' => [ + [ + 'keyName' => 'placement.name', + 'fieldAccessors' => [ + 'getPlacement', + 'getName', + ], + ], + ], + ], 'templateMap' => [ + 'adUnit' => 'networks/{network_code}/adUnits/{ad_unit}', 'network' => 'networks/{network_code}', 'placement' => 'networks/{network_code}/placements/{placement}', ], diff --git a/AdsAdManager/src/V1/resources/placement_service_rest_client_config.php b/AdsAdManager/src/V1/resources/placement_service_rest_client_config.php index 444ff4b1586e..b78c41f788e1 100644 --- a/AdsAdManager/src/V1/resources/placement_service_rest_client_config.php +++ b/AdsAdManager/src/V1/resources/placement_service_rest_client_config.php @@ -23,6 +23,78 @@ return [ 'interfaces' => [ 'google.ads.admanager.v1.PlacementService' => [ + 'BatchActivatePlacements' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/placements:batchActivate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchArchivePlacements' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/placements:batchArchive', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreatePlacements' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/placements:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeactivatePlacements' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/placements:batchDeactivate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdatePlacements' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/placements:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePlacement' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/placements', + 'body' => 'placement', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'GetPlacement' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=networks/*/placements/*}', @@ -45,6 +117,22 @@ ], ], ], + 'UpdatePlacement' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{placement.name=networks/*/placements/*}', + 'body' => 'placement', + 'placeholders' => [ + 'placement.name' => [ + 'getters' => [ + 'getPlacement', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], ], 'google.longrunning.Operations' => [ 'GetOperation' => [ diff --git a/AdsAdManager/src/V1/resources/private_auction_deal_service_descriptor_config.php b/AdsAdManager/src/V1/resources/private_auction_deal_service_descriptor_config.php index 6ffcb369659a..8fee83088d12 100644 --- a/AdsAdManager/src/V1/resources/private_auction_deal_service_descriptor_config.php +++ b/AdsAdManager/src/V1/resources/private_auction_deal_service_descriptor_config.php @@ -82,11 +82,23 @@ ], 'templateMap' => [ 'adUnit' => 'networks/{network_code}/adUnits/{ad_unit}', + 'application' => 'networks/{network_code}/applications/{application}', + 'audienceSegment' => 'networks/{network_code}/audienceSegments/{audience_segment}', 'bandwidthGroup' => 'networks/{network_code}/bandwidthGroups/{bandwidth_group}', + 'browser' => 'networks/{network_code}/browsers/{browser}', + 'browserLanguage' => 'networks/{network_code}/browserLanguages/{browser_language}', + 'cmsMetadataValue' => 'networks/{network_code}/cmsMetadataValues/{cms_metadata_value}', + 'content' => 'networks/{network_code}/content/{content}', + 'contentBundle' => 'networks/{network_code}/contentBundles/{content_bundle}', 'customTargetingKey' => 'networks/{network_code}/customTargetingKeys/{custom_targeting_key}', 'customTargetingValue' => 'networks/{network_code}/customTargetingValues/{custom_targeting_value}', + 'deviceCapability' => 'networks/{network_code}/deviceCapabilities/{device_capability}', 'deviceCategory' => 'networks/{network_code}/deviceCategories/{device_category}', + 'deviceManufacturer' => 'networks/{network_code}/deviceManufacturers/{device_manufacturer}', 'geoTarget' => 'networks/{network_code}/geoTargets/{geo_target}', + 'mobileCarrier' => 'networks/{network_code}/mobileCarriers/{mobile_carrier}', + 'mobileDevice' => 'networks/{network_code}/mobileDevices/{mobile_device}', + 'mobileDeviceSubmodel' => 'networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}', 'network' => 'networks/{network_code}', 'operatingSystem' => 'networks/{network_code}/operatingSystems/{operating_system}', 'operatingSystemVersion' => 'networks/{network_code}/operatingSystemVersions/{operating_system_version}', diff --git a/AdsAdManager/src/V1/resources/site_service_client_config.json b/AdsAdManager/src/V1/resources/site_service_client_config.json new file mode 100644 index 000000000000..f2db52f52cdd --- /dev/null +++ b/AdsAdManager/src/V1/resources/site_service_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.ads.admanager.v1.SiteService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "BatchCreateSites": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchDeactivateSites": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchSubmitSitesForApproval": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchUpdateSites": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateSite": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSite": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSites": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSite": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/site_service_descriptor_config.php b/AdsAdManager/src/V1/resources/site_service_descriptor_config.php new file mode 100644 index 000000000000..eb087a9a4f7d --- /dev/null +++ b/AdsAdManager/src/V1/resources/site_service_descriptor_config.php @@ -0,0 +1,137 @@ + [ + 'google.ads.admanager.v1.SiteService' => [ + 'BatchCreateSites' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchCreateSitesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeactivateSites' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchDeactivateSitesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchSubmitSitesForApproval' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchSubmitSitesForApprovalResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateSites' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUpdateSitesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSite' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Site', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetSite' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Site', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSites' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSites', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListSitesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSite' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Site', + 'headerParams' => [ + [ + 'keyName' => 'site.name', + 'fieldAccessors' => [ + 'getSite', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'network' => 'networks/{network_code}', + 'site' => 'networks/{network_code}/sites/{site}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/site_service_rest_client_config.php b/AdsAdManager/src/V1/resources/site_service_rest_client_config.php new file mode 100644 index 000000000000..66549ae7e9d4 --- /dev/null +++ b/AdsAdManager/src/V1/resources/site_service_rest_client_config.php @@ -0,0 +1,140 @@ + [ + 'google.ads.admanager.v1.SiteService' => [ + 'BatchCreateSites' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/sites:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeactivateSites' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/sites:batchDeactivate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchSubmitSitesForApproval' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/sites:batchSubmitForApproval', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateSites' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/sites:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSite' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/sites', + 'body' => 'site', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetSite' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/sites/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSites' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/sites', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSite' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{site.name=networks/*/sites/*}', + 'body' => 'site', + 'placeholders' => [ + 'site.name' => [ + 'getters' => [ + 'getSite', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/team_service_client_config.json b/AdsAdManager/src/V1/resources/team_service_client_config.json new file mode 100644 index 000000000000..5163914e80b3 --- /dev/null +++ b/AdsAdManager/src/V1/resources/team_service_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.ads.admanager.v1.TeamService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "BatchActivateTeams": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchCreateTeams": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchDeactivateTeams": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchUpdateTeams": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateTeam": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetTeam": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListTeams": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateTeam": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/team_service_descriptor_config.php b/AdsAdManager/src/V1/resources/team_service_descriptor_config.php new file mode 100644 index 000000000000..a405e242c2ca --- /dev/null +++ b/AdsAdManager/src/V1/resources/team_service_descriptor_config.php @@ -0,0 +1,137 @@ + [ + 'google.ads.admanager.v1.TeamService' => [ + 'BatchActivateTeams' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchActivateTeamsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreateTeams' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchCreateTeamsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeactivateTeams' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchDeactivateTeamsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateTeams' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUpdateTeamsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTeam' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Team', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetTeam' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Team', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListTeams' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTeams', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListTeamsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateTeam' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Team', + 'headerParams' => [ + [ + 'keyName' => 'team.name', + 'fieldAccessors' => [ + 'getTeam', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'network' => 'networks/{network_code}', + 'team' => 'networks/{network_code}/teams/{team}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/team_service_rest_client_config.php b/AdsAdManager/src/V1/resources/team_service_rest_client_config.php new file mode 100644 index 000000000000..b94e904a8422 --- /dev/null +++ b/AdsAdManager/src/V1/resources/team_service_rest_client_config.php @@ -0,0 +1,140 @@ + [ + 'google.ads.admanager.v1.TeamService' => [ + 'BatchActivateTeams' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/teams:batchActivate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreateTeams' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/teams:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeactivateTeams' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/teams:batchDeactivate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateTeams' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/teams:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTeam' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/teams', + 'body' => 'team', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetTeam' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/teams/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListTeams' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/teams', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateTeam' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{team.name=networks/*/teams/*}', + 'body' => 'team', + 'placeholders' => [ + 'team.name' => [ + 'getters' => [ + 'getTeam', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/tests/Unit/V1/Client/AdReviewCenterAdServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/AdReviewCenterAdServiceClientTest.php new file mode 100644 index 000000000000..78cf872fde75 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/AdReviewCenterAdServiceClientTest.php @@ -0,0 +1,486 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return AdReviewCenterAdServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AdReviewCenterAdServiceClient($options); + } + + /** @test */ + public function batchAllowAdReviewCenterAdsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchAllowAdReviewCenterAdsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchAllowAdReviewCenterAdsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchAllowAdReviewCenterAdsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->webPropertyName('[NETWORK_CODE]', '[WEB_PROPERTY]'); + $formattedNames = [ + $gapicClient->adReviewCenterAdName('[NETWORK_CODE]', '[WEB_PROPERTY_CODE]', '[AD_REVIEW_CENTER_AD]'), + ]; + $request = (new BatchAllowAdReviewCenterAdsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchAllowAdReviewCenterAds($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.AdReviewCenterAdService/BatchAllowAdReviewCenterAds', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchAllowAdReviewCenterAdsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function batchAllowAdReviewCenterAdsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchAllowAdReviewCenterAdsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $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 + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->webPropertyName('[NETWORK_CODE]', '[WEB_PROPERTY]'); + $formattedNames = [ + $gapicClient->adReviewCenterAdName('[NETWORK_CODE]', '[WEB_PROPERTY_CODE]', '[AD_REVIEW_CENTER_AD]'), + ]; + $request = (new BatchAllowAdReviewCenterAdsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchAllowAdReviewCenterAds($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchAllowAdReviewCenterAdsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() 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 stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function batchBlockAdReviewCenterAdsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchBlockAdReviewCenterAdsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchBlockAdReviewCenterAdsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchBlockAdReviewCenterAdsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->webPropertyName('[NETWORK_CODE]', '[WEB_PROPERTY]'); + $formattedNames = [ + $gapicClient->adReviewCenterAdName('[NETWORK_CODE]', '[WEB_PROPERTY_CODE]', '[AD_REVIEW_CENTER_AD]'), + ]; + $request = (new BatchBlockAdReviewCenterAdsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchBlockAdReviewCenterAds($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.AdReviewCenterAdService/BatchBlockAdReviewCenterAds', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchBlockAdReviewCenterAdsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function batchBlockAdReviewCenterAdsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchBlockAdReviewCenterAdsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $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 + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->webPropertyName('[NETWORK_CODE]', '[WEB_PROPERTY]'); + $formattedNames = [ + $gapicClient->adReviewCenterAdName('[NETWORK_CODE]', '[WEB_PROPERTY_CODE]', '[AD_REVIEW_CENTER_AD]'), + ]; + $request = (new BatchBlockAdReviewCenterAdsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchBlockAdReviewCenterAds($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchBlockAdReviewCenterAdsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() 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 stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function searchAdReviewCenterAdsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $adReviewCenterAdsElement = new AdReviewCenterAd(); + $adReviewCenterAds = [$adReviewCenterAdsElement]; + $expectedResponse = new SearchAdReviewCenterAdsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAdReviewCenterAds($adReviewCenterAds); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->webPropertyName('[NETWORK_CODE]', '[WEB_PROPERTY]'); + $status = AdReviewCenterAdStatus::AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED; + $request = (new SearchAdReviewCenterAdsRequest())->setParent($formattedParent)->setStatus($status); + $response = $gapicClient->searchAdReviewCenterAds($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAdReviewCenterAds()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.AdReviewCenterAdService/SearchAdReviewCenterAds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getStatus(); + $this->assertProtobufEquals($status, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchAdReviewCenterAdsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->webPropertyName('[NETWORK_CODE]', '[WEB_PROPERTY]'); + $requestStatus = AdReviewCenterAdStatus::AD_REVIEW_CENTER_AD_STATUS_UNSPECIFIED; + $request = (new SearchAdReviewCenterAdsRequest())->setParent($formattedParent)->setStatus($requestStatus); + try { + $gapicClient->searchAdReviewCenterAds($request); + // If the $gapicClient 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 batchAllowAdReviewCenterAdsAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchAllowAdReviewCenterAdsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchAllowAdReviewCenterAdsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchAllowAdReviewCenterAdsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->webPropertyName('[NETWORK_CODE]', '[WEB_PROPERTY]'); + $formattedNames = [ + $gapicClient->adReviewCenterAdName('[NETWORK_CODE]', '[WEB_PROPERTY_CODE]', '[AD_REVIEW_CENTER_AD]'), + ]; + $request = (new BatchAllowAdReviewCenterAdsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchAllowAdReviewCenterAdsAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.AdReviewCenterAdService/BatchAllowAdReviewCenterAds', + $actualApiFuncCall + ); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchAllowAdReviewCenterAdsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/ApplicationServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/ApplicationServiceClientTest.php new file mode 100644 index 000000000000..739470e56eea --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/ApplicationServiceClientTest.php @@ -0,0 +1,236 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return ApplicationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ApplicationServiceClient($options); + } + + /** @test */ + public function getApplicationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Application(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->applicationName('[NETWORK_CODE]', '[APPLICATION]'); + $request = (new GetApplicationRequest())->setName($formattedName); + $response = $gapicClient->getApplication($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ApplicationService/GetApplication', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getApplicationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->applicationName('[NETWORK_CODE]', '[APPLICATION]'); + $request = (new GetApplicationRequest())->setName($formattedName); + try { + $gapicClient->getApplication($request); + // If the $gapicClient 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 listApplicationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $applicationsElement = new Application(); + $applications = [$applicationsElement]; + $expectedResponse = new ListApplicationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setApplications($applications); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListApplicationsRequest())->setParent($formattedParent); + $response = $gapicClient->listApplications($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getApplications()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ApplicationService/ListApplications', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listApplicationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListApplicationsRequest())->setParent($formattedParent); + try { + $gapicClient->listApplications($request); + // If the $gapicClient 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 getApplicationAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Application(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->applicationName('[NETWORK_CODE]', '[APPLICATION]'); + $request = (new GetApplicationRequest())->setName($formattedName); + $response = $gapicClient->getApplicationAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ApplicationService/GetApplication', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/AudienceSegmentServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/AudienceSegmentServiceClientTest.php new file mode 100644 index 000000000000..2daa331dbd8a --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/AudienceSegmentServiceClientTest.php @@ -0,0 +1,236 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return AudienceSegmentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AudienceSegmentServiceClient($options); + } + + /** @test */ + public function getAudienceSegmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AudienceSegment(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->audienceSegmentName('[NETWORK_CODE]', '[AUDIENCE_SEGMENT]'); + $request = (new GetAudienceSegmentRequest())->setName($formattedName); + $response = $gapicClient->getAudienceSegment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.AudienceSegmentService/GetAudienceSegment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAudienceSegmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->audienceSegmentName('[NETWORK_CODE]', '[AUDIENCE_SEGMENT]'); + $request = (new GetAudienceSegmentRequest())->setName($formattedName); + try { + $gapicClient->getAudienceSegment($request); + // If the $gapicClient 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 listAudienceSegmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $audienceSegmentsElement = new AudienceSegment(); + $audienceSegments = [$audienceSegmentsElement]; + $expectedResponse = new ListAudienceSegmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setAudienceSegments($audienceSegments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListAudienceSegmentsRequest())->setParent($formattedParent); + $response = $gapicClient->listAudienceSegments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAudienceSegments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.AudienceSegmentService/ListAudienceSegments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAudienceSegmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListAudienceSegmentsRequest())->setParent($formattedParent); + try { + $gapicClient->listAudienceSegments($request); + // If the $gapicClient 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 getAudienceSegmentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AudienceSegment(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->audienceSegmentName('[NETWORK_CODE]', '[AUDIENCE_SEGMENT]'); + $request = (new GetAudienceSegmentRequest())->setName($formattedName); + $response = $gapicClient->getAudienceSegmentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.AudienceSegmentService/GetAudienceSegment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/BrowserLanguageServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/BrowserLanguageServiceClientTest.php new file mode 100644 index 000000000000..ddff90cc6377 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/BrowserLanguageServiceClientTest.php @@ -0,0 +1,236 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return BrowserLanguageServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BrowserLanguageServiceClient($options); + } + + /** @test */ + public function getBrowserLanguageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new BrowserLanguage(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->browserLanguageName('[NETWORK_CODE]', '[BROWSER_LANGUAGE]'); + $request = (new GetBrowserLanguageRequest())->setName($formattedName); + $response = $gapicClient->getBrowserLanguage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.BrowserLanguageService/GetBrowserLanguage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBrowserLanguageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->browserLanguageName('[NETWORK_CODE]', '[BROWSER_LANGUAGE]'); + $request = (new GetBrowserLanguageRequest())->setName($formattedName); + try { + $gapicClient->getBrowserLanguage($request); + // If the $gapicClient 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 listBrowserLanguagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $browserLanguagesElement = new BrowserLanguage(); + $browserLanguages = [$browserLanguagesElement]; + $expectedResponse = new ListBrowserLanguagesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setBrowserLanguages($browserLanguages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListBrowserLanguagesRequest())->setParent($formattedParent); + $response = $gapicClient->listBrowserLanguages($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBrowserLanguages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.BrowserLanguageService/ListBrowserLanguages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBrowserLanguagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListBrowserLanguagesRequest())->setParent($formattedParent); + try { + $gapicClient->listBrowserLanguages($request); + // If the $gapicClient 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 getBrowserLanguageAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new BrowserLanguage(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->browserLanguageName('[NETWORK_CODE]', '[BROWSER_LANGUAGE]'); + $request = (new GetBrowserLanguageRequest())->setName($formattedName); + $response = $gapicClient->getBrowserLanguageAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.BrowserLanguageService/GetBrowserLanguage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/BrowserServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/BrowserServiceClientTest.php new file mode 100644 index 000000000000..193f00b50bea --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/BrowserServiceClientTest.php @@ -0,0 +1,244 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return BrowserServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BrowserServiceClient($options); + } + + /** @test */ + public function getBrowserTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $majorVersion = 'majorVersion-1298026414'; + $minorVersion = 'minorVersion1136764494'; + $expectedResponse = new Browser(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMajorVersion($majorVersion); + $expectedResponse->setMinorVersion($minorVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->browserName('[NETWORK_CODE]', '[BROWSER]'); + $request = (new GetBrowserRequest())->setName($formattedName); + $response = $gapicClient->getBrowser($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.BrowserService/GetBrowser', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBrowserExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->browserName('[NETWORK_CODE]', '[BROWSER]'); + $request = (new GetBrowserRequest())->setName($formattedName); + try { + $gapicClient->getBrowser($request); + // If the $gapicClient 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 listBrowsersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $browsersElement = new Browser(); + $browsers = [$browsersElement]; + $expectedResponse = new ListBrowsersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setBrowsers($browsers); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListBrowsersRequest())->setParent($formattedParent); + $response = $gapicClient->listBrowsers($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBrowsers()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.BrowserService/ListBrowsers', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBrowsersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListBrowsersRequest())->setParent($formattedParent); + try { + $gapicClient->listBrowsers($request); + // If the $gapicClient 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 getBrowserAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $majorVersion = 'majorVersion-1298026414'; + $minorVersion = 'minorVersion1136764494'; + $expectedResponse = new Browser(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMajorVersion($majorVersion); + $expectedResponse->setMinorVersion($minorVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->browserName('[NETWORK_CODE]', '[BROWSER]'); + $request = (new GetBrowserRequest())->setName($formattedName); + $response = $gapicClient->getBrowserAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.BrowserService/GetBrowser', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/CmsMetadataKeyServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/CmsMetadataKeyServiceClientTest.php new file mode 100644 index 000000000000..9ea2bb804ca6 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/CmsMetadataKeyServiceClientTest.php @@ -0,0 +1,236 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return CmsMetadataKeyServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CmsMetadataKeyServiceClient($options); + } + + /** @test */ + public function getCmsMetadataKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new CmsMetadataKey(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cmsMetadataKeyName('[NETWORK_CODE]', '[CMS_METADATA_KEY]'); + $request = (new GetCmsMetadataKeyRequest())->setName($formattedName); + $response = $gapicClient->getCmsMetadataKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CmsMetadataKeyService/GetCmsMetadataKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCmsMetadataKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->cmsMetadataKeyName('[NETWORK_CODE]', '[CMS_METADATA_KEY]'); + $request = (new GetCmsMetadataKeyRequest())->setName($formattedName); + try { + $gapicClient->getCmsMetadataKey($request); + // If the $gapicClient 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 listCmsMetadataKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $cmsMetadataKeysElement = new CmsMetadataKey(); + $cmsMetadataKeys = [$cmsMetadataKeysElement]; + $expectedResponse = new ListCmsMetadataKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCmsMetadataKeys($cmsMetadataKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListCmsMetadataKeysRequest())->setParent($formattedParent); + $response = $gapicClient->listCmsMetadataKeys($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCmsMetadataKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CmsMetadataKeyService/ListCmsMetadataKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCmsMetadataKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListCmsMetadataKeysRequest())->setParent($formattedParent); + try { + $gapicClient->listCmsMetadataKeys($request); + // If the $gapicClient 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 getCmsMetadataKeyAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new CmsMetadataKey(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cmsMetadataKeyName('[NETWORK_CODE]', '[CMS_METADATA_KEY]'); + $request = (new GetCmsMetadataKeyRequest())->setName($formattedName); + $response = $gapicClient->getCmsMetadataKeyAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CmsMetadataKeyService/GetCmsMetadataKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/CmsMetadataValueServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/CmsMetadataValueServiceClientTest.php new file mode 100644 index 000000000000..3946a7ca2fd7 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/CmsMetadataValueServiceClientTest.php @@ -0,0 +1,240 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return CmsMetadataValueServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CmsMetadataValueServiceClient($options); + } + + /** @test */ + public function getCmsMetadataValueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $key = 'key106079'; + $expectedResponse = new CmsMetadataValue(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setKey($key); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cmsMetadataValueName('[NETWORK_CODE]', '[CMS_METADATA_VALUE]'); + $request = (new GetCmsMetadataValueRequest())->setName($formattedName); + $response = $gapicClient->getCmsMetadataValue($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CmsMetadataValueService/GetCmsMetadataValue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCmsMetadataValueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->cmsMetadataValueName('[NETWORK_CODE]', '[CMS_METADATA_VALUE]'); + $request = (new GetCmsMetadataValueRequest())->setName($formattedName); + try { + $gapicClient->getCmsMetadataValue($request); + // If the $gapicClient 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 listCmsMetadataValuesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $cmsMetadataValuesElement = new CmsMetadataValue(); + $cmsMetadataValues = [$cmsMetadataValuesElement]; + $expectedResponse = new ListCmsMetadataValuesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCmsMetadataValues($cmsMetadataValues); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListCmsMetadataValuesRequest())->setParent($formattedParent); + $response = $gapicClient->listCmsMetadataValues($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCmsMetadataValues()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CmsMetadataValueService/ListCmsMetadataValues', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCmsMetadataValuesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListCmsMetadataValuesRequest())->setParent($formattedParent); + try { + $gapicClient->listCmsMetadataValues($request); + // If the $gapicClient 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 getCmsMetadataValueAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $key = 'key106079'; + $expectedResponse = new CmsMetadataValue(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setKey($key); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cmsMetadataValueName('[NETWORK_CODE]', '[CMS_METADATA_VALUE]'); + $request = (new GetCmsMetadataValueRequest())->setName($formattedName); + $response = $gapicClient->getCmsMetadataValueAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CmsMetadataValueService/GetCmsMetadataValue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/ContactServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/ContactServiceClientTest.php new file mode 100644 index 000000000000..c4e954a573ea --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/ContactServiceClientTest.php @@ -0,0 +1,582 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return ContactServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ContactServiceClient($options); + } + + /** @test */ + public function batchCreateContactsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateContactsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateContactsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreateContacts($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContactService/BatchCreateContacts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateContactsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateContactsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchCreateContacts($request); + // If the $gapicClient 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 batchUpdateContactsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdateContactsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateContactsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchUpdateContacts($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContactService/BatchUpdateContacts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateContactsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateContactsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchUpdateContacts($request); + // If the $gapicClient 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 createContactTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $company = 'company950484093'; + $address = 'address-1147692044'; + $cellPhone = 'cellPhone-1006757807'; + $comment = 'comment950398559'; + $email = 'email96619420'; + $fax = 'fax101149'; + $title = 'title110371416'; + $workPhone = 'workPhone-557312320'; + $expectedResponse = new Contact(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setCompany($company); + $expectedResponse->setAddress($address); + $expectedResponse->setCellPhone($cellPhone); + $expectedResponse->setComment($comment); + $expectedResponse->setEmail($email); + $expectedResponse->setFax($fax); + $expectedResponse->setTitle($title); + $expectedResponse->setWorkPhone($workPhone); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $contact = new Contact(); + $contactDisplayName = 'contactDisplayName-1175157203'; + $contact->setDisplayName($contactDisplayName); + $contactCompany = $gapicClient->companyName('[NETWORK_CODE]', '[COMPANY]'); + $contact->setCompany($contactCompany); + $request = (new CreateContactRequest())->setParent($formattedParent)->setContact($contact); + $response = $gapicClient->createContact($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContactService/CreateContact', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getContact(); + $this->assertProtobufEquals($contact, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createContactExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $contact = new Contact(); + $contactDisplayName = 'contactDisplayName-1175157203'; + $contact->setDisplayName($contactDisplayName); + $contactCompany = $gapicClient->companyName('[NETWORK_CODE]', '[COMPANY]'); + $contact->setCompany($contactCompany); + $request = (new CreateContactRequest())->setParent($formattedParent)->setContact($contact); + try { + $gapicClient->createContact($request); + // If the $gapicClient 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 getContactTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $company = 'company950484093'; + $address = 'address-1147692044'; + $cellPhone = 'cellPhone-1006757807'; + $comment = 'comment950398559'; + $email = 'email96619420'; + $fax = 'fax101149'; + $title = 'title110371416'; + $workPhone = 'workPhone-557312320'; + $expectedResponse = new Contact(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setCompany($company); + $expectedResponse->setAddress($address); + $expectedResponse->setCellPhone($cellPhone); + $expectedResponse->setComment($comment); + $expectedResponse->setEmail($email); + $expectedResponse->setFax($fax); + $expectedResponse->setTitle($title); + $expectedResponse->setWorkPhone($workPhone); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contactName('[NETWORK_CODE]', '[CONTACT]'); + $request = (new GetContactRequest())->setName($formattedName); + $response = $gapicClient->getContact($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContactService/GetContact', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getContactExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->contactName('[NETWORK_CODE]', '[CONTACT]'); + $request = (new GetContactRequest())->setName($formattedName); + try { + $gapicClient->getContact($request); + // If the $gapicClient 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 listContactsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $contactsElement = new Contact(); + $contacts = [$contactsElement]; + $expectedResponse = new ListContactsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setContacts($contacts); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListContactsRequest())->setParent($formattedParent); + $response = $gapicClient->listContacts($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getContacts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContactService/ListContacts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContactsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListContactsRequest())->setParent($formattedParent); + try { + $gapicClient->listContacts($request); + // If the $gapicClient 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 updateContactTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $company = 'company950484093'; + $address = 'address-1147692044'; + $cellPhone = 'cellPhone-1006757807'; + $comment = 'comment950398559'; + $email = 'email96619420'; + $fax = 'fax101149'; + $title = 'title110371416'; + $workPhone = 'workPhone-557312320'; + $expectedResponse = new Contact(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setCompany($company); + $expectedResponse->setAddress($address); + $expectedResponse->setCellPhone($cellPhone); + $expectedResponse->setComment($comment); + $expectedResponse->setEmail($email); + $expectedResponse->setFax($fax); + $expectedResponse->setTitle($title); + $expectedResponse->setWorkPhone($workPhone); + $transport->addResponse($expectedResponse); + // Mock request + $contact = new Contact(); + $contactDisplayName = 'contactDisplayName-1175157203'; + $contact->setDisplayName($contactDisplayName); + $contactCompany = $gapicClient->companyName('[NETWORK_CODE]', '[COMPANY]'); + $contact->setCompany($contactCompany); + $updateMask = new FieldMask(); + $request = (new UpdateContactRequest())->setContact($contact)->setUpdateMask($updateMask); + $response = $gapicClient->updateContact($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContactService/UpdateContact', $actualFuncCall); + $actualValue = $actualRequestObject->getContact(); + $this->assertProtobufEquals($contact, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateContactExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $contact = new Contact(); + $contactDisplayName = 'contactDisplayName-1175157203'; + $contact->setDisplayName($contactDisplayName); + $contactCompany = $gapicClient->companyName('[NETWORK_CODE]', '[COMPANY]'); + $contact->setCompany($contactCompany); + $updateMask = new FieldMask(); + $request = (new UpdateContactRequest())->setContact($contact)->setUpdateMask($updateMask); + try { + $gapicClient->updateContact($request); + // If the $gapicClient 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 batchCreateContactsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateContactsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateContactsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreateContactsAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContactService/BatchCreateContacts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/ContentBundleServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/ContentBundleServiceClientTest.php new file mode 100644 index 000000000000..84db23ba868b --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/ContentBundleServiceClientTest.php @@ -0,0 +1,236 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return ContentBundleServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ContentBundleServiceClient($options); + } + + /** @test */ + public function getContentBundleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ContentBundle(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contentBundleName('[NETWORK_CODE]', '[CONTENT_BUNDLE]'); + $request = (new GetContentBundleRequest())->setName($formattedName); + $response = $gapicClient->getContentBundle($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContentBundleService/GetContentBundle', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getContentBundleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->contentBundleName('[NETWORK_CODE]', '[CONTENT_BUNDLE]'); + $request = (new GetContentBundleRequest())->setName($formattedName); + try { + $gapicClient->getContentBundle($request); + // If the $gapicClient 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 listContentBundlesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $contentBundlesElement = new ContentBundle(); + $contentBundles = [$contentBundlesElement]; + $expectedResponse = new ListContentBundlesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setContentBundles($contentBundles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListContentBundlesRequest())->setParent($formattedParent); + $response = $gapicClient->listContentBundles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getContentBundles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContentBundleService/ListContentBundles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContentBundlesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListContentBundlesRequest())->setParent($formattedParent); + try { + $gapicClient->listContentBundles($request); + // If the $gapicClient 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 getContentBundleAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ContentBundle(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contentBundleName('[NETWORK_CODE]', '[CONTENT_BUNDLE]'); + $request = (new GetContentBundleRequest())->setName($formattedName); + $response = $gapicClient->getContentBundleAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContentBundleService/GetContentBundle', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/ContentLabelServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/ContentLabelServiceClientTest.php new file mode 100644 index 000000000000..2a5c5f32a9eb --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/ContentLabelServiceClientTest.php @@ -0,0 +1,236 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return ContentLabelServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ContentLabelServiceClient($options); + } + + /** @test */ + public function getContentLabelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ContentLabel(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contentLabelName('[NETWORK_CODE]', '[CONTENT_LABEL]'); + $request = (new GetContentLabelRequest())->setName($formattedName); + $response = $gapicClient->getContentLabel($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContentLabelService/GetContentLabel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getContentLabelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->contentLabelName('[NETWORK_CODE]', '[CONTENT_LABEL]'); + $request = (new GetContentLabelRequest())->setName($formattedName); + try { + $gapicClient->getContentLabel($request); + // If the $gapicClient 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 listContentLabelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $contentLabelsElement = new ContentLabel(); + $contentLabels = [$contentLabelsElement]; + $expectedResponse = new ListContentLabelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setContentLabels($contentLabels); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListContentLabelsRequest())->setParent($formattedParent); + $response = $gapicClient->listContentLabels($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getContentLabels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContentLabelService/ListContentLabels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContentLabelsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListContentLabelsRequest())->setParent($formattedParent); + try { + $gapicClient->listContentLabels($request); + // If the $gapicClient 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 getContentLabelAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ContentLabel(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contentLabelName('[NETWORK_CODE]', '[CONTENT_LABEL]'); + $request = (new GetContentLabelRequest())->setName($formattedName); + $response = $gapicClient->getContentLabelAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContentLabelService/GetContentLabel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/ContentServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/ContentServiceClientTest.php new file mode 100644 index 000000000000..6029f11e9057 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/ContentServiceClientTest.php @@ -0,0 +1,236 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return ContentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ContentServiceClient($options); + } + + /** @test */ + public function getContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Content(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contentName('[NETWORK_CODE]', '[CONTENT]'); + $request = (new GetContentRequest())->setName($formattedName); + $response = $gapicClient->getContent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContentService/GetContent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->contentName('[NETWORK_CODE]', '[CONTENT]'); + $request = (new GetContentRequest())->setName($formattedName); + try { + $gapicClient->getContent($request); + // If the $gapicClient 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 listContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $contentElement = new Content(); + $content = [$contentElement]; + $expectedResponse = new ListContentResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setContent($content); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListContentRequest())->setParent($formattedParent); + $response = $gapicClient->listContent($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getContent()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContentService/ListContent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listContentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListContentRequest())->setParent($formattedParent); + try { + $gapicClient->listContent($request); + // If the $gapicClient 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 getContentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Content(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->contentName('[NETWORK_CODE]', '[CONTENT]'); + $request = (new GetContentRequest())->setName($formattedName); + $response = $gapicClient->getContentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.ContentService/GetContent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/CreativeTemplateServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/CreativeTemplateServiceClientTest.php new file mode 100644 index 000000000000..647192ec112e --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/CreativeTemplateServiceClientTest.php @@ -0,0 +1,260 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return CreativeTemplateServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CreativeTemplateServiceClient($options); + } + + /** @test */ + public function getCreativeTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $snippet = 'snippet-2061635299'; + $interstitial = true; + $nativeEligible = false; + $nativeVideoEligible = false; + $safeFrameCompatible = true; + $expectedResponse = new CreativeTemplate(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSnippet($snippet); + $expectedResponse->setInterstitial($interstitial); + $expectedResponse->setNativeEligible($nativeEligible); + $expectedResponse->setNativeVideoEligible($nativeVideoEligible); + $expectedResponse->setSafeFrameCompatible($safeFrameCompatible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->creativeTemplateName('[NETWORK_CODE]', '[CREATIVE_TEMPLATE]'); + $request = (new GetCreativeTemplateRequest())->setName($formattedName); + $response = $gapicClient->getCreativeTemplate($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CreativeTemplateService/GetCreativeTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCreativeTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->creativeTemplateName('[NETWORK_CODE]', '[CREATIVE_TEMPLATE]'); + $request = (new GetCreativeTemplateRequest())->setName($formattedName); + try { + $gapicClient->getCreativeTemplate($request); + // If the $gapicClient 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 listCreativeTemplatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $creativeTemplatesElement = new CreativeTemplate(); + $creativeTemplates = [$creativeTemplatesElement]; + $expectedResponse = new ListCreativeTemplatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCreativeTemplates($creativeTemplates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListCreativeTemplatesRequest())->setParent($formattedParent); + $response = $gapicClient->listCreativeTemplates($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCreativeTemplates()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CreativeTemplateService/ListCreativeTemplates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCreativeTemplatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListCreativeTemplatesRequest())->setParent($formattedParent); + try { + $gapicClient->listCreativeTemplates($request); + // If the $gapicClient 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 getCreativeTemplateAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $snippet = 'snippet-2061635299'; + $interstitial = true; + $nativeEligible = false; + $nativeVideoEligible = false; + $safeFrameCompatible = true; + $expectedResponse = new CreativeTemplate(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSnippet($snippet); + $expectedResponse->setInterstitial($interstitial); + $expectedResponse->setNativeEligible($nativeEligible); + $expectedResponse->setNativeVideoEligible($nativeVideoEligible); + $expectedResponse->setSafeFrameCompatible($safeFrameCompatible); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->creativeTemplateName('[NETWORK_CODE]', '[CREATIVE_TEMPLATE]'); + $request = (new GetCreativeTemplateRequest())->setName($formattedName); + $response = $gapicClient->getCreativeTemplateAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CreativeTemplateService/GetCreativeTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/CustomFieldServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/CustomFieldServiceClientTest.php index b5cf6fa12850..674521bbfa74 100644 --- a/AdsAdManager/tests/Unit/V1/Client/CustomFieldServiceClientTest.php +++ b/AdsAdManager/tests/Unit/V1/Client/CustomFieldServiceClientTest.php @@ -22,15 +22,29 @@ namespace Google\Ads\AdManager\Tests\Unit\V1\Client; +use Google\Ads\AdManager\V1\BatchActivateCustomFieldsRequest; +use Google\Ads\AdManager\V1\BatchActivateCustomFieldsResponse; +use Google\Ads\AdManager\V1\BatchCreateCustomFieldsRequest; +use Google\Ads\AdManager\V1\BatchCreateCustomFieldsResponse; +use Google\Ads\AdManager\V1\BatchDeactivateCustomFieldsRequest; +use Google\Ads\AdManager\V1\BatchDeactivateCustomFieldsResponse; +use Google\Ads\AdManager\V1\BatchUpdateCustomFieldsRequest; +use Google\Ads\AdManager\V1\BatchUpdateCustomFieldsResponse; use Google\Ads\AdManager\V1\Client\CustomFieldServiceClient; +use Google\Ads\AdManager\V1\CreateCustomFieldRequest; use Google\Ads\AdManager\V1\CustomField; +use Google\Ads\AdManager\V1\CustomFieldDataTypeEnum\CustomFieldDataType; +use Google\Ads\AdManager\V1\CustomFieldEntityTypeEnum\CustomFieldEntityType; +use Google\Ads\AdManager\V1\CustomFieldVisibilityEnum\CustomFieldVisibility; use Google\Ads\AdManager\V1\GetCustomFieldRequest; use Google\Ads\AdManager\V1\ListCustomFieldsRequest; use Google\Ads\AdManager\V1\ListCustomFieldsResponse; +use Google\Ads\AdManager\V1\UpdateCustomFieldRequest; use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; +use Google\Protobuf\FieldMask; use Google\Rpc\Code; use stdClass; @@ -64,6 +78,365 @@ private function createClient(array $options = []) return new CustomFieldServiceClient($options); } + /** @test */ + public function batchActivateCustomFieldsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchActivateCustomFieldsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->customFieldName('[NETWORK_CODE]', '[CUSTOM_FIELD]')]; + $request = (new BatchActivateCustomFieldsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchActivateCustomFields($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CustomFieldService/BatchActivateCustomFields', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchActivateCustomFieldsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->customFieldName('[NETWORK_CODE]', '[CUSTOM_FIELD]')]; + $request = (new BatchActivateCustomFieldsRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchActivateCustomFields($request); + // If the $gapicClient 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 batchCreateCustomFieldsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateCustomFieldsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateCustomFieldsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreateCustomFields($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CustomFieldService/BatchCreateCustomFields', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateCustomFieldsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateCustomFieldsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchCreateCustomFields($request); + // If the $gapicClient 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 batchDeactivateCustomFieldsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchDeactivateCustomFieldsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->customFieldName('[NETWORK_CODE]', '[CUSTOM_FIELD]')]; + $request = (new BatchDeactivateCustomFieldsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchDeactivateCustomFields($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CustomFieldService/BatchDeactivateCustomFields', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeactivateCustomFieldsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->customFieldName('[NETWORK_CODE]', '[CUSTOM_FIELD]')]; + $request = (new BatchDeactivateCustomFieldsRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchDeactivateCustomFields($request); + // If the $gapicClient 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 batchUpdateCustomFieldsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdateCustomFieldsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateCustomFieldsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchUpdateCustomFields($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CustomFieldService/BatchUpdateCustomFields', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateCustomFieldsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateCustomFieldsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchUpdateCustomFields($request); + // If the $gapicClient 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 createCustomFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $customFieldId = 66688114; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new CustomField(); + $expectedResponse->setName($name); + $expectedResponse->setCustomFieldId($customFieldId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $customField = new CustomField(); + $customFieldDisplayName = 'customFieldDisplayName-1447155036'; + $customField->setDisplayName($customFieldDisplayName); + $customFieldEntityType = CustomFieldEntityType::CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED; + $customField->setEntityType($customFieldEntityType); + $customFieldDataType = CustomFieldDataType::CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED; + $customField->setDataType($customFieldDataType); + $customFieldVisibility = CustomFieldVisibility::CUSTOM_FIELD_VISIBILITY_UNSPECIFIED; + $customField->setVisibility($customFieldVisibility); + $request = (new CreateCustomFieldRequest())->setParent($formattedParent)->setCustomField($customField); + $response = $gapicClient->createCustomField($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CustomFieldService/CreateCustomField', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCustomField(); + $this->assertProtobufEquals($customField, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCustomFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $customField = new CustomField(); + $customFieldDisplayName = 'customFieldDisplayName-1447155036'; + $customField->setDisplayName($customFieldDisplayName); + $customFieldEntityType = CustomFieldEntityType::CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED; + $customField->setEntityType($customFieldEntityType); + $customFieldDataType = CustomFieldDataType::CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED; + $customField->setDataType($customFieldDataType); + $customFieldVisibility = CustomFieldVisibility::CUSTOM_FIELD_VISIBILITY_UNSPECIFIED; + $customField->setVisibility($customFieldVisibility); + $request = (new CreateCustomFieldRequest())->setParent($formattedParent)->setCustomField($customField); + try { + $gapicClient->createCustomField($request); + // If the $gapicClient 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 getCustomFieldTest() { @@ -209,7 +582,7 @@ public function listCustomFieldsExceptionTest() } /** @test */ - public function getCustomFieldAsyncTest() + public function updateCustomFieldTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -217,28 +590,114 @@ public function getCustomFieldAsyncTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response - $name2 = 'name2-1052831874'; + $name = 'name3373707'; $customFieldId = 66688114; $displayName = 'displayName1615086568'; $description = 'description-1724546052'; $expectedResponse = new CustomField(); - $expectedResponse->setName($name2); + $expectedResponse->setName($name); $expectedResponse->setCustomFieldId($customFieldId); $expectedResponse->setDisplayName($displayName); $expectedResponse->setDescription($description); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->customFieldName('[NETWORK_CODE]', '[CUSTOM_FIELD]'); - $request = (new GetCustomFieldRequest())->setName($formattedName); - $response = $gapicClient->getCustomFieldAsync($request)->wait(); + $customField = new CustomField(); + $customFieldDisplayName = 'customFieldDisplayName-1447155036'; + $customField->setDisplayName($customFieldDisplayName); + $customFieldEntityType = CustomFieldEntityType::CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED; + $customField->setEntityType($customFieldEntityType); + $customFieldDataType = CustomFieldDataType::CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED; + $customField->setDataType($customFieldDataType); + $customFieldVisibility = CustomFieldVisibility::CUSTOM_FIELD_VISIBILITY_UNSPECIFIED; + $customField->setVisibility($customFieldVisibility); + $updateMask = new FieldMask(); + $request = (new UpdateCustomFieldRequest())->setCustomField($customField)->setUpdateMask($updateMask); + $response = $gapicClient->updateCustomField($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.ads.admanager.v1.CustomFieldService/GetCustomField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertSame('/google.ads.admanager.v1.CustomFieldService/UpdateCustomField', $actualFuncCall); + $actualValue = $actualRequestObject->getCustomField(); + $this->assertProtobufEquals($customField, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCustomFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $customField = new CustomField(); + $customFieldDisplayName = 'customFieldDisplayName-1447155036'; + $customField->setDisplayName($customFieldDisplayName); + $customFieldEntityType = CustomFieldEntityType::CUSTOM_FIELD_ENTITY_TYPE_UNSPECIFIED; + $customField->setEntityType($customFieldEntityType); + $customFieldDataType = CustomFieldDataType::CUSTOM_FIELD_DATA_TYPE_UNSPECIFIED; + $customField->setDataType($customFieldDataType); + $customFieldVisibility = CustomFieldVisibility::CUSTOM_FIELD_VISIBILITY_UNSPECIFIED; + $customField->setVisibility($customFieldVisibility); + $updateMask = new FieldMask(); + $request = (new UpdateCustomFieldRequest())->setCustomField($customField)->setUpdateMask($updateMask); + try { + $gapicClient->updateCustomField($request); + // If the $gapicClient 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 batchActivateCustomFieldsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchActivateCustomFieldsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->customFieldName('[NETWORK_CODE]', '[CUSTOM_FIELD]')]; + $request = (new BatchActivateCustomFieldsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchActivateCustomFieldsAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.CustomFieldService/BatchActivateCustomFields', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); $this->assertTrue($transport->isExhausted()); } } diff --git a/AdsAdManager/tests/Unit/V1/Client/DeviceCapabilityServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/DeviceCapabilityServiceClientTest.php new file mode 100644 index 000000000000..b9a2dba83e46 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/DeviceCapabilityServiceClientTest.php @@ -0,0 +1,236 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return DeviceCapabilityServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DeviceCapabilityServiceClient($options); + } + + /** @test */ + public function getDeviceCapabilityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DeviceCapability(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deviceCapabilityName('[NETWORK_CODE]', '[DEVICE_CAPABILITY]'); + $request = (new GetDeviceCapabilityRequest())->setName($formattedName); + $response = $gapicClient->getDeviceCapability($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.DeviceCapabilityService/GetDeviceCapability', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeviceCapabilityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->deviceCapabilityName('[NETWORK_CODE]', '[DEVICE_CAPABILITY]'); + $request = (new GetDeviceCapabilityRequest())->setName($formattedName); + try { + $gapicClient->getDeviceCapability($request); + // If the $gapicClient 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 listDeviceCapabilitiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $deviceCapabilitiesElement = new DeviceCapability(); + $deviceCapabilities = [$deviceCapabilitiesElement]; + $expectedResponse = new ListDeviceCapabilitiesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setDeviceCapabilities($deviceCapabilities); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListDeviceCapabilitiesRequest())->setParent($formattedParent); + $response = $gapicClient->listDeviceCapabilities($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDeviceCapabilities()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.DeviceCapabilityService/ListDeviceCapabilities', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeviceCapabilitiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListDeviceCapabilitiesRequest())->setParent($formattedParent); + try { + $gapicClient->listDeviceCapabilities($request); + // If the $gapicClient 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 getDeviceCapabilityAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DeviceCapability(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deviceCapabilityName('[NETWORK_CODE]', '[DEVICE_CAPABILITY]'); + $request = (new GetDeviceCapabilityRequest())->setName($formattedName); + $response = $gapicClient->getDeviceCapabilityAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.DeviceCapabilityService/GetDeviceCapability', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/DeviceManufacturerServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/DeviceManufacturerServiceClientTest.php new file mode 100644 index 000000000000..de411f648db3 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/DeviceManufacturerServiceClientTest.php @@ -0,0 +1,239 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return DeviceManufacturerServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DeviceManufacturerServiceClient($options); + } + + /** @test */ + public function getDeviceManufacturerTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DeviceManufacturer(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deviceManufacturerName('[NETWORK_CODE]', '[DEVICE_MANUFACTURER]'); + $request = (new GetDeviceManufacturerRequest())->setName($formattedName); + $response = $gapicClient->getDeviceManufacturer($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.DeviceManufacturerService/GetDeviceManufacturer', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeviceManufacturerExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->deviceManufacturerName('[NETWORK_CODE]', '[DEVICE_MANUFACTURER]'); + $request = (new GetDeviceManufacturerRequest())->setName($formattedName); + try { + $gapicClient->getDeviceManufacturer($request); + // If the $gapicClient 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 listDeviceManufacturersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $deviceManufacturersElement = new DeviceManufacturer(); + $deviceManufacturers = [$deviceManufacturersElement]; + $expectedResponse = new ListDeviceManufacturersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setDeviceManufacturers($deviceManufacturers); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListDeviceManufacturersRequest())->setParent($formattedParent); + $response = $gapicClient->listDeviceManufacturers($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDeviceManufacturers()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.DeviceManufacturerService/ListDeviceManufacturers', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeviceManufacturersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListDeviceManufacturersRequest())->setParent($formattedParent); + try { + $gapicClient->listDeviceManufacturers($request); + // If the $gapicClient 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 getDeviceManufacturerAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new DeviceManufacturer(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deviceManufacturerName('[NETWORK_CODE]', '[DEVICE_MANUFACTURER]'); + $request = (new GetDeviceManufacturerRequest())->setName($formattedName); + $response = $gapicClient->getDeviceManufacturerAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.DeviceManufacturerService/GetDeviceManufacturer', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/MobileCarrierServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/MobileCarrierServiceClientTest.php new file mode 100644 index 000000000000..05dc1e46e192 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/MobileCarrierServiceClientTest.php @@ -0,0 +1,240 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return MobileCarrierServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MobileCarrierServiceClient($options); + } + + /** @test */ + public function getMobileCarrierTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $regionCode = 'regionCode-1566082984'; + $expectedResponse = new MobileCarrier(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRegionCode($regionCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->mobileCarrierName('[NETWORK_CODE]', '[MOBILE_CARRIER]'); + $request = (new GetMobileCarrierRequest())->setName($formattedName); + $response = $gapicClient->getMobileCarrier($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.MobileCarrierService/GetMobileCarrier', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMobileCarrierExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->mobileCarrierName('[NETWORK_CODE]', '[MOBILE_CARRIER]'); + $request = (new GetMobileCarrierRequest())->setName($formattedName); + try { + $gapicClient->getMobileCarrier($request); + // If the $gapicClient 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 listMobileCarriersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $mobileCarriersElement = new MobileCarrier(); + $mobileCarriers = [$mobileCarriersElement]; + $expectedResponse = new ListMobileCarriersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setMobileCarriers($mobileCarriers); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListMobileCarriersRequest())->setParent($formattedParent); + $response = $gapicClient->listMobileCarriers($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMobileCarriers()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.MobileCarrierService/ListMobileCarriers', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMobileCarriersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListMobileCarriersRequest())->setParent($formattedParent); + try { + $gapicClient->listMobileCarriers($request); + // If the $gapicClient 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 getMobileCarrierAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $regionCode = 'regionCode-1566082984'; + $expectedResponse = new MobileCarrier(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRegionCode($regionCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->mobileCarrierName('[NETWORK_CODE]', '[MOBILE_CARRIER]'); + $request = (new GetMobileCarrierRequest())->setName($formattedName); + $response = $gapicClient->getMobileCarrierAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.MobileCarrierService/GetMobileCarrier', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/MobileDeviceServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/MobileDeviceServiceClientTest.php new file mode 100644 index 000000000000..20808050abc2 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/MobileDeviceServiceClientTest.php @@ -0,0 +1,240 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return MobileDeviceServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MobileDeviceServiceClient($options); + } + + /** @test */ + public function getMobileDeviceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $manufacturer = 'manufacturer-1969347631'; + $expectedResponse = new MobileDevice(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setManufacturer($manufacturer); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->mobileDeviceName('[NETWORK_CODE]', '[MOBILE_DEVICE]'); + $request = (new GetMobileDeviceRequest())->setName($formattedName); + $response = $gapicClient->getMobileDevice($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.MobileDeviceService/GetMobileDevice', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMobileDeviceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->mobileDeviceName('[NETWORK_CODE]', '[MOBILE_DEVICE]'); + $request = (new GetMobileDeviceRequest())->setName($formattedName); + try { + $gapicClient->getMobileDevice($request); + // If the $gapicClient 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 listMobileDevicesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $mobileDevicesElement = new MobileDevice(); + $mobileDevices = [$mobileDevicesElement]; + $expectedResponse = new ListMobileDevicesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setMobileDevices($mobileDevices); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListMobileDevicesRequest())->setParent($formattedParent); + $response = $gapicClient->listMobileDevices($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMobileDevices()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.MobileDeviceService/ListMobileDevices', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMobileDevicesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListMobileDevicesRequest())->setParent($formattedParent); + try { + $gapicClient->listMobileDevices($request); + // If the $gapicClient 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 getMobileDeviceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $manufacturer = 'manufacturer-1969347631'; + $expectedResponse = new MobileDevice(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setManufacturer($manufacturer); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->mobileDeviceName('[NETWORK_CODE]', '[MOBILE_DEVICE]'); + $request = (new GetMobileDeviceRequest())->setName($formattedName); + $response = $gapicClient->getMobileDeviceAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.MobileDeviceService/GetMobileDevice', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/MobileDeviceSubmodelServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/MobileDeviceSubmodelServiceClientTest.php new file mode 100644 index 000000000000..1b0f4feb3545 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/MobileDeviceSubmodelServiceClientTest.php @@ -0,0 +1,249 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return MobileDeviceSubmodelServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MobileDeviceSubmodelServiceClient($options); + } + + /** @test */ + public function getMobileDeviceSubmodelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $mobileDevice = 'mobileDevice-267587437'; + $expectedResponse = new MobileDeviceSubmodel(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMobileDevice($mobileDevice); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->mobileDeviceSubmodelName('[NETWORK_CODE]', '[MOBILE_DEVICE_SUBMODEL]'); + $request = (new GetMobileDeviceSubmodelRequest())->setName($formattedName); + $response = $gapicClient->getMobileDeviceSubmodel($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.MobileDeviceSubmodelService/GetMobileDeviceSubmodel', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMobileDeviceSubmodelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->mobileDeviceSubmodelName('[NETWORK_CODE]', '[MOBILE_DEVICE_SUBMODEL]'); + $request = (new GetMobileDeviceSubmodelRequest())->setName($formattedName); + try { + $gapicClient->getMobileDeviceSubmodel($request); + // If the $gapicClient 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 listMobileDeviceSubmodelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $mobileDeviceSubmodelsElement = new MobileDeviceSubmodel(); + $mobileDeviceSubmodels = [$mobileDeviceSubmodelsElement]; + $expectedResponse = new ListMobileDeviceSubmodelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setMobileDeviceSubmodels($mobileDeviceSubmodels); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListMobileDeviceSubmodelsRequest())->setParent($formattedParent); + $response = $gapicClient->listMobileDeviceSubmodels($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMobileDeviceSubmodels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.MobileDeviceSubmodelService/ListMobileDeviceSubmodels', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMobileDeviceSubmodelsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListMobileDeviceSubmodelsRequest())->setParent($formattedParent); + try { + $gapicClient->listMobileDeviceSubmodels($request); + // If the $gapicClient 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 getMobileDeviceSubmodelAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $mobileDevice = 'mobileDevice-267587437'; + $expectedResponse = new MobileDeviceSubmodel(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMobileDevice($mobileDevice); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->mobileDeviceSubmodelName('[NETWORK_CODE]', '[MOBILE_DEVICE_SUBMODEL]'); + $request = (new GetMobileDeviceSubmodelRequest())->setName($formattedName); + $response = $gapicClient->getMobileDeviceSubmodelAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.ads.admanager.v1.MobileDeviceSubmodelService/GetMobileDeviceSubmodel', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/PlacementServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/PlacementServiceClientTest.php index 71dbca739c66..6359ee17e329 100644 --- a/AdsAdManager/tests/Unit/V1/Client/PlacementServiceClientTest.php +++ b/AdsAdManager/tests/Unit/V1/Client/PlacementServiceClientTest.php @@ -22,15 +22,28 @@ namespace Google\Ads\AdManager\Tests\Unit\V1\Client; +use Google\Ads\AdManager\V1\BatchActivatePlacementsRequest; +use Google\Ads\AdManager\V1\BatchActivatePlacementsResponse; +use Google\Ads\AdManager\V1\BatchArchivePlacementsRequest; +use Google\Ads\AdManager\V1\BatchArchivePlacementsResponse; +use Google\Ads\AdManager\V1\BatchCreatePlacementsRequest; +use Google\Ads\AdManager\V1\BatchCreatePlacementsResponse; +use Google\Ads\AdManager\V1\BatchDeactivatePlacementsRequest; +use Google\Ads\AdManager\V1\BatchDeactivatePlacementsResponse; +use Google\Ads\AdManager\V1\BatchUpdatePlacementsRequest; +use Google\Ads\AdManager\V1\BatchUpdatePlacementsResponse; use Google\Ads\AdManager\V1\Client\PlacementServiceClient; +use Google\Ads\AdManager\V1\CreatePlacementRequest; use Google\Ads\AdManager\V1\GetPlacementRequest; use Google\Ads\AdManager\V1\ListPlacementsRequest; use Google\Ads\AdManager\V1\ListPlacementsResponse; use Google\Ads\AdManager\V1\Placement; +use Google\Ads\AdManager\V1\UpdatePlacementRequest; use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; +use Google\Protobuf\FieldMask; use Google\Rpc\Code; use stdClass; @@ -64,6 +77,422 @@ private function createClient(array $options = []) return new PlacementServiceClient($options); } + /** @test */ + public function batchActivatePlacementsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchActivatePlacementsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->placementName('[NETWORK_CODE]', '[PLACEMENT]')]; + $request = (new BatchActivatePlacementsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchActivatePlacements($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.PlacementService/BatchActivatePlacements', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchActivatePlacementsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->placementName('[NETWORK_CODE]', '[PLACEMENT]')]; + $request = (new BatchActivatePlacementsRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchActivatePlacements($request); + // If the $gapicClient 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 batchArchivePlacementsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchArchivePlacementsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->placementName('[NETWORK_CODE]', '[PLACEMENT]')]; + $request = (new BatchArchivePlacementsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchArchivePlacements($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.PlacementService/BatchArchivePlacements', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchArchivePlacementsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->placementName('[NETWORK_CODE]', '[PLACEMENT]')]; + $request = (new BatchArchivePlacementsRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchArchivePlacements($request); + // If the $gapicClient 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 batchCreatePlacementsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreatePlacementsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreatePlacementsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreatePlacements($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.PlacementService/BatchCreatePlacements', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreatePlacementsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreatePlacementsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchCreatePlacements($request); + // If the $gapicClient 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 batchDeactivatePlacementsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchDeactivatePlacementsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->placementName('[NETWORK_CODE]', '[PLACEMENT]')]; + $request = (new BatchDeactivatePlacementsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchDeactivatePlacements($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.PlacementService/BatchDeactivatePlacements', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeactivatePlacementsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->placementName('[NETWORK_CODE]', '[PLACEMENT]')]; + $request = (new BatchDeactivatePlacementsRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchDeactivatePlacements($request); + // If the $gapicClient 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 batchUpdatePlacementsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdatePlacementsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdatePlacementsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchUpdatePlacements($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.PlacementService/BatchUpdatePlacements', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdatePlacementsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdatePlacementsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchUpdatePlacements($request); + // If the $gapicClient 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 createPlacementTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $placementId = 1224358069; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $placementCode = 'placementCode-213099769'; + $expectedResponse = new Placement(); + $expectedResponse->setName($name); + $expectedResponse->setPlacementId($placementId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPlacementCode($placementCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $placement = new Placement(); + $placementDisplayName = 'placementDisplayName-410969528'; + $placement->setDisplayName($placementDisplayName); + $request = (new CreatePlacementRequest())->setParent($formattedParent)->setPlacement($placement); + $response = $gapicClient->createPlacement($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.PlacementService/CreatePlacement', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPlacement(); + $this->assertProtobufEquals($placement, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPlacementExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $placement = new Placement(); + $placementDisplayName = 'placementDisplayName-410969528'; + $placement->setDisplayName($placementDisplayName); + $request = (new CreatePlacementRequest())->setParent($formattedParent)->setPlacement($placement); + try { + $gapicClient->createPlacement($request); + // If the $gapicClient 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 getPlacementTest() { @@ -211,7 +640,7 @@ public function listPlacementsExceptionTest() } /** @test */ - public function getPlacementAsyncTest() + public function updatePlacementTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -219,30 +648,104 @@ public function getPlacementAsyncTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response - $name2 = 'name2-1052831874'; + $name = 'name3373707'; $placementId = 1224358069; $displayName = 'displayName1615086568'; $description = 'description-1724546052'; $placementCode = 'placementCode-213099769'; $expectedResponse = new Placement(); - $expectedResponse->setName($name2); + $expectedResponse->setName($name); $expectedResponse->setPlacementId($placementId); $expectedResponse->setDisplayName($displayName); $expectedResponse->setDescription($description); $expectedResponse->setPlacementCode($placementCode); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->placementName('[NETWORK_CODE]', '[PLACEMENT]'); - $request = (new GetPlacementRequest())->setName($formattedName); - $response = $gapicClient->getPlacementAsync($request)->wait(); + $placement = new Placement(); + $placementDisplayName = 'placementDisplayName-410969528'; + $placement->setDisplayName($placementDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdatePlacementRequest())->setPlacement($placement)->setUpdateMask($updateMask); + $response = $gapicClient->updatePlacement($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.ads.admanager.v1.PlacementService/GetPlacement', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertSame('/google.ads.admanager.v1.PlacementService/UpdatePlacement', $actualFuncCall); + $actualValue = $actualRequestObject->getPlacement(); + $this->assertProtobufEquals($placement, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePlacementExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $placement = new Placement(); + $placementDisplayName = 'placementDisplayName-410969528'; + $placement->setDisplayName($placementDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdatePlacementRequest())->setPlacement($placement)->setUpdateMask($updateMask); + try { + $gapicClient->updatePlacement($request); + // If the $gapicClient 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 batchActivatePlacementsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchActivatePlacementsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->placementName('[NETWORK_CODE]', '[PLACEMENT]')]; + $request = (new BatchActivatePlacementsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchActivatePlacementsAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.PlacementService/BatchActivatePlacements', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); $this->assertTrue($transport->isExhausted()); } } diff --git a/AdsAdManager/tests/Unit/V1/Client/ReportServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/ReportServiceClientTest.php index f9078d83360d..7b93cc03c5cf 100644 --- a/AdsAdManager/tests/Unit/V1/Client/ReportServiceClientTest.php +++ b/AdsAdManager/tests/Unit/V1/Client/ReportServiceClientTest.php @@ -31,8 +31,8 @@ use Google\Ads\AdManager\V1\ListReportsResponse; use Google\Ads\AdManager\V1\Report; use Google\Ads\AdManager\V1\ReportDefinition; -use Google\Ads\AdManager\V1\Report\DateRange; -use Google\Ads\AdManager\V1\Report\ReportType; +use Google\Ads\AdManager\V1\ReportDefinition\DateRange; +use Google\Ads\AdManager\V1\ReportDefinition\ReportType; use Google\Ads\AdManager\V1\RunReportRequest; use Google\Ads\AdManager\V1\RunReportResponse; use Google\Ads\AdManager\V1\UpdateReportRequest; diff --git a/AdsAdManager/tests/Unit/V1/Client/SiteServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/SiteServiceClientTest.php new file mode 100644 index 000000000000..de9c3b58ad45 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/SiteServiceClientTest.php @@ -0,0 +1,670 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return SiteServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SiteServiceClient($options); + } + + /** @test */ + public function batchCreateSitesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateSitesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateSitesRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreateSites($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.SiteService/BatchCreateSites', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateSitesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateSitesRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchCreateSites($request); + // If the $gapicClient 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 batchDeactivateSitesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchDeactivateSitesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $names = []; + $request = (new BatchDeactivateSitesRequest())->setParent($formattedParent)->setNames($names); + $response = $gapicClient->batchDeactivateSites($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.SiteService/BatchDeactivateSites', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($names, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeactivateSitesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $names = []; + $request = (new BatchDeactivateSitesRequest())->setParent($formattedParent)->setNames($names); + try { + $gapicClient->batchDeactivateSites($request); + // If the $gapicClient 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 batchSubmitSitesForApprovalTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchSubmitSitesForApprovalResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $names = []; + $request = (new BatchSubmitSitesForApprovalRequest())->setParent($formattedParent)->setNames($names); + $response = $gapicClient->batchSubmitSitesForApproval($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.SiteService/BatchSubmitSitesForApproval', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($names, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchSubmitSitesForApprovalExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $names = []; + $request = (new BatchSubmitSitesForApprovalRequest())->setParent($formattedParent)->setNames($names); + try { + $gapicClient->batchSubmitSitesForApproval($request); + // If the $gapicClient 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 batchUpdateSitesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdateSitesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateSitesRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchUpdateSites($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.SiteService/BatchUpdateSites', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateSitesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateSitesRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchUpdateSites($request); + // If the $gapicClient 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 createSiteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $url = 'url116079'; + $childNetworkCode = 'childNetworkCode-220013663'; + $expectedResponse = new Site(); + $expectedResponse->setName($name); + $expectedResponse->setUrl($url); + $expectedResponse->setChildNetworkCode($childNetworkCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $site = new Site(); + $siteUrl = 'siteUrl2099991720'; + $site->setUrl($siteUrl); + $request = (new CreateSiteRequest())->setParent($formattedParent)->setSite($site); + $response = $gapicClient->createSite($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.SiteService/CreateSite', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSite(); + $this->assertProtobufEquals($site, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSiteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $site = new Site(); + $siteUrl = 'siteUrl2099991720'; + $site->setUrl($siteUrl); + $request = (new CreateSiteRequest())->setParent($formattedParent)->setSite($site); + try { + $gapicClient->createSite($request); + // If the $gapicClient 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 getSiteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $url = 'url116079'; + $childNetworkCode = 'childNetworkCode-220013663'; + $expectedResponse = new Site(); + $expectedResponse->setName($name2); + $expectedResponse->setUrl($url); + $expectedResponse->setChildNetworkCode($childNetworkCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->siteName('[NETWORK_CODE]', '[SITE]'); + $request = (new GetSiteRequest())->setName($formattedName); + $response = $gapicClient->getSite($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.SiteService/GetSite', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSiteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->siteName('[NETWORK_CODE]', '[SITE]'); + $request = (new GetSiteRequest())->setName($formattedName); + try { + $gapicClient->getSite($request); + // If the $gapicClient 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 listSitesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $sitesElement = new Site(); + $sites = [$sitesElement]; + $expectedResponse = new ListSitesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setSites($sites); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListSitesRequest())->setParent($formattedParent); + $response = $gapicClient->listSites($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSites()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.SiteService/ListSites', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSitesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListSitesRequest())->setParent($formattedParent); + try { + $gapicClient->listSites($request); + // If the $gapicClient 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 updateSiteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $url = 'url116079'; + $childNetworkCode = 'childNetworkCode-220013663'; + $expectedResponse = new Site(); + $expectedResponse->setName($name); + $expectedResponse->setUrl($url); + $expectedResponse->setChildNetworkCode($childNetworkCode); + $transport->addResponse($expectedResponse); + // Mock request + $site = new Site(); + $siteUrl = 'siteUrl2099991720'; + $site->setUrl($siteUrl); + $updateMask = new FieldMask(); + $request = (new UpdateSiteRequest())->setSite($site)->setUpdateMask($updateMask); + $response = $gapicClient->updateSite($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.SiteService/UpdateSite', $actualFuncCall); + $actualValue = $actualRequestObject->getSite(); + $this->assertProtobufEquals($site, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSiteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $site = new Site(); + $siteUrl = 'siteUrl2099991720'; + $site->setUrl($siteUrl); + $updateMask = new FieldMask(); + $request = (new UpdateSiteRequest())->setSite($site)->setUpdateMask($updateMask); + try { + $gapicClient->updateSite($request); + // If the $gapicClient 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 batchCreateSitesAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateSitesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateSitesRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreateSitesAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.SiteService/BatchCreateSites', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/TeamServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/TeamServiceClientTest.php new file mode 100644 index 000000000000..3ed5c7c67a7d --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/TeamServiceClientTest.php @@ -0,0 +1,682 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return TeamServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TeamServiceClient($options); + } + + /** @test */ + public function batchActivateTeamsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchActivateTeamsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->teamName('[NETWORK_CODE]', '[TEAM]')]; + $request = (new BatchActivateTeamsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchActivateTeams($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TeamService/BatchActivateTeams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchActivateTeamsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->teamName('[NETWORK_CODE]', '[TEAM]')]; + $request = (new BatchActivateTeamsRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchActivateTeams($request); + // If the $gapicClient 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 batchCreateTeamsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateTeamsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateTeamsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreateTeams($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TeamService/BatchCreateTeams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateTeamsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateTeamsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchCreateTeams($request); + // If the $gapicClient 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 batchDeactivateTeamsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchDeactivateTeamsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->teamName('[NETWORK_CODE]', '[TEAM]')]; + $request = (new BatchDeactivateTeamsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchDeactivateTeams($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TeamService/BatchDeactivateTeams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeactivateTeamsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->teamName('[NETWORK_CODE]', '[TEAM]')]; + $request = (new BatchDeactivateTeamsRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchDeactivateTeams($request); + // If the $gapicClient 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 batchUpdateTeamsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdateTeamsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateTeamsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchUpdateTeams($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TeamService/BatchUpdateTeams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateTeamsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateTeamsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchUpdateTeams($request); + // If the $gapicClient 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 createTeamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $allCompaniesAccess = true; + $allInventoryAccess = false; + $expectedResponse = new Team(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setAllCompaniesAccess($allCompaniesAccess); + $expectedResponse->setAllInventoryAccess($allInventoryAccess); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $team = new Team(); + $teamDisplayName = 'teamDisplayName1137381328'; + $team->setDisplayName($teamDisplayName); + $request = (new CreateTeamRequest())->setParent($formattedParent)->setTeam($team); + $response = $gapicClient->createTeam($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TeamService/CreateTeam', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTeam(); + $this->assertProtobufEquals($team, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTeamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $team = new Team(); + $teamDisplayName = 'teamDisplayName1137381328'; + $team->setDisplayName($teamDisplayName); + $request = (new CreateTeamRequest())->setParent($formattedParent)->setTeam($team); + try { + $gapicClient->createTeam($request); + // If the $gapicClient 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 getTeamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $allCompaniesAccess = true; + $allInventoryAccess = false; + $expectedResponse = new Team(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setAllCompaniesAccess($allCompaniesAccess); + $expectedResponse->setAllInventoryAccess($allInventoryAccess); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->teamName('[NETWORK_CODE]', '[TEAM]'); + $request = (new GetTeamRequest())->setName($formattedName); + $response = $gapicClient->getTeam($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TeamService/GetTeam', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTeamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedName = $gapicClient->teamName('[NETWORK_CODE]', '[TEAM]'); + $request = (new GetTeamRequest())->setName($formattedName); + try { + $gapicClient->getTeam($request); + // If the $gapicClient 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 listTeamsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $teamsElement = new Team(); + $teams = [$teamsElement]; + $expectedResponse = new ListTeamsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setTeams($teams); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListTeamsRequest())->setParent($formattedParent); + $response = $gapicClient->listTeams($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTeams()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TeamService/ListTeams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTeamsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListTeamsRequest())->setParent($formattedParent); + try { + $gapicClient->listTeams($request); + // If the $gapicClient 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 updateTeamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $allCompaniesAccess = true; + $allInventoryAccess = false; + $expectedResponse = new Team(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setAllCompaniesAccess($allCompaniesAccess); + $expectedResponse->setAllInventoryAccess($allInventoryAccess); + $transport->addResponse($expectedResponse); + // Mock request + $team = new Team(); + $teamDisplayName = 'teamDisplayName1137381328'; + $team->setDisplayName($teamDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateTeamRequest())->setTeam($team)->setUpdateMask($updateMask); + $response = $gapicClient->updateTeam($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TeamService/UpdateTeam', $actualFuncCall); + $actualValue = $actualRequestObject->getTeam(); + $this->assertProtobufEquals($team, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTeamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $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 + $team = new Team(); + $teamDisplayName = 'teamDisplayName1137381328'; + $team->setDisplayName($teamDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateTeamRequest())->setTeam($team)->setUpdateMask($updateMask); + try { + $gapicClient->updateTeam($request); + // If the $gapicClient 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 batchActivateTeamsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchActivateTeamsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->teamName('[NETWORK_CODE]', '[TEAM]')]; + $request = (new BatchActivateTeamsRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchActivateTeamsAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.ads.admanager.v1.TeamService/BatchActivateTeams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +}